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

Make the anchor configuration mechanism more adaptable. #170

Closed
zhiqwang opened this issue Sep 22, 2021 · 0 comments · Fixed by #202
Closed

Make the anchor configuration mechanism more adaptable. #170

zhiqwang opened this issue Sep 22, 2021 · 0 comments · Fixed by #202
Assignees
Labels
bug / fix Something isn't working enhancement New feature or request

Comments

@zhiqwang
Copy link
Owner

zhiqwang commented Sep 22, 2021

🐛 Bug

It seems that yolort only supports anchors of length 3. For example, it will raise a RuntimeError if we directly call the anchors of length 4 that VOC uses by default. Maybe we should let the anchor configuration mechanism of yolort be more adaptable.

To Reproduce (REQUIRED)

from yolort.models import YOLOv5

# Downloaded from https://github.com/ultralytics/yolov5/releases/download/v5.0/yolov5s-VOC.pt
ckpt_path_voc = 'yolov5s-VOC.pt'

model = YOLOv5.load_from_yolov5(ckpt_path_voc, score_thresh=0.25, version="r4.0")
model.eval()

img_path = 'test/assets/bus.jpg'
predictions = model.predict(img_path)
@zhiqwang zhiqwang added bug / fix Something isn't working enhancement New feature or request labels Sep 22, 2021
@zhiqwang zhiqwang self-assigned this Sep 22, 2021
zhiqwang added a commit that referenced this issue Oct 20, 2021
zhiqwang added a commit that referenced this issue Oct 20, 2021
zhiqwang added a commit that referenced this issue Oct 20, 2021
* Add unit-test for #170

* Fixing unit-test

* Fix initializing anchor_grids in load_from_ultralytics
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 enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant