Fixed a bug with inconsistent inference results #1468
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
对于同一张图循环推理时,如果检测的目标过多,两个目标的置信度conf可能相等,则根据conf排序时有可能导致排序的不稳定性,在进行一下步的求iou会出现不同的结果。所以要保证tensorrt并行推理结果顺序不同时,排序后的结果一致,不会出现排序的不稳定性
我用一张图的循环4次推理结果图,两两对比有什么区别,发现有不同的像素
通过固定每次conf相等时的检测结果,结果就保持一致了