You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the YOLOv5 issues and found no similar bug report.
YOLOv5 Component
Training
Bug
# utils/metrics.pydeffitness(x):
# Model fitness as a weighted combination of metricsw= [0.0, 0.0, 0.1, 0.9] # weights for [P, R, [email protected], [email protected]:0.95]P=x[0][0]
R=x[0][1]
map50=x[0][2]
map5095=x[0][12]
return (np.array([[P,R,map50,map5095]])*w).sum(1)
The fitness function in utils/metrics.py determines if it is the best checkpoint by calculating the weighted sum of the four metrics, but the code seems to have x[:, :4] standing for [P, R, [email protected],[email protected]] instead of the expected [P, R, [email protected],[email protected]:0.95]
Environment
None
Minimal Reproducible Example
None
Additional
No response
Are you willing to submit a PR?
Yes I'd like to help by submitting a PR!
The text was updated successfully, but these errors were encountered:
👋 Hello @thgpddl, thank you for your interest in YOLOv5 🚀!
It looks like you've come across a potential issue with the fitness function in the training component. If this is indeed a 🐛 Bug Report, could you please provide a minimum reproducible example? This will be incredibly helpful for us to diagnose and address the issue effectively.
An Ultralytics engineer will review your issue soon and provide further assistance. In the meantime, make sure you've followed all the recommended steps in the installation guide, and that your environment meets the minimum requirements with Python, PyTorch, and any other dependencies correctly installed.
YOLOv5 is designed to run in various environments like Notebooks with free GPU, Google Cloud, Amazon Deep Learning AMIs, and Docker. Ensure your current setup aligns with one of these configurations to prevent environment-specific issues.
Thank you for your patience and for helping us improve YOLOv5! 😊
Thank you for pointing this out. The fitness function should indeed calculate the weighted sum of the metrics as [P, R, mAP @thgpddl.5, [email protected]:0.95], with the weights specified as [0.0, 0.0, 0.1, 0.9]. Ensure that your indexing for these metrics is correct. If you are still encountering issues, please verify that you are using the latest version of YOLOv5 from the repository. If the problem persists, feel free to submit a pull request with your proposed fix.
Search before asking
YOLOv5 Component
Training
Bug
The fitness function in utils/metrics.py determines if it is the best checkpoint by calculating the weighted sum of the four metrics, but the code seems to have x[:, :4] standing for [P, R, [email protected],[email protected]] instead of the expected [P, R, [email protected],[email protected]:0.95]
Environment
None
Minimal Reproducible Example
None
Additional
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: