Skip to content

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Sep 16, 2022

Resolve double-printing in some environments

Signed-off-by: Glenn Jocher [email protected]

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Refinement of results display in the YOLOv5 model.

πŸ“Š Key Changes

  • Replaced display() method with _run() for internal operations, ensuring a more standard structure.
  • The string assembly process in the image information output is refined for clarity.
  • Moved the pretty-printing (pprint) logic out of the _run() method for better separation of concerns.
  • Enhanced code readability and maintainability by removing redundant code and clarifying method responsibilities.
  • Improved output formatting, removing trailing characters and organizing the output.
  • Modified class dunder methods (__str__, __repr__) to better represent the YOLOv5 result objects.

🎯 Purpose & Impact

  • 🎨 Improves the quality and readability of the output, making it more user-friendly.
  • πŸ‘· Automatic string cleaning and formatting tidy up output for users and logs.
  • 🧩 Separates visual display logic from result processing functions, allowing easier updates and maintenance of the codebase.
  • πŸ“ˆ Potential impact includes easier debugging, enhanced interpretation of model outputs, and a cleaner interface for interacting with the model's detections.

@glenn-jocher glenn-jocher self-assigned this Sep 16, 2022
Signed-off-by: Glenn Jocher <[email protected]>
Signed-off-by: Glenn Jocher <[email protected]>
@glenn-jocher glenn-jocher merged commit fe10b4a into master Sep 16, 2022
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-1 branch September 16, 2022 16:36
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