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

Refactor models/export.py arguments #3564

Merged
merged 3 commits into from
Jun 9, 2021
Merged

Refactor models/export.py arguments #3564

merged 3 commits into from
Jun 9, 2021

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Jun 9, 2021

@SkalskiP @kalenmike @fcakyon PR allows export() to be python-callable now.

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Refactoring YOLOv5 model export code for better readability and maintainability.

πŸ“Š Key Changes

  • Refactored command-line interface into a standalone export function with clearly defined arguments.
  • Cleaned up the argument handling by removing argument parsing from inside the exported model code to the main block.
  • Ensured assertions and variables are correctly adapted to the new function parameters.
  • Improved readability by organizing the code and removing excessive comments.

🎯 Purpose & Impact

  • The refactor facilitates code use and maintenance, making it easier for developers to use export features programmatically. πŸ› οΈ
  • It enhances code clarity for new contributors or users trying to understand the export process. πŸ‘€
  • There should be no direct performance impact on model export, but the user experience may improve due to cleaner code organization. πŸ“ˆ

@glenn-jocher
Copy link
Member Author

/rebase

@glenn-jocher glenn-jocher merged commit 0e5cfdb into master Jun 9, 2021
@glenn-jocher glenn-jocher deleted the refactor_export branch June 9, 2021 20:43
Lechtr pushed a commit to Lechtr/yolov5 that referenced this pull request Jul 20, 2021
* Refactor models/export.py arguments

* cleanup

* cleanup

(cherry picked from commit 0e5cfdb)
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* Refactor models/export.py arguments

* cleanup

* cleanup
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.

None yet

1 participant