Skip to content

Commit

Permalink
Update export_onnx.py
Browse files Browse the repository at this point in the history
sorry, I made a mistake
Fix previous pr error
Lines 123-130 are abnormally indented
Causes the loop to break out and only processes one image instead of a batch of images
  • Loading branch information
NeKoooo233 committed Apr 23, 2024
1 parent a0e1390 commit 70b4390
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 70b4390

Please sign in to comment.