Update my_model/object_detection.py
Browse files
my_model/object_detection.py
CHANGED
@@ -247,13 +247,9 @@ def detect_and_draw_objects(image_path, model_type='yolov5', threshold=0.2, show
|
|
247 |
|
248 |
detector = ObjectDetector()
|
249 |
detector.load_model(model_type)
|
250 |
-
st.write("GGGGGGGGG")
|
251 |
image = detector.process_image(image_path)
|
252 |
-
st.write("HHHHHHHHHHHH")
|
253 |
detected_objects_string, detected_objects_list = detector.detect_objects(image, threshold=threshold)
|
254 |
-
st.write("YYYYYYYYYYYYYYYY")
|
255 |
image_with_boxes = detector.draw_boxes(image, detected_objects_list, show_confidence=show_confidence)
|
256 |
-
st.write("KKKKKKKKKKKKKKK")
|
257 |
st.write(type(image_with_boxes))
|
258 |
return image_with_boxes, detected_objects_string
|
259 |
|
|
|
247 |
|
248 |
detector = ObjectDetector()
|
249 |
detector.load_model(model_type)
|
|
|
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 |
|