Open Peterande opened 1 month ago
👋 Hello @Peterande, thank you for reaching out! We appreciate your interest in Ultralytics 🚀. This is an automated response, but rest assured, an Ultralytics engineer will assist you soon.
In the meantime, I recommend checking out our Docs for guidance on exporting models and integrating NMS (Non-Maximum Suppression).
To help us better understand the issue, could you provide a minimum reproducible example? This will aid in debugging.
For any further queries or detailed discussions, you can join our community:
Make sure to upgrade to the latest ultralytics
package in a Python>=3.8 environment with PyTorch>=1.8 using:
pip install -U ultralytics
You can execute YOLO in various environments with dependencies preinstalled:
If you see a green badge, all Ultralytics CI tests are passing. These tests ensure correct functionality across various platforms.
Stay tuned, and thank you for your patience! 😊
Additionally, what are the confidence threshold and IoU threshold values used for NMS in the official reported mAP?
IoU threshold is 0.6. During mAP calculation, a very low confidence threshold is applied (0.001) due to how mAP is calculated.
You can check the docs for default arguments used: https://docs.ultralytics.com/modes/val/#arguments-for-yolo-model-validation
If you read the docs, it says that the nms argument is only availabe for coreml. https://docs.ultralytics.com/modes/export/#export-formats
Thank you for your quick reply.
You're welcome! If you have any more questions, feel free to ask.
@glenn-jocher Hello, glenn. I still wonder why we coundn't export format ONNX with NMS suppot? According to ONNX Opset 11, there is NonMaxSuppression Op support. Wish for your reply.
Ultralytics does not have built in support for adding nms to the onnx models when exporting. You can open a feature request issue and continue from there.
@glenn-jocher Hello, glenn. I still wonder why we coundn't export format ONNX with NMS suppot? According to ONNX Opset 11, there is NonMaxSuppression Op support. Wish for your reply.
Try https://github.com/Peterande/D-FINE/blob/master/tools/deployment/export_yolo_w_nms
@Peterande thank you for the suggestion. We currently don't support exporting ONNX with NMS directly, but you can explore custom solutions like the one you mentioned.
@glenn-jocher Hello, glenn. I still wonder why we coundn't export format ONNX with NMS suppot? According to ONNX Opset 11, there is NonMaxSuppression Op support. Wish for your reply.
Try https://github.com/Peterande/D-FINE/blob/master/tools/deployment/export_yolo_w_nms
Has anyone checked? Does it work?
@Egorundel i recommend testing the solution in your environment to verify its compatibility. If you encounter issues, feel free to ask for further assistance.
Search before asking
Question
I used the following code to export my model with ONNX and enabled NMS:
path = model.export(format="onnx", nms=True)
However, the exported ONNX model doesn't seem to include NMS. Could you please let me know how to properly add NMS to the exported ONNX model? Additionally, what are the confidence threshold and IoU threshold values used for NMS in the official reported mAP?
Additional
No response