Skip to content

Faster threaded plots#9144

Closed
glenn-jocher wants to merge 3 commits intomasterfrom
threaded/plots
Closed

Faster threaded plots#9144
glenn-jocher wants to merge 3 commits intomasterfrom
threaded/plots

Conversation

@glenn-jocher
Copy link
Copy Markdown
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
Copy Markdown
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