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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation on aspect ratio threshold #2521

Closed
ml5ah opened this issue Mar 18, 2021 · 7 comments 路 Fixed by #5556
Closed

Documentation on aspect ratio threshold #2521

ml5ah opened this issue Mar 18, 2021 · 7 comments 路 Fixed by #5556
Labels
enhancement New feature or request Stale

Comments

@ml5ah
Copy link
Contributor

ml5ah commented Mar 18, 2021

馃殌 Feature

Hi @glenn-jocher
Thanks for the amazing work with yolov5
This feature is related to documentation on the aspect ratio threshold in utils/datasets.py that is used for custom training.

Motivation

I have been working on object detection projects and using YOLOv5 frequently for some of the training tasks at hand. However, most of the time, mAP performance did not match my expectations set seeing the mAP scores on the COCO dataset. My dataset has mostly rectangular objects, and about 10-15% of them being either very wide or very tall. Going through one of the issues on GitHub, I realized that there is an aspect ratio threshold that discards all objects having an aspect ratio > 20 by default.

Pitch

It would be great to make this clear in the train custom dataset (https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data)
so that we can adjust this parameter from the get go during experimentation. Thanks for the help!

@ml5ah ml5ah added the enhancement New feature or request label Mar 18, 2021
@glenn-jocher
Copy link
Member

@ml5ah thanks for the feedback! Yes perhaps box candidate thresholds should be included in the hyperparameters used for training to make them easier to modify and easier to spot. Can you submit a PR for this to help others? I will add a TODO here to update the Custom Training Tutorial with this information.

In general you should also be aware that the default architecture is not optimized for high aspect ratio objects, and the models would benefit from changes targeted specifically to this domain, which may include elongation of the convolution kernels in the C3 layers, i.e. perhaps alternate 5x1 and 1x5 convolutions in place of, or in addition to, the current 3x3 and 1x1 sequences.

TODO: Update Train Custom Data Tutorial with label candidate criteria section, as well as NMS settings section.

@cszer
Copy link

cszer commented Mar 27, 2021

Very good note 馃憤馃憤

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@MrinalJain17
Copy link
Contributor

@glenn-jocher Can we revive this issue? I'd be happy to draft a PR.

@ml5ah
Copy link
Contributor Author

ml5ah commented Nov 8, 2021

@MrinalJain17 could yo please review this PR? #2869
@glenn-jocher thank you!

@MrinalJain17
Copy link
Contributor

@ml5ah Oh, I didn't realize there was already a PR on this. Thanks of the info. Hope this feature gets merged soon.

@glenn-jocher glenn-jocher removed the TODO label Jan 6, 2022
@glenn-jocher
Copy link
Member

TODO removed, default AR threshold increased to 100 in #5556

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants