apratim24 commited on
Commit
8c7b6a7
·
verified ·
1 Parent(s): 895a3b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -15,7 +15,7 @@ object_detector = pipeline("object-detection",
15
  # model=model_path)
16
 
17
 
18
- def draw_bounding_boxes(image, detections, font_path=None, font_size=300):
19
  # Make a copy of the image to draw on
20
  draw_image = image.copy()
21
  draw = ImageDraw.Draw(draw_image)
@@ -36,7 +36,7 @@ def draw_bounding_boxes(image, detections, font_path=None, font_size=300):
36
  ymax = box['ymax']
37
 
38
  # Draw the bounding box
39
- draw.rectangle([(xmin, ymin), (xmax, ymax)], outline="red", width=3)
40
 
41
  # Optionally, you can also draw the label and score
42
  label = detection['label']
 
15
  # model=model_path)
16
 
17
 
18
+ def draw_bounding_boxes(image, detections, font_path=None, font_size=50):
19
  # Make a copy of the image to draw on
20
  draw_image = image.copy()
21
  draw = ImageDraw.Draw(draw_image)
 
36
  ymax = box['ymax']
37
 
38
  # Draw the bounding box
39
+ draw.rectangle([(xmin, ymin), (xmax, ymax)], outline="red", width=8)
40
 
41
  # Optionally, you can also draw the label and score
42
  label = detection['label']