Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ def predict_image(image_input):
|
|
18 |
model = YOLO("best.pt")
|
19 |
#run predict
|
20 |
outputs = model.predict(source=image_input)
|
21 |
-
results =
|
22 |
|
23 |
for i, det in enumerate(results.boxes.xyxy):
|
24 |
cv2.rectangle(image, (int(det[0]), int(det[1])), (int(det[2]), int(det[3])), color=(0, 0, 255), thickness=2, lineType=cv2.Line_AA)
|
|
|
18 |
model = YOLO("best.pt")
|
19 |
#run predict
|
20 |
outputs = model.predict(source=image_input)
|
21 |
+
results = outputs[0].cpu().numpy()
|
22 |
|
23 |
for i, det in enumerate(results.boxes.xyxy):
|
24 |
cv2.rectangle(image, (int(det[0]), int(det[1])), (int(det[2]), int(det[3])), color=(0, 0, 255), thickness=2, lineType=cv2.Line_AA)
|