-
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
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
Export.py need train mode export for cormel model to add NMS and decode layer #9667
Comments
👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs. Access additional YOLOv5 🚀 resources:
Access additional Ultralytics ⚡ resources:
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed! Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐! |
@junmcenroe hi there! Thanks for reaching out. It's great to see your interest in improving the export process. 😊 To clarify, the removal of .train() mode from export.py was intentional, as it wasn't used during inference and was causing inconsistencies in the exported models. To address your requirement for the decode layer and NMS, you can customize your model by modifying the YOLO layer directly in the model.yaml configuration file before exporting. By doing this, you can include the desired layers without the need for the -train mode. For more information, you can refer to our documentation at https://docs.ultralytics.com/yolov5/ for additional guidance on customizing the export process. I appreciate your willingness to submit a PR! If you have any further questions or need assistance while working on the PR, feel free to reach out. We're here to help! |
Hi glenn-josher Thanks for your supplement comment. As of today, your original export.py can export cormel formats with NMS. So no issue for me. |
@junmcenroe thank you for your kind words! The YOLO community and the Ultralytics team have indeed put in a lot of effort to enhance the YOLOv5 repository and we're glad to hear that our work has been helpful to you. If you have any further questions or need support in the future, please don't hesitate to reach out. Your feedback and contributions are highly valued. Keep up the great work, and happy coding! |
Search before asking
YOLOv5 Component
Export
Bug
I had had been converted with export.py with -train mode to convert cormel model. after exported .mlmodel, I added decode layer and NMS. But after eliminate -train mode of export.py, I found the following error.
/usr/local/lib/python3.7/dist-packages/coremltools/models/neural_network/builder.py in set_output(self, output_names, output_dims)
529 spec = self.spec
530 for idx, dim in enumerate(output_dims):
--> 531 spec.description.output[idx].type.multiArrayType.ClearField("shape")
532 spec.description.output[idx].type.multiArrayType.shape.extend(dim)
533 spec.description.output[
IndexError: list index (1) out of range
Exported model shape with -train model and eval mode are different. So I modify the export.py with train mode, no failure found.
On "Remove .train() mode exports #9429", this train() mode removed. but Could you add train() mode to export.py ?
Environment
Google Colab
Minimal Reproducible Example
No response
Additional
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: