Skip to content

Conversation

Hitbee-dev
Copy link
Contributor

Hi, lyuwenyu

I found an issue during inference using the TensorRT model.

The problem occurs in the draw function at line 188, where text=str(lab[i].item()) is used, causing the labels and bounding boxes to not match correctly in the output.

To resolve this, I applied enumerate() to the box and aligned the index information of the box with the corresponding label.

Below are the images showing the results before and after the bug fix:
result

The left image shows the result before the bug fix.
The right image shows the result after the bug fix.

Looking at the label indexes marked in the images, you can see that before the fix, only a single label was applied incorrectly to multiple detections.

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants