Ihor Bilyk commited on
Commit
4915cfb
·
1 Parent(s): 76446e4
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -30,12 +30,11 @@ def yolov8_inference(
30
  model = YOLO(model_path)
31
  model.conf = conf_threshold
32
  model.iou = iou_threshold
33
- results = model.predict(image, imgsz=image_size, return_outputs=True)
34
  object_prediction_list = []
35
- for _, image_results in enumerate(results):
36
  if len(image_results)!=0:
37
- image_predictions_in_xyxy_format = image_results['det']
38
- for pred in image_predictions_in_xyxy_format:
39
  x1, y1, x2, y2 = (
40
  int(pred[0]),
41
  int(pred[1]),
 
30
  model = YOLO(model_path)
31
  model.conf = conf_threshold
32
  model.iou = iou_threshold
33
+ results = model.predict(image, imgsz=image_size)
34
  object_prediction_list = []
35
+ for image_results in results:
36
  if len(image_results)!=0:
37
+ for pred in image_results.boxes.boxes:
 
38
  x1, y1, x2, y2 = (
39
  int(pred[0]),
40
  int(pred[1]),