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

On-demand pycocotools pip install #3547

Merged
merged 1 commit into from
Jun 9, 2021

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Jun 9, 2021

Comments pycocotools from requirements.txt and instead scans and installs the package on demand when needed in test.py.

Possible fix for #3543

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Updates to dependency management and conditional requirement checks in YOLOv5's various scripts.

📊 Key Changes

  • 🧹 Removed pycocotools from the excluded list in check_requirements in detect.py, hubconf.py, test.py, and train.py.
  • 🚫 Commented out pycocotools in requirements.txt, changing its installation from mandatory to optional.
  • ✅ Added a dynamic requirement check for pycocotools within the test.py script before using it.

🎯 Purpose & Impact

  • Simpler Installation: The removal of pycocotools from the default requirements reduces installation complexity for users who do not need COCO mAP functionality, making it lighter and potentially avoiding compatibility issues.
  • Conditional Requirement: By checking for pycocotools only where it's necessary (test.py), the impact is that only users performing COCO evaluation will need to install this dependency.
  • User Flexibility: This approach provides more flexibility for users, only prompting for installation of additional packages when they are needed for specific functionality.

@glenn-jocher glenn-jocher linked an issue Jun 9, 2021 that may be closed by this pull request
@glenn-jocher glenn-jocher merged commit ef0b5c9 into master Jun 9, 2021
@glenn-jocher glenn-jocher deleted the feature/pycocotools_on_demand branch June 9, 2021 09:22
Lechtr pushed a commit to Lechtr/yolov5 that referenced this pull request Jul 20, 2021
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
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.

torchhub load model python version restriction
1 participant