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 hubconf.py for unified loading #3005

Merged
merged 1 commit into from
May 1, 2021
Merged

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented May 1, 2021

This improves hubconf.py simplicity by creating a single channel for all tasks. All model loading now passes through one single create() function.

As a plus this also avoids building models when loading locally, which should save time and reduce verbosity for that workflow.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Refinement of model creation and loading functions in Ultralytics YOLOv5.

📊 Key Changes

  • Defaulted channels to 3 and classes to 80 in the create function to align with typical YOLOv5 usage.
  • Ensured autoshape defaults to True and verbose to True in the create function.
  • Updated fname to be a Path object, improving file path handling.
  • Simplified the custom model function by utilizing the create function for loading models.

🎯 Purpose & Impact

  • 📈 Streamlines the model creation process, reducing the risk of incorrect usage by providing sensible defaults.
  • 🛠️ Enhances file path manipulation by using the Path object for better cross-platform support.
  • 🔥 Removes redundant code, making it easier to maintain and understand the codebase, which could lead to fewer bugs.
  • 🌐 Simplifies the process for users to load custom models using the same interface as predefined models, making the library more user-friendly.

@glenn-jocher glenn-jocher self-assigned this May 1, 2021
@glenn-jocher glenn-jocher added the enhancement New feature or request label May 1, 2021
@glenn-jocher glenn-jocher merged commit c1a44ed into master May 1, 2021
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-4 branch May 1, 2021 15:35
@glenn-jocher
Copy link
Member Author

@kalenmike this should improve our on-demand results now slightly.

glenn-jocher added a commit that referenced this pull request May 1, 2021
Bug fix for problem introduced in #3005
@glenn-jocher glenn-jocher mentioned this pull request May 1, 2021
KMint1819 pushed a commit to KMint1819/yolov5 that referenced this pull request May 12, 2021
danny-schwartz7 pushed a commit to danny-schwartz7/yolov5 that referenced this pull request May 22, 2021
Lechtr pushed a commit to Lechtr/yolov5 that referenced this pull request Jul 20, 2021
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant