Spaces:
Build error
Build error
Ihor Bilyk commited on
Commit ·
4915cfb
1
Parent(s): 76446e4
fix
Browse files
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
|
| 34 |
object_prediction_list = []
|
| 35 |
-
for
|
| 36 |
if len(image_results)!=0:
|
| 37 |
-
|
| 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]),
|