@@ -120,14 +120,14 @@ def forward(self, images, orig_target_sizes):
120120
121121 # print(i, sum(scr > thrh))
122122
123- # for b, l in zip(box, lab):
124- # # Scale the bounding boxes back to the original image size
125- # b = [coord * original_size[j % 2] / 640 for j, coord in enumerate(b)]
126- # # Get the category name from the label
127- # category_name = mscoco_category2name[mscoco_label2category[l]]
128- # draw.rectangle(list(b), outline='red', width=2)
129- # font = ImageFont.truetype("Arial.ttf", 15)
130- # draw.text((b[0], b[1]), text=category_name, fill='yellow', font=font)
123+ # for b, l in zip(box, lab):
124+ # # Scale the bounding boxes back to the original image size
125+ # b = [coord * original_size[j % 2] / 640 for j, coord in enumerate(b)]
126+ # # Get the category name from the label
127+ # category_name = mscoco_category2name[mscoco_label2category[l]]
128+ # draw.rectangle(list(b), outline='red', width=2)
129+ # font = ImageFont.truetype("Arial.ttf", 15)
130+ # draw.text((b[0], b[1]), text=category_name, fill='yellow', font=font)
131131
132132 # # Save the original image with bounding boxes
133133 # original_im.save('test.jpg')
0 commit comments