Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed a bug with inconsistent inference results #1468

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

stbidtf
Copy link
Contributor

@stbidtf stbidtf commented Mar 26, 2024

对于同一张图循环推理时,如果检测的目标过多,两个目标的置信度conf可能相等,则根据conf排序时有可能导致排序的不稳定性,在进行一下步的求iou会出现不同的结果。所以要保证tensorrt并行推理结果顺序不同时,排序后的结果一致,不会出现排序的不稳定性

我用一张图的循环4次推理结果图,两两对比有什么区别,发现有不同的像素
image
通过固定每次conf相等时的检测结果,结果就保持一致了
image

@stbidtf
Copy link
Contributor Author

stbidtf commented Mar 26, 2024

我删除了原来的,重新fork了一下。只加了那三行,其他的都没动

@wang-xinyu
Copy link
Owner

这次OK了 👍

@wang-xinyu wang-xinyu merged commit 64297a2 into wang-xinyu:master Mar 26, 2024
1 check passed
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.

None yet

2 participants