-
-
Notifications
You must be signed in to change notification settings - Fork 15.9k
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
What is the purpose of anchor_t? #1310
Comments
Hello @Uoops, thank you for your interest in our work! Please visit our Custom Training Tutorial to get started, and see our Jupyter Notebook , Docker Image, and Google Cloud Quickstart Guide for example environments. If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you. If this is a custom model or data training question, please note Ultralytics does not provide free personal support. As a leader in vision ML and AI, we do offer professional consulting, from simple expert advice up to delivery of fully customized, end-to-end production solutions for our clients, such as:
For more information please visit https://www.ultralytics.com. |
@Uoops yes, we use Using |
hey @glenn-jocher , thanks for your answer for the purpose of anchor_t. But I kind of don't understand the logic and algorithm behind anchor_t, so would you mind give me a hint or share the algorithm name you're using here? I believe a good understanding of anchor_t, could help us to set right threshold here. I appreciate it. |
hey @glenn-jocher , I think I figured it out. |
@GorillaSX anchor_t is the anchor width and height multiple threshold used to select label-anchor matches when computing loss. |
hey @glenn-jocher thanks for your answer. I understood that. What confused me is those two lines code, r = t[:, :, 4:6] / anchors[:, None] # wh ratio
j = torch.max(r, 1. / r).max(2)[0] < model.hyp['anchor_t'] # compar But I think I figured it out at this time, still thanks. |
|
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. |
thank you for your reply, so how to get my dataset anchor_t threshold ? appreciate it |
❔Question
Thank you for sharing your work! It is the best YOLO related repo in python I have ever seen!
Can you explain what anchor_t means and what it does in the training process?
The reason is that I notice you use anchor_t instead of iou_t to generate the targets compared to your YOLOv3 work. I think iou_t is for the classification, can anchor_t does the same thing?
# Matches
r = t[:, :, 4:6] / anchors[:, None] # wh ratio
j = torch.max(r, 1. / r).max(2)[0] < model.hyp['anchor_t'] # compare
# j = wh_iou(anchors, t[:, 4:6]) > model.hyp['iou_t'] # iou(3,n)=wh_iou(anchors(3,2), gwh(n,2))
t = t[j] # filter
Additional context
The code above is copied from yolov5/utils/general.py line 565
The text was updated successfully, but these errors were encountered: