Skip to content

Commit

Permalink
Merge pull request #276 from NeKoooo233/patch-1
Browse files Browse the repository at this point in the history
Update export_onnx.py
  • Loading branch information
lyuwenyu committed Apr 24, 2024
2 parents 64878ac + 70b4390 commit 2b88d5d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions rtdetr_pytorch/tools/export_onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ def forward(self, images, orig_target_sizes):

# print(i, sum(scr > thrh))

# for b, l in zip(box, lab):
# # Scale the bounding boxes back to the original image size
# b = [coord * original_size[j % 2] / 640 for j, coord in enumerate(b)]
# # Get the category name from the label
# category_name = mscoco_category2name[mscoco_label2category[l]]
# draw.rectangle(list(b), outline='red', width=2)
# font = ImageFont.truetype("Arial.ttf", 15)
# draw.text((b[0], b[1]), text=category_name, fill='yellow', font=font)
# for b, l in zip(box, lab):
# # Scale the bounding boxes back to the original image size
# b = [coord * original_size[j % 2] / 640 for j, coord in enumerate(b)]
# # Get the category name from the label
# category_name = mscoco_category2name[mscoco_label2category[l]]
# draw.rectangle(list(b), outline='red', width=2)
# font = ImageFont.truetype("Arial.ttf", 15)
# draw.text((b[0], b[1]), text=category_name, fill='yellow', font=font)

# # Save the original image with bounding boxes
# original_im.save('test.jpg')
Expand Down

0 comments on commit 2b88d5d

Please sign in to comment.