Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -23,13 +23,12 @@ def yolov9_inference(img):
|
|
23 |
# Load the model
|
24 |
model_path = download_models("gelan-c-seg.pt")
|
25 |
model = cv2.dnn.readNetFromDarknet(model_path)
|
26 |
-
|
27 |
# Perform inference
|
28 |
-
|
29 |
-
|
30 |
-
# Placeholder for the output image
|
31 |
-
output_image = img
|
32 |
|
|
|
|
|
|
|
33 |
return output_image
|
34 |
|
35 |
|
|
|
23 |
# Load the model
|
24 |
model_path = download_models("gelan-c-seg.pt")
|
25 |
model = cv2.dnn.readNetFromDarknet(model_path)
|
|
|
26 |
# Perform inference
|
27 |
+
results = model(img_path)
|
|
|
|
|
|
|
28 |
|
29 |
+
# Optionally, show detection bounding boxes on image
|
30 |
+
output = results.render()
|
31 |
+
|
32 |
return output_image
|
33 |
|
34 |
|