Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -43,7 +43,7 @@ def detect_lanes_and_objects_image(image, model, confidence_threshold, iou_thres
43
  results = model(img_np, conf=confidence_threshold, iou=iou_threshold)
44
 
45
  detections = sv.Detections.from_ultralytics(results[0])
46
- annotator = sv.BoxAnnotator(thickness=2, text_thickness=1, text_scale=0.5)
47
  annotated_frame = annotator.annotate(scene=img_np, detections=detections)
48
 
49
  return annotated_frame
@@ -68,7 +68,7 @@ def detect_lanes_and_objects_video(video_path, model, confidence_threshold, iou_
68
  results = model(frame, conf=confidence_threshold, iou=iou_threshold)
69
 
70
  detections = sv.Detections.from_ultralytics(results[0])
71
- annotator = sv.BoxAnnotator(thickness=2, text_thickness=1, text_scale=0.5)
72
  annotated_frame = annotator.annotate(scene=frame, detections=detections)
73
 
74
  out.write(annotated_frame)
 
43
  results = model(img_np, conf=confidence_threshold, iou=iou_threshold)
44
 
45
  detections = sv.Detections.from_ultralytics(results[0])
46
+ annotator = sv.BoxAnnotator(thickness=2, text_scale=0.5)
47
  annotated_frame = annotator.annotate(scene=img_np, detections=detections)
48
 
49
  return annotated_frame
 
68
  results = model(frame, conf=confidence_threshold, iou=iou_threshold)
69
 
70
  detections = sv.Detections.from_ultralytics(results[0])
71
+ annotator = sv.BoxAnnotator(thickness=2, text_scale=0.5)
72
  annotated_frame = annotator.annotate(scene=frame, detections=detections)
73
 
74
  out.write(annotated_frame)