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

Reject webcam inference on Colab/Kaggle #8209

Merged
merged 3 commits into from
Jun 14, 2022
Merged

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Jun 14, 2022

Improve user error understanding for #8180

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Enhanced environment compatibility checks for webcam usage in yolov5 data loaders.

πŸ“Š Key Changes

  • Added is_colab and is_kaggle utility functions.
  • Included assertions to prevent usage of a local webcam source (--source 0) in unsupported environments like Colab or Kaggle.

🎯 Purpose & Impact

  • 🎭 Ensure Compatibility: Prevents users from attempting to use webcams in environments where it's not supported, avoiding confusion and potential errors.
  • ⚠️ User-Friendly Errors: Provides clear error messages prompting users to run their commands in a local environment when appropriate.
  • πŸ› οΈ Streamlined Experience: Promotes a smoother user experience by guiding users away from certain functionalities that won't work in specific environments like Google Colab or Kaggle notebooks.

Improve user error understanding for #8180
@glenn-jocher glenn-jocher linked an issue Jun 14, 2022 that may be closed by this pull request
2 tasks
@glenn-jocher glenn-jocher self-assigned this Jun 14, 2022
@glenn-jocher glenn-jocher merged commit 75bbaa8 into master Jun 14, 2022
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-1 branch June 14, 2022 12:28
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
* Reject webcam inference on Colab/Kaggle

Improve user error understanding for ultralytics#8180

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* cleanup

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

AssertionError: 1/1: 0... Failed to open 0
1 participant