Spaces:
Sleeping
Sleeping
Fixed object detection
Browse files
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 |
|