m7mdal7aj commited on
Commit
3bbb860
·
verified ·
1 Parent(s): 5554139

Update my_model/object_detection.py

Browse files
Files changed (1) hide show
  1. my_model/object_detection.py +5 -0
my_model/object_detection.py CHANGED
@@ -239,9 +239,14 @@ def detect_and_draw_objects(image_path, model_type='yolov5', threshold=0.2, show
239
 
240
  detector = ObjectDetector()
241
  detector.load_model(model_type)
 
242
  image = detector.process_image(image_path)
 
243
  detected_objects_string, detected_objects_list = detector.detect_objects(image, threshold=threshold)
 
244
  image_with_boxes = detector.draw_boxes(image, detected_objects_list, show_confidence=show_confidence)
 
 
245
  return image_with_boxes, detected_objects_string
246
 
247
 
 
239
 
240
  detector = ObjectDetector()
241
  detector.load_model(model_type)
242
+ st.write("GGGGGGGGG")
243
  image = detector.process_image(image_path)
244
+ st.write("HHHHHHHHHHHH")
245
  detected_objects_string, detected_objects_list = detector.detect_objects(image, threshold=threshold)
246
+ st.write("YYYYYYYYYYYYYYYY")
247
  image_with_boxes = detector.draw_boxes(image, detected_objects_list, show_confidence=show_confidence)
248
+ st.write("KKKKKKKKKKKKKKK")
249
+ st.write(type(image_with_boxes))
250
  return image_with_boxes, detected_objects_string
251
 
252