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