Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,7 @@ def detect_objects(image, object_types):
|
|
| 18 |
|
| 19 |
# Post-process the outputs to get the bounding boxes
|
| 20 |
target_sizes = torch.tensor([image.size[::-1]])
|
| 21 |
-
results = processor.post_process_object_detection(outputs, target_sizes=target_sizes, threshold=0.
|
| 22 |
|
| 23 |
detected_objects = []
|
| 24 |
picking_positions = []
|
|
|
|
| 18 |
|
| 19 |
# Post-process the outputs to get the bounding boxes
|
| 20 |
target_sizes = torch.tensor([image.size[::-1]])
|
| 21 |
+
results = processor.post_process_object_detection(outputs, target_sizes=target_sizes, threshold=0.8)[0]
|
| 22 |
|
| 23 |
detected_objects = []
|
| 24 |
picking_positions = []
|