Codelinhtinh commited on
Commit
26c9c51
·
1 Parent(s): abcf810

change main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -34,9 +34,9 @@ def visualize(image, pred):
34
  # drawer.text((x2 + 5, y1), IDX2TAGs[id], fill=IDX2COLORs[id], font=ImageFont.truetype("arial.ttf", 16))
35
 
36
  # Add a legend to the image
37
- # drawer.text((0, 0), "", fill="#FFFFFF", font=ImageFont.truetype("arial.ttf", 16))
38
- # for id, count in object_counts.items():
39
- # drawer.text((0, 20 + 20 * id), f"{IDX2TAGs[id]}: {count}", fill=IDX2COLORs[id], font=ImageFont.truetype("arial.ttf", 16))
40
 
41
  return img_
42
 
 
34
  # drawer.text((x2 + 5, y1), IDX2TAGs[id], fill=IDX2COLORs[id], font=ImageFont.truetype("arial.ttf", 16))
35
 
36
  # Add a legend to the image
37
+ drawer.text((0, 0), "", fill="#FFFFFF", font=ImageFont.truetype("arial.ttf", 16))
38
+ for id, count in object_counts.items():
39
+ drawer.text((0, 20 + 20 * id), f"{IDX2TAGs[id]}: {count}", fill=IDX2COLORs[id], font=ImageFont.truetype("arial.ttf", 16))
40
 
41
  return img_
42