echons commited on
Commit
ea432d2
·
1 Parent(s): 9f8e402

Fixed object detection

Browse files
Files changed (2) hide show
  1. Arial.ttf +0 -0
  2. app.py +1 -1
Arial.ttf ADDED
Binary file (276 kB). View file
 
app.py CHANGED
@@ -66,7 +66,7 @@ def get_object_detection_results(detector, image_path, object_labels):
66
  score = prediction["score"]
67
  xmin, ymin, xmax, ymax = box.values()
68
  draw.rectangle((xmin, ymin, xmax, ymax), outline="red", width=1)
69
- font = ImageFont.truetype("arial.ttf", 30)
70
  draw.text((xmin, ymin), f"{label}: {round(score,2)}", fill="white", font=font)
71
  return image
72
 
 
66
  score = prediction["score"]
67
  xmin, ymin, xmax, ymax = box.values()
68
  draw.rectangle((xmin, ymin, xmax, ymax), outline="red", width=1)
69
+ font = ImageFont.truetype("arial.ttf", size=30)
70
  draw.text((xmin, ymin), f"{label}: {round(score,2)}", fill="white", font=font)
71
  return image
72