Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ box_annotator = sv.BoxAnnotator()
|
|
16 |
@spaces.GPU(duration=200)
|
17 |
def detect(image, model_id, image_size, conf_threshold, iou_threshold):
|
18 |
model_path = download_models(model_id)
|
19 |
-
results = model(source=image,
|
20 |
detections = sv.Detections.from_ultralytics(results)
|
21 |
|
22 |
labels = [
|
|
|
16 |
@spaces.GPU(duration=200)
|
17 |
def detect(image, model_id, image_size, conf_threshold, iou_threshold):
|
18 |
model_path = download_models(model_id)
|
19 |
+
results = model(source=image, imgsz=image_size, iou=iou_threshold, conf=conf_threshold, verbose=False)[0]
|
20 |
detections = sv.Detections.from_ultralytics(results)
|
21 |
|
22 |
labels = [
|