Update app.py
Browse files
app.py
CHANGED
|
@@ -45,8 +45,9 @@ def visualize_prediction(img, output_dict, threshold=0.5, id2label=None):
|
|
| 45 |
boxes = output_dict["boxes"][keep].tolist()
|
| 46 |
scores = output_dict["scores"][keep].tolist()
|
| 47 |
labels = output_dict["labels"][keep].tolist()
|
|
|
|
| 48 |
if id2label is not None:
|
| 49 |
-
|
| 50 |
labels = [id2label[x] for x in labels]
|
| 51 |
|
| 52 |
|
|
|
|
| 45 |
boxes = output_dict["boxes"][keep].tolist()
|
| 46 |
scores = output_dict["scores"][keep].tolist()
|
| 47 |
labels = output_dict["labels"][keep].tolist()
|
| 48 |
+
print(labels)
|
| 49 |
if id2label is not None:
|
| 50 |
+
|
| 51 |
labels = [id2label[x] for x in labels]
|
| 52 |
|
| 53 |
|