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

Faster threaded plots #9144

Closed
wants to merge 3 commits into from
Closed

Faster threaded plots #9144

wants to merge 3 commits into from

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Aug 25, 2022

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Refactor threading and minor plotting fixes in YOLOv5's utility modules.

πŸ“Š Key Changes

  • Moved the threaded decorator function from general.py to __init__.py to centralize its definition.
  • Added threaded decorator to several plotting functions within metrics.py and plots.py to allow them to run in separate threads.
  • Changed plt.title to fig.title and plt.close to fig.close in plotting functions to properly reference figures and close them.

🎯 Purpose & Impact

  • By centralizing the threaded definition, the codebase becomes cleaner and reduces redundancy.
  • Multithreading the plotting functions can improve the overall efficiency by allowing plots to be generated without blocking the main execution thread.
  • Understanding and maintaining plots become easier with clearer references to figures.
  • Users may experience faster plotting and analysis when working with YOLOv5's visual tools, especially when dealing with large datasets or complex visualizations. πŸš€

@glenn-jocher glenn-jocher self-assigned this Aug 25, 2022
@glenn-jocher
Copy link
Member Author

Superseded by #9154

@glenn-jocher glenn-jocher deleted the threaded/plots branch August 25, 2022 12:34
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.

1 participant