Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -38,12 +38,12 @@ def yolov8_img_inference(
|
|
38 |
iou_threshold: gr.inputs.Slider = 0.45,
|
39 |
):
|
40 |
model = YOLO(model_path)
|
41 |
-
|
42 |
-
|
43 |
-
model.overrides['conf'] = conf_threshold
|
44 |
-
model.overrides['iou'] = iou_threshold
|
45 |
-
model.overrides['agnostic_nms'] = False
|
46 |
-
model.overrides['max_det'] = 1000
|
47 |
# image = read_image
|
48 |
results = model.predict(image)
|
49 |
render = render_result(model=model, image=image, result=results[0])
|
|
|
38 |
iou_threshold: gr.inputs.Slider = 0.45,
|
39 |
):
|
40 |
model = YOLO(model_path)
|
41 |
+
model.conf = conf_threshold
|
42 |
+
model.iou = iou_threshold
|
43 |
+
# model.overrides['conf'] = conf_threshold
|
44 |
+
# model.overrides['iou'] = iou_threshold
|
45 |
+
# model.overrides['agnostic_nms'] = False
|
46 |
+
# model.overrides['max_det'] = 1000
|
47 |
# image = read_image
|
48 |
results = model.predict(image)
|
49 |
render = render_result(model=model, image=image, result=results[0])
|