数组中没有数据。使用非抑制算法

问题描述 投票:0回答:0

do you have any idea why the return array is empty? im Using a non-supression algo. the codes should return the amount of confidence, boxes, classes but in my case its empty, im new in machine learning please help me

  detections = preds\[0\]
  boxes = \[\]
  confidences = \[\]
  classes = \[\]

  image_w, image_h = input_image.shape\[:2\]
  x_factor = image_w/INPUT_WH_YOLO
  y_factor = image_h/INPUT_WH_YOLO


    if class_score > 0.24:
        cx, cy, w, h = row[0:4]
        
        left = int((cx - 0.5*w)*x_factor)
        top = int((cy - 0.5*h)*y_factor)
        width = int(w*x_factor)
        height = int(h*y_factor)
        
        box = np.array([left,top,width,height])
        
        confidences.append(confidence)
        boxes.append(box)
        classes.append(class_id)

我在谷歌中查找但没有解决方案!!

object machine-learning computer-vision object-detection detection
© www.soinside.com 2019 - 2024. All rights reserved.