-
-
Notifications
You must be signed in to change notification settings - Fork 16.5k
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
Guidance/Libary Needed for ONNX Model Post-Processing #13436
Comments
👋 Hello @Throws100, thank you for your interest in YOLOv5 🚀! Your question about ONNX model post-processing is noted. This is an automated response, but an Ultralytics engineer will assist you further as soon as possible 😊. For now, if this is a 🐛 Bug Report, please provide a minimum reproducible example to help us debug it. This should include any relevant code snippets and a description of inputs and outputs. If this is a custom training ❓ Question, please provide as much detail as possible, including examples of outputs and specific steps you've followed. RequirementsYOLOv5 requires Python>=3.8.0 with all dependencies correctly installed. To ensure your environment is up to date, you can start by cloning the YOLOv5 repository, navigating to it, and installing required packages as follows: git clone https://github.com/ultralytics/yolov5 # clone
cd yolov5
pip install -r requirements.txt # install EnvironmentsYOLOv5 models can be executed in various verified environments, including free GPU notebooks, cloud platforms, and Docker containers. These environments include all necessary prerequisites like Python, CUDA, CUDNN, and PyTorch preinstalled. StatusOur continuous integration (CI) tests verify the correct operation of core YOLOv5 components such as training, validation, inference, export, and benchmarking on multiple platforms daily. If an issue is related to one of these workflows, rest assured our engineers will investigate thoroughly. Thank you for your patience while we review your query further! 🚀 |
@Throws100 thank you for your query, Seb. For YOLOv5 ONNX post-processing, you’ll need to handle the post-processing manually, as ONNX outputs raw model predictions. This typically includes applying non-maximum suppression (NMS), decoding bounding box coordinates, and reshaping logits. Libraries like ONNX Runtime or OpenCV’s DNN module might help. Refer to the following for a detailed example: If you’re still encountering issues, you might want to explore discussions or examples from community repositories like Hexmagic/ONNX-yolov5. Let us know if further clarification is needed! |
Thanks I managed to get my custom onnx model to work I have used this: https://github.com/robinZhao/object-detect-java |
@Throws100 you're welcome! Glad to hear you got your ONNX model working. The credit goes to the YOLO community and resources like the one you mentioned for providing such valuable tools. Happy coding! |
Search before asking
Question
I've trained a custom YOLOv5 model that performs well, and I've exported it as an ONNX file. However, the output from the ONNX model differs from my expectations. After researching, I understand that ONNX outputs require additional post-processing to match the results seen with the PyTorch model.
Unfortunately, I'm struggling to implement this post-processing manually. Since deploying models in other languages is a common task, I was wondering if anyone could point me to an existing component or library that handles YOLOv5 ONNX post-processing.
Any guidance or resources would be greatly appreciated!
Thank you, Seb
Additional
No response
The text was updated successfully, but these errors were encountered: