Update app.py
Browse files
app.py
CHANGED
|
@@ -26,4 +26,7 @@ results = processor.post_process_grounded_object_detection(
|
|
| 26 |
threshold=0.4,
|
| 27 |
target_sizes=[image.size[::-1]]
|
| 28 |
)
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
threshold=0.4,
|
| 27 |
target_sizes=[image.size[::-1]]
|
| 28 |
)
|
| 29 |
+
|
| 30 |
+
for result in results:
|
| 31 |
+
for box, score, label in zip(result["boxes"], result["scores"], result["labels"]):
|
| 32 |
+
print(f"Detected {label} with confidence {score:.2f} at location {box.tolist()}")
|