-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
tobj bug #1799
Comments
@Gaondong yes that is correct. Duplicate of https://docs.ultralytics.com/yolov5/tutorials/pytorch_hub_model_loading05 |
OK, but I have a question, should we either remove the repeat indices in build_targets or add the repeat indices loss in objectness loss to calculate all matched targets ? Thanks! |
@Gaondong it's an open question really. The current implementation is obviously working well, the real question is if there is an alternative implementation that might work better. cls and box loss apply losses for all anchor-target matches, whereas obj loss operates differently, it currently only applies a single loss if multiple matches are made. We could write code to treat obj similarly to cls and box, though I don't know what effect that might have (i.e. could lead to higher rate of FPs without lowering the obj hyperparameter gain down), as typically one target will have a high multiplicity (especially in YOLOv5) with perhaps 3-6 anchors matching it. |
@Gaondong but to be clear, the multiple indices are no harm, they are simply assigning multiple positives to the same location, i.e. it's the same as if I write: i = [0, 0, 0]
x[i] = [1.0, 1.0, 1.0] the result will just be that x[0] = 1.0 |
@XHBrain see above comments also regarding objectness. Alternative idea would be to apply all losses the same way cls and box are treated. |
Yes! This repo performance is very impressive. Thanks for your reply. |
👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs. Access additional YOLOv3 🚀 resources:
Access additional Ultralytics ⚡ resources:
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed! Thank you for your contributions to YOLOv3 🚀 and Vision AI ⭐! |
@Gaondong Thank you for the kind words! Regarding your question, the mAP@0.5 calculated by |
Objectness
Hi:
IN this repo, An anchor is probably matched to not just one Groundtruth in crowd scence, so the [b, a, gj, gi] could repeat and repeat assign in tobj because do not remove the repeat [b, a, gj, gi] in build target.
tobj[b, a, gj, gi] = (1.0 - model.gr) + model.gr * iou.detach().clamp(0).type(tobj.dtype) # iou ratio
The text was updated successfully, but these errors were encountered: