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

Fix anchor incorrectly initialized #8891

Merged
merged 4 commits into from
Aug 8, 2022

Conversation

YellowAndGreen
Copy link
Contributor

@YellowAndGreen YellowAndGreen commented Aug 7, 2022

Using --noautoanchor and --evolve simultaneously leads to anchor incorrectly initialized. --noautoanchor denotes anchors don't need to evolve, thus removing anchors from hyp will fix it.

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Improved YOLOv5 model customization with auto-anchor disable option.

πŸ“Š Key Changes

  • Added support to disable automatic anchor adjustment during training when specified by a new command-line option.

🎯 Purpose & Impact

  • Purpose: Allows users more control over anchor settings during training by introducing the option to turn off the automatic adjustment of anchors, a key part of the YOLOv5 detection algorithm.
  • Impact: Users who are experienced with the YOLO architecture or those wanting to experiment with fixed anchor sizes can potentially achieve better performance on custom datasets. This change enhances the flexibility of the model training process.

Using --noautoanchor and --evolve simultaneously leads to anchor incorrectly initialized. --noautoanchor denotes anchors don't need to evolve, thus removing anchors from hyp will fix it.
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ‘‹ Hello @YellowAndGreen, thank you for submitting a YOLOv5 πŸš€ PR! To allow your work to be integrated as seamlessly as possible, we advise you to:

  • βœ… Verify your PR is up-to-date with upstream/master. If your PR is behind upstream/master an automatic GitHub Actions merge may be attempted by writing /rebase in a new comment, or by running the following code, replacing 'feature' with the name of your local branch:
git remote add upstream https://github.com/ultralytics/yolov5.git
git fetch upstream
# git checkout feature  # <--- replace 'feature' with local branch name
git merge upstream/master
git push -u origin -f
  • βœ… Verify all Continuous Integration (CI) checks are passing.
  • βœ… Reduce changes to the absolute minimum required for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." -Bruce Lee

@glenn-jocher glenn-jocher merged commit c962db2 into ultralytics:master Aug 8, 2022
@glenn-jocher
Copy link
Member

@YellowAndGreen PR is merged. Thank you for your contributions to YOLOv5 πŸš€ and Vision AI ⭐

ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
* Fix anchor incorrectly initialized

Using --noautoanchor and --evolve simultaneously leads to anchor incorrectly initialized. --noautoanchor denotes anchors don't need to evolve, thus removing anchors from hyp will fix it.

* Update train.py

* Update train.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
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

2 participants