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 detect.py #3087

Merged
merged 2 commits into from
May 9, 2021
Merged

Update detect.py #3087

merged 2 commits into from
May 9, 2021

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented May 9, 2021

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Refinement of detection code in YOLOv5 for better readability and maintenance.

πŸ“Š Key Changes

  • Removed unused import: from numpy import random.
  • Refactored the string formatting for the output to use f-strings for consistency.
  • Removed an unnecessary blank line that does not affect functionality.

🎯 Purpose & Impact

  • 🧹 Enhanced Code Clarity: Dropping unnecessary imports and unused code keeps the codebase cleaner and easier to understand.
  • πŸš€ Code Consistency: The use of f-strings throughout the codebase provides a consistent way to handle string formatting.
  • πŸ“‰ Potential Maintenance Benefits: Smaller, more maintainable code may lead to fewer bugs and easier updates.

Non-expert users won't notice any explicit changes in functionality, but such code improvements contribute to a more robust and efficient application in the long run. πŸ› οΈ

@glenn-jocher glenn-jocher merged commit 91547ed into master May 9, 2021
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-5 branch May 9, 2021 11:01
KMint1819 pushed a commit to KMint1819/yolov5 that referenced this pull request May 12, 2021
* Update detect.py

* Update detect.py
Lechtr pushed a commit to Lechtr/yolov5 that referenced this pull request Jul 20, 2021
* Update detect.py

* Update detect.py

(cherry picked from commit 91547ed)
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* Update detect.py

* Update detect.py
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.

None yet

1 participant