Skip to content

Update to ONNX opset 17#10522

Merged
glenn-jocher merged 1 commit intomasterfrom
opset
Dec 17, 2022
Merged

Update to ONNX opset 17#10522
glenn-jocher merged 1 commit intomasterfrom
opset

Conversation

@glenn-jocher
Copy link
Copy Markdown
Member

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

Resolves #10505

Signed-off-by: Glenn Jocher glenn.jocher@ultralytics.com

🛠️ 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 <glenn.jocher@ultralytics.com>
@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
Copy Markdown

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
Copy Markdown
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
Copy Markdown
Member Author

@glenn-jocher
Copy link
Copy Markdown
Member Author

glenn-jocher commented Dec 18, 2022

@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:

  • Gitgit 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
  • Dockersudo 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