nickmuchi commited on
Commit
5727cc0
·
1 Parent(s): d736619

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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 = [id2label[x] for x in labels if x == 0]
 
 
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)