Spaces:
Running
Running
Update my_model/object_detection.py
Browse files
my_model/object_detection.py
CHANGED
@@ -6,7 +6,7 @@ import numpy as np
|
|
6 |
import cv2
|
7 |
import os
|
8 |
from my_model.utilities import get_path, show_image
|
9 |
-
|
10 |
|
11 |
|
12 |
class ObjectDetector:
|
@@ -250,7 +250,6 @@ def detect_and_draw_objects(image_path, model_type='yolov5', threshold=0.2, show
|
|
250 |
image = detector.process_image(image_path)
|
251 |
detected_objects_string, detected_objects_list = detector.detect_objects(image, threshold=threshold)
|
252 |
image_with_boxes = detector.draw_boxes(image, detected_objects_list, show_confidence=show_confidence)
|
253 |
-
st.write(type(image_with_boxes))
|
254 |
return image_with_boxes, detected_objects_string
|
255 |
|
256 |
|
|
|
6 |
import cv2
|
7 |
import os
|
8 |
from my_model.utilities import get_path, show_image
|
9 |
+
|
10 |
|
11 |
|
12 |
class ObjectDetector:
|
|
|
250 |
image = detector.process_image(image_path)
|
251 |
detected_objects_string, detected_objects_list = detector.detect_objects(image, threshold=threshold)
|
252 |
image_with_boxes = detector.draw_boxes(image, detected_objects_list, show_confidence=show_confidence)
|
|
|
253 |
return image_with_boxes, detected_objects_string
|
254 |
|
255 |
|