Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,7 +34,7 @@ def fig2img(fig):
|
|
| 34 |
return img
|
| 35 |
|
| 36 |
|
| 37 |
-
def visualize_prediction(pil_img, output_dict, threshold=0.
|
| 38 |
keep = output_dict["scores"] > threshold
|
| 39 |
boxes = output_dict["boxes"][keep].tolist()
|
| 40 |
scores = output_dict["scores"][keep].tolist()
|
|
|
|
| 34 |
return img
|
| 35 |
|
| 36 |
|
| 37 |
+
def visualize_prediction(pil_img, output_dict, threshold=0.8, id2label=None):
|
| 38 |
keep = output_dict["scores"] > threshold
|
| 39 |
boxes = output_dict["boxes"][keep].tolist()
|
| 40 |
scores = output_dict["scores"][keep].tolist()
|