sitammeur commited on
Commit
50618cc
1 Parent(s): 4531458

Update src/utils.py

Browse files
Files changed (1) hide show
  1. src/utils.py +2 -2
src/utils.py CHANGED
@@ -64,7 +64,7 @@ def draw_ocr_bboxes(image: Image, detections: sv.Detections) -> Image:
64
  text_scale = sv.calculate_optimal_text_scale(resolution_wh=image.size)
65
 
66
  # Initialize the bounding box and label annotators
67
- bounding_box_annotator = sv.BoundingBoxAnnotator(
68
  color_lookup=sv.ColorLookup.INDEX, thickness=thickness
69
  )
70
  label_annotator = sv.LabelAnnotator(
@@ -74,7 +74,7 @@ def draw_ocr_bboxes(image: Image, detections: sv.Detections) -> Image:
74
  )
75
 
76
  # Annotate the image with bounding boxes and labels
77
- annotated_image = bounding_box_annotator.annotate(annotated_image, detections)
78
  annotated_image = label_annotator.annotate(annotated_image, detections)
79
 
80
  # Return the annotated image
 
64
  text_scale = sv.calculate_optimal_text_scale(resolution_wh=image.size)
65
 
66
  # Initialize the bounding box and label annotators
67
+ box_annotator = sv.BoxAnnotator(
68
  color_lookup=sv.ColorLookup.INDEX, thickness=thickness
69
  )
70
  label_annotator = sv.LabelAnnotator(
 
74
  )
75
 
76
  # Annotate the image with bounding boxes and labels
77
+ annotated_image = box_annotator.annotate(annotated_image, detections)
78
  annotated_image = label_annotator.annotate(annotated_image, detections)
79
 
80
  # Return the annotated image