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_grids for custom trained checkpoints #352

Merged
merged 4 commits into from
Mar 9, 2022
Merged

Conversation

zhiqwang
Copy link
Owner

@zhiqwang zhiqwang commented Mar 9, 2022

Seems that YOLOv5 will change the anchors setting when using the auto-anchor mechanism. So we use the following formula to compute the anchor_grids instead of attaching the anchor_grids via checkpoint_yolov5.yaml["anchors"]:

https://github.com/zhiqwang/yolov5-rt-stack/blob/71b7f1d159dc15dddd054d414302a8075fb85d7f/yolort/utils/update_module_state.py#L57-L61

@zhiqwang zhiqwang added the bug / fix Something isn't working label Mar 9, 2022
@codecov
Copy link

codecov bot commented Mar 9, 2022

Codecov Report

Merging #352 (7082df5) into main (0345ed6) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #352   +/-   ##
=======================================
  Coverage   95.90%   95.90%           
=======================================
  Files          11       11           
  Lines         781      781           
=======================================
  Hits          749      749           
  Misses         32       32           
Flag Coverage Δ
unittests 95.90% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0345ed6...7082df5. Read the comment docs.

@zhiqwang zhiqwang merged commit 71b7f1d into main Mar 9, 2022
@zhiqwang zhiqwang deleted the fix-anchors branch March 9, 2022 18:50
zhiqwang added a commit that referenced this pull request Mar 12, 2022
* Fix anchor_grids definition in load_from_ultralytics

* Apply pre-commit

* Minor fixes

* Minor fixes for docstring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug / fix Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant