Skip to content

Conversation

glenn-jocher
Copy link
Member

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

Precursor to #9542

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Refactoring batch size assignment in image classification, object detection, and segmentation scripts.

πŸ“Š Key Changes

  • Unified the batch size (bs) assignment for webcam and non-webcam sources in predict.py, detect.py, and segment/predict.py.
  • Removed redundant batch size setting lines for non-webcam sources.

🎯 Purpose & Impact

  • 🧹 Simplifies Code: Eliminates the need to set the batch size separately within conditional blocks, making the code more maintainable.
  • βœ… Consistency Across Modes: Ensures batch size is consistently defined whether input is coming from a webcam or individual images.
  • πŸ‘₯ User Experience: Impacts the users by potentially providing more efficient processing and a cleaner, more understandable codebase.

@glenn-jocher glenn-jocher merged commit b25d5a7 into master Sep 22, 2022
@glenn-jocher glenn-jocher deleted the update/bs branch September 22, 2022 21:23
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