-
-
Notifications
You must be signed in to change notification settings - Fork 16.6k
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
Val.py: No prediction on image follows in wrong AP calculation #8464
Labels
bug
Something isn't working
Comments
@UnglvKitDe hi, thank you for your feature suggestion on how to improve YOLOv5 🚀! Maybe this can improve our mAP, which is still slightly off from pycocotools on COCO. Can you please submit a PR with this fix and provide some before and after results on COCO? If you don't have COCO just submit the PR and we can test on our side. Thanks! Please see our ✅ Contributing Guide to get started. |
UnglvKitDe
added a commit
to UnglvKitDe/yolov5-1
that referenced
this issue
Jul 5, 2022
glenn-jocher
added a commit
that referenced
this issue
Jul 7, 2022
Co-authored-by: Glenn Jocher <[email protected]>
Shivvrat
pushed a commit
to Shivvrat/epic-yolov5
that referenced
this issue
Jul 12, 2022
Co-authored-by: Glenn Jocher <[email protected]>
ctjanuhowski
pushed a commit
to ctjanuhowski/yolov5
that referenced
this issue
Sep 8, 2022
Co-authored-by: Glenn Jocher <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Search before asking
YOLOv5 Component
Validation
Bug
The problem exists on images on which the model has not made a prediction.
Then the following lines are called:
yolov5/val.py
Lines 228 to 231 in 29d79a6
The problem now is that when the tcls array is calculated here:
yolov5/val.py
Line 264 in 29d79a6
, these labels are not taken into account. This results in a wrong AP calculation because the number of total positives is wrong. In the example shown below, the length of tcls should be 4, but it is only 1.
Environment
YOLOv5
torch 1.11 and torch 1.12
python 3.8
Minimal Reproducible Example
Additional
Possible Solutionin line 230 in val.py:
stats.append((correct, *torch.zeros((2, 0), device=device), labels[:, 0]))
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: