fix: boxes attribute error

This commit is contained in:
Bingsu
2023-04-26 23:08:30 +09:00
parent 44160f2b27
commit ff4f99ecf4

View File

@@ -18,7 +18,7 @@ def ultralytics_predict(
model = YOLO(model_path)
pred = model(image, conf=confidence, hide_labels=True)
bboxes = pred[0].xyxy.cpu().numpy()
bboxes = pred[0].boxes.xyxy.cpu().numpy()
if bboxes.size == 0:
return PredictOutput()
bboxes = bboxes.tolist()