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 export.py Usage examples #9609

Merged
merged 3 commits into from
Sep 26, 2022
Merged

Update export.py Usage examples #9609

merged 3 commits into from
Sep 26, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Sep 26, 2022

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

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Refactored export.py to simplify post-export inference and validation command recommendations.

📊 Key Changes

  • Streamlined instance checks for model types (ClassificationModel, DetectionModel, SegmentationModel) using tuple unpacking.
  • Removed redundant code by consolidating the detect and predict command construction.
  • Updated log messages to be more concise and include any additional settings such as --half.

🎯 Purpose & Impact

  • Purpose: The refactoring increases code readability and maintainability by reducing complexity and repetition.
  • Impact: Users will see clearer and simpler recommendations for inference and validation commands after exporting models, facilitating easier and error-free usage. Developers will benefit from cleaner code that's easier to understand and modify.

Signed-off-by: Glenn Jocher <[email protected]>
Signed-off-by: Glenn Jocher <[email protected]>
@glenn-jocher glenn-jocher merged commit 6b2c9d1 into master Sep 26, 2022
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-2 branch September 26, 2022 18:46
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