Skip to content

Conversation

glenn-jocher
Copy link
Member

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

May resolve #9442

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

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Refinement of inference code path and logging in YOLOv5.

πŸ“Š Key Changes

  • Simplified argument passing by specifying augment keyword explicitly during model inference.
  • Ensured shape is always a tuple to prevent potential type-related errors.
  • Switched from using the built-in print function to a LOGGER.info for more consistent and configurable logging across the module.

🎯 Purpose & Impact

  • Cleaner Code: Specifying augment explicitly as a keyword argument adds clarity to the function call which can reduce future bugs and make the code easier to understand.
  • Type Safety: Converting the shape to a tuple enforces consistency in datatype, which enhances code stability.
  • Improved Logging: Adopting LOGGER.info over print paves the way for more advanced logging features such as logging levels, timestamps, and log file management, resulting in better debugging and monitoring experiences for users.

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

Typo in BaseModel._forward_once

1 participant