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

Update to ONNX opset 17 #10522

Merged
merged 1 commit into from
Dec 17, 2022
Merged

Update to ONNX opset 17 #10522

merged 1 commit into from
Dec 17, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Dec 17, 2022

Resolves #10505

Signed-off-by: Glenn Jocher [email protected]

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Updated default ONNX opset version to 17 for model exporting in yolov5.

πŸ“Š Key Changes

  • The default ONNX opset version has been upgraded from 12 to 17 in the export.py script.

🎯 Purpose & Impact

  • πŸ“ˆ Purpose: To align the exported YOLOv5 models with the latest ONNX standards, likely enabling improved performance and compatibility with modern ONNX-savvy tools and frameworks.
  • πŸš€ Impact: Users exporting their models to ONNX format will benefit from enhancements available in the newer opset, potentially leading to more efficient inference and broader support across various ONNX-compatible platforms.

Signed-off-by: Glenn Jocher <[email protected]>
@glenn-jocher glenn-jocher merged commit b2f94e8 into master Dec 17, 2022
@glenn-jocher glenn-jocher deleted the opset branch December 17, 2022 11:26
@jelena2712
Copy link

jelena2712 commented Dec 17, 2022

The error after this merge iwhen I try to convert pt to onnx is:
Unsupported ONNX opset version: 17

@glenn-jocher
Copy link
Member Author

@jelena2712 ah, you probably need to update onnx, i.e.:

pip install -U onnx

I suppose we should update requirements.txt to the min version supporting opset 17 now.

@glenn-jocher
Copy link
Member Author

@glenn-jocher
Copy link
Member Author

@jelena2712 good news πŸ˜ƒ! Your original issue may now be fixed βœ… in PR #10526. This PR updates onnx requirements to >=1.12.0

To receive this update:

  • Git – git pull from within your yolov5/ directory or git clone https://github.com/ultralytics/yolov5 again
  • PyTorch Hub – Force-reload model = torch.hub.load('ultralytics/yolov5', 'yolov5s', force_reload=True)
  • Notebooks – View updated notebooks Run on Gradient Open In Colab Open In Kaggle
  • Docker – sudo docker pull ultralytics/yolov5:latest to update your image Docker Pulls

Thank you for spotting this issue and informing us of the problem. Please let us know if this update resolves the issue for you, and feel free to inform us of any other issues you discover or feature requests that come to mind. Happy trainings with YOLOv5 πŸš€!

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.

ONNX dynamic shapes and opset
2 participants