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

Doubt about official_nms #14

Closed
moooises opened this issue Jan 10, 2023 · 1 comment
Closed

Doubt about official_nms #14

moooises opened this issue Jan 10, 2023 · 1 comment

Comments

@moooises
Copy link

Hello,
I'm studying how the export to .onnx and .trt works and found your code that export the result of a .onnx file to a format that Yolov7 can read. It was very helpful, but I have some doubts about the nms (non maximum suppression).

At first, I found that the detection boxes didn't display properly unless I set official_nms to True, I found an issue in another project that said that too, but looking at the code It calls a nms function from the files yolov7.utils when official_nms is set to False.

So, I would like to ask what is the purpose and meaning of the variable official_nms in the code.
I still have doubts about it, but I have seen that you can add nms when you export a .pt file to .onnx files (You can see it in the YoloV7 official repository, in the export section ). Is the nms function used to apply nms when you don't apply it at the moment of exporting to .onnx or has any other purpose?

Thank you so much.

@ibaiGorordo
Copy link
Owner

Yes, as you mention, the nms function is only necessary when no postprocessing is implemented into the model. The issue is that there are different versions of how the postprocessing is implemented into the model. If you use the model with postprocessing exported from the official repository you will meed to set official_nms to true because the output data has a slightly different format.

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

No branches or pull requests

2 participants