-
-
Notifications
You must be signed in to change notification settings - Fork 16.4k
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
add __init__.py #3126
Comments
👋 Hello @KC-Zhang, thank you for your interest in 🚀 YOLOv5! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution. If this is a 🐛 Bug Report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you. If this is a custom training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available. For business inquiries or professional support requests please visit https://www.ultralytics.com or email Glenn Jocher at glenn.jocher@ultralytics.com. RequirementsPython 3.8 or later with all requirements.txt dependencies installed, including $ pip install -r requirements.txt EnvironmentsYOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
StatusIf this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training (train.py), testing (test.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit. |
@KC-Zhang You can utilize torch hub or use this pypi package for this purpose. |
@fcakyon torch hub or PyPI is less flexible. I need to rewrite detection.py to take custom input/output flow from my own project, which depends on utils and models, which is only importable with init.py. |
@KC-Zhang You can simply |
@fcakyon That could work, let me try that. Is the pip package as good as the github in terms of performance? |
@KC-Zhang good news 😃! Your original issue may now been fixed ✅ in PR #3127. To receive this update you can:
Thank you for spotting this issue and informing us of the problem. Please let us know if this update resolves the issue for you, and feel free to inform us of any other issues you discover or feature requests that come to mind. Happy trainings with YOLOv5 🚀! |
Heyy Glenn, |
@KC-Zhang if you're trying to package-ize this repo, you can simply comment it from requirements.txt. If you're talking about the PyPi package then no I think it's baked in as a requirement. What happens if you just run |
@KC-Zhang here are the solutions for your problem: cocodataset/cocoapi#172. It is related with pycocotools package. |
@fcakyon ah good catch. Perhaps we should add Cython to the requirements.txt here ahead of pycocotools. |
Thanks @glenn-jocher @fcakyon for looking into this. Unfortunately I tried installing cpython and it didn't solve the problem. I am running a python3.8 venv on Ubuntu 16.04. I tried all combination of pip install Cpython; pip2 install Cpython; pip3 install Cpython; pip install cpython; pip2 install cpython; pip3 install cpython; |
I think I might have solved the problem a while ago on my local computer by messing with gcc following search result for " error: command 'x86_64-linux-gnu-gcc' failed with exit status 1" on google like this one. But I threw in a lot of command into terminal and not sure what was the exact command that helped. |
@KC-Zhang most probably you fixed it by : |
@fcakyon thank you for pointing it out. I will confirm it in a new virtual machine when I got some time and confirm it here if it fixes the problem. |
@KC-Zhang I think you might have a misspelling in your command, the package that
|
@glenn-jocher Thank you for pointing it out. I did make a typo and didn't notice haha. I tried the correct spelling this time and it still didn't work unfortunately. What I tried: |
🚀 Feature
add an empty __init__.py in the base folder.
Motivation
This way, the yolov5 folder can be installed as a package within our own projects as a git-submodule, and install everything using a setup.py. Since it is not clean to modify contents of a submodule (including adding __init__.py), it's better if the repo already has __init__.py.
Pitch
Alternatives
Additional context
The text was updated successfully, but these errors were encountered: