Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -162,6 +162,8 @@ def run_detr(image:Image, detr_processor, detr_model, confidence_threshold: floa
|
|
162 |
threshold=confidence_threshold)
|
163 |
outputs = postprocessed_outputs[0]
|
164 |
# dict{scores, logits, labels, boxes}
|
|
|
|
|
165 |
labels = [detr_model.config.id2label[label.item()] for label in outputs["labels"]]
|
166 |
boxes = outputs['boxes']
|
167 |
return boxes, labels
|
|
|
162 |
threshold=confidence_threshold)
|
163 |
outputs = postprocessed_outputs[0]
|
164 |
# dict{scores, logits, labels, boxes}
|
165 |
+
print(f"Output dict is {outputs.keys()}: {outputs}")
|
166 |
+
print(f"Labels are {outputs["labels"]}")
|
167 |
labels = [detr_model.config.id2label[label.item()] for label in outputs["labels"]]
|
168 |
boxes = outputs['boxes']
|
169 |
return boxes, labels
|