Skip to content

Commit 2b88d5d

Browse files
authored
Merge pull request #276 from NeKoooo233/patch-1
Update export_onnx.py
2 parents 64878ac + 70b4390 commit 2b88d5d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

rtdetr_pytorch/tools/export_onnx.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)