Skip to content

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Apr 20, 2022

May resolve #7475

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

This PR enhances model loading and validation checks for the YOLOv5 object detection suite.

πŸ“Š Key Changes

  • Improved attribute assignment consistency when creating an ensemble of models.
  • Added an assertion to verify that all models in an ensemble have the same number of classes.
  • Updated validation code to use the correct attribute for the number of classes when checking model-data compatibility.

🎯 Purpose & Impact

  • 🧩 These changes ensure more robust and error-proof model ensembling by standardizing key attributes across all models in the ensemble.
  • 🚦 The new assertion prevents potential errors due to class count mismatches in ensemble models, enhancing the reliability of the system.
  • πŸ•΅οΈβ€β™‚οΈ By fixing the validation check in val.py, users are less likely to encounter issues when their model’s class count does not match the dataset’s class count, improving user experience and model accuracy.

@glenn-jocher glenn-jocher self-assigned this Apr 20, 2022
@glenn-jocher
Copy link
Member Author

Verified working:
Screen Shot 2022-04-19 at 9 14 05 PM

@glenn-jocher glenn-jocher merged commit 3f3852e into master Apr 20, 2022
@glenn-jocher glenn-jocher deleted the fix/ensemble branch April 20, 2022 04:15
@glenn-jocher glenn-jocher mentioned this pull request Apr 20, 2022
1 task
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
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.

Error Ensemble
1 participant