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

Refactor dataset batch-size #9551

Merged
merged 1 commit into from
Sep 22, 2022
Merged

Refactor dataset batch-size #9551

merged 1 commit into from
Sep 22, 2022

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