Spaces:
Running
Running
Commit
·
1102d40
1
Parent(s):
8ebe222
added image detection code to display predicted bboxes
Browse files- tool_utils/yolo_world.py +2 -1
tool_utils/yolo_world.py
CHANGED
@@ -78,6 +78,7 @@ class YoloWorld:
|
|
78 |
boxes=processed_predictions[0]['boxes'],
|
79 |
labels=processed_predictions[0]['labels']
|
80 |
)
|
81 |
-
|
|
|
82 |
return "Predicted image mask : final_mask.jpg . Details :{}".format(processed_predictions[0])
|
83 |
|
|
|
78 |
boxes=processed_predictions[0]['boxes'],
|
79 |
labels=processed_predictions[0]['labels']
|
80 |
)
|
81 |
+
|
82 |
+
cv2.imwrite('final_mask.png', cv2.cvtColor(detected_image,cv2.COLOR_BGR2RGB))
|
83 |
return "Predicted image mask : final_mask.jpg . Details :{}".format(processed_predictions[0])
|
84 |
|