Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -35,7 +35,7 @@ def image_predict(image):
|
|
35 |
res = ""
|
36 |
model_path = "best.pt"
|
37 |
model = YOLO(model_path)
|
38 |
-
results = model.predict(image,conf = 0.
|
39 |
box = results[0].boxes
|
40 |
res = check_acc(box)
|
41 |
annotated_frame = results[0].plot()
|
@@ -62,7 +62,7 @@ def extract_frames(video):
|
|
62 |
if (frame_no % (int(fps / nof))) == 0:
|
63 |
model_path = "best.pt"
|
64 |
model = YOLO(model_path)
|
65 |
-
results = model.predict(image,conf = 0.
|
66 |
box = results[0].boxes
|
67 |
res = check_acc(box)
|
68 |
annotated_frame = results[0].plot()
|
|
|
35 |
res = ""
|
36 |
model_path = "best.pt"
|
37 |
model = YOLO(model_path)
|
38 |
+
results = model.predict(image,conf = 0.8,iou = 0.3,imgsz = 512)
|
39 |
box = results[0].boxes
|
40 |
res = check_acc(box)
|
41 |
annotated_frame = results[0].plot()
|
|
|
62 |
if (frame_no % (int(fps / nof))) == 0:
|
63 |
model_path = "best.pt"
|
64 |
model = YOLO(model_path)
|
65 |
+
results = model.predict(image,conf = 0.8,iou = 0.3,imgsz = 512)
|
66 |
box = results[0].boxes
|
67 |
res = check_acc(box)
|
68 |
annotated_frame = results[0].plot()
|