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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PR curve #1428

Merged
merged 3 commits into from
Nov 17, 2020
Merged

Update PR curve #1428

merged 3 commits into from
Nov 17, 2020

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Nov 17, 2020

This PR update Precision-Recall curve plotting per user requests. PR curves are now colored with mAP shown per class for datasets with up to 20 classes. Larger datasets like COCO plot as grey lines per class, with the same all-class mAP displayed.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Enhanced precision-recall curve plotting and maintenance improvements in YOLOv5 testing script.

📊 Key Changes

  • Updated ap_per_class function to accept save_dir and names parameters instead of fname.
  • Added plot_pr_curve function for improved plotting with legend adjustments for a cleaner presentation.
  • Modified import comments to reference utils.plots instead of utils.general in various plot functions.
  • Streamlined file retrieval in plot_results, using Path objects and eliminating commented-out code.

🎯 Purpose & Impact

  • Clearer Visualization: Precision-recall curves can now display individual class APs in the legend, aiding in more detailed analysis.
  • Code Organization: Adjusting import comments helps maintain correct module references, reducing confusion.
  • File Handling Enhancements: Improved file handling with Path objects for better compatibility and readability in plotting functions.
  • User Experience: These changes may lead to a more intuitive understanding of model performance for developers and users analyzing YOLOv5 test results.

@glenn-jocher
Copy link
Member Author

<= 20 classes

precision_recall_curve (2)

> 20 classes

precision_recall_curve

@yasindagasan
Copy link

very nice!

burglarhobbit pushed a commit to burglarhobbit/yolov5 that referenced this pull request Jan 1, 2021
* Update PR curve

* legend outside

* list(Path().glob())
KMint1819 pushed a commit to KMint1819/yolov5 that referenced this pull request May 12, 2021
* Update PR curve

* legend outside

* list(Path().glob())
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* Update PR curve

* legend outside

* list(Path().glob())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants