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)
我在谷歌中查找但没有解决方案!!