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

Question : how can i run the training with my GPU RTx 3060 ? #6858

Closed
KhalladiSofianeIT opened this issue Mar 4, 2022 · 5 comments · Fixed by #6932
Closed

Question : how can i run the training with my GPU RTx 3060 ? #6858

KhalladiSofianeIT opened this issue Mar 4, 2022 · 5 comments · Fixed by #6932

Comments

@KhalladiSofianeIT
Copy link

How can i run the training with device GPU rtx 3060 ?

@glenn-jocher
Copy link
Member

@KhalladiSofianeIT YOLOv5 commands use CUDA device 0 by default, so no additional action is required on your part to use your GPU, just run normal commands, i.e. python detect.py

@KhalladiSofianeIT
Copy link
Author

Thanks but i begin training i had this bug he stopped in this step : how i can solve it ?

Uploading t2{4473af} (7390c2ae-e3dc-40f5-8b0e-a7f88ea0f89e id=0x7f0a03a6 tag=BaseCommentFragment) …

@glenn-jocher
Copy link
Member

glenn-jocher commented Mar 4, 2022

@KhalladiSofianeIT 👋 hi, thanks for letting us know about this possible problem with YOLOv5 🚀. We've created a few short guidelines below to help users provide what we need in order to get started investigating a possible problem.

How to create a Minimal, Reproducible Example

When asking a question, people will be better able to provide help if you provide code that they can easily understand and use to reproduce the problem. This is referred to by community members as creating a minimum reproducible example. Your code that reproduces the problem should be:

  • Minimal – Use as little code as possible to produce the problem
  • Complete – Provide all parts someone else needs to reproduce the problem
  • Reproducible – Test the code you're about to provide to make sure it reproduces the problem

For Ultralytics to provide assistance your code should also be:

  • Current – Verify that your code is up-to-date with GitHub master, and if necessary git pull or git clone a new copy to ensure your problem has not already been solved in master.
  • Unmodified – Your problem must be reproducible using official YOLOv5 code without changes. Ultralytics does not provide support for custom code ⚠️.

If you believe your problem meets all the above criteria, please close this issue and raise a new one using the 🐛 Bug Report template with a minimum reproducible example to help us better understand and diagnose your problem.

Thank you! 😃

@Jocassio
Copy link

Jocassio commented Mar 7, 2022

Hi, i hade a similar problem whit the same video configurate. when a chose the "python detect.py --source 0 " when try to connect with the webcam and the folow mensage came :

... lib\site-packages\torch\nn\modules\module.py", line 1186, in getattr
raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'

The same problem occurs when I choose different video sources. As I bought the computer recently, I'm still installing the programs, if someone can help me identify the help of installing a package or something missing. Thanks for the attention

@glenn-jocher
Copy link
Member

glenn-jocher commented Mar 8, 2022

@Jocassio it appears you may have environment problems. Please ensure you meet all dependency requirements if you are attempting to run YOLOv5 locally. If in doubt, create a new virtual Python 3.9 environment, clone the latest repo (code changes daily), and pip install requirements.txt again from scratch.

💡 ProTip! Try one of our verified environments below if you are having trouble with your local environment.

Requirements

Python>=3.7.0 with all requirements.txt installed including PyTorch>=1.7. To get started:

git clone https://github.com/ultralytics/yolov5  # clone
cd yolov5
pip install -r requirements.txt  # install

Models and datasets download automatically from the latest YOLOv5 release when first requested.

Environments

YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

CI CPU testing

If 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), validation (val.py), inference (detect.py) and export (export.py) on MacOS, Windows, and Ubuntu every 24 hours and on every commit.

@glenn-jocher glenn-jocher linked a pull request Mar 10, 2022 that will close this issue
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 a pull request may close this issue.

3 participants