Spaces:
Sleeping
Sleeping
Fixed object detection
Browse files
app.py
CHANGED
@@ -66,8 +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 |
-
|
70 |
-
draw.text((xmin, ymin), f"{label}: {round(score,2)}", fill="white", font=font)
|
71 |
return image
|
72 |
|
73 |
detector = initialise_object_detection_model()
|
|
|
66 |
score = prediction["score"]
|
67 |
xmin, ymin, xmax, ymax = box.values()
|
68 |
draw.rectangle((xmin, ymin, xmax, ymax), outline="red", width=1)
|
69 |
+
draw.text((xmin, ymin), f"{label}: {round(score,2)}", fill="white")
|
|
|
70 |
return image
|
71 |
|
72 |
detector = initialise_object_detection_model()
|