Comments (7)
It will automatically pick up the GPU if found.
from yolov7.
I have now managed to get the YOLOv7 project running on my NVIDIA Jetson Nano. But when I run detect.py it seems it is not using the GPU. I added a print statement as below and it reports 'cpu'. Setting the option --device to 0 does not work. Any hints how to enable the script to use the GPU instead is highly appreciated
With kind regards, Walter
# Run inference
print (device.type)
if device.type != 'cpu':
model(torch.zeros(1, 3, imgsz, imgsz).to(device).type_as(next(model.parameters()))) # run once
old_img_w = old_img_h = imgsz
old_img_b = 1
from yolov7.
I have now managed to get the YOLOv7 project running on my NVIDIA Jetson Nano. But when I run detect.py it seems it is not using the GPU. I added a print statement as below and it reports 'cpu'. Setting the option --device to 0 does not work. Any hints how to enable the script to use the GPU instead is highly appreciated
With kind regards, Walter
# Run inference print (device.type) if device.type != 'cpu': model(torch.zeros(1, 3, imgsz, imgsz).to(device).type_as(next(model.parameters()))) # run once old_img_w = old_img_h = imgsz old_img_b = 1
Have you checked if your device has cuda successfully installed or not?
Please check with nvidia-smi command.
from yolov7.
Thanks, I guess I have not. I just flashed a SD card with the NVIDIA provided image, guess CUDA is not part of that. I will try to install CUDA Toolkit
from yolov7.
Hello, thanks for your help!
I have now installed CUDA following this guide:
https://jfrog.com/connect/post/installing-cuda-on-nvidia-jetson-nano/
Verifying...looks ok as below, but still, only cpu is used by the detect.py
YOLOR 🚀 v0.1-128-ga207844 torch 1.13.1 CPU
Trying to set device to 0 gets
AssertionError: CUDA unavailable, invalid device cuda requested
Any more hints really grateful. This is a difficult subject
Kind regards, Walter
walter@walter-jetson-227:/$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Thu_Jun_11_22:26:42_PDT_2020
Cuda compilation tools, release 11.0, V11.0.194
Build cuda_11.0_bu.TC445_37.28540450_0
walter@walter-jetson-227:/$ dpkg -l | grep cuda
iU cuda 11.0.2-1 arm64 CUDA meta-package
iU cuda-11-0 11.0.2-1 arm64 CUDA 11.0 meta-package
ii cuda-command-line-tools-10-2 10.2.460-1 arm64 CUDA command-line tools
iU cuda-command-line-tools-11-0 11.0.2-1 arm64 CUDA command-line tools
ii cuda-compiler-10-2 10.2.460-1 arm64 CUDA compiler
etc
from yolov7.
Looks like cuda 11.0 support issue with Jetson Nano. You need to try with Cuda 10.2.
Please uninstall everything and follow this video to install OpenCV with Cuda enabled-
https://www.youtube.com/watch?v=P-EZr0zy53g&t=30s
After successfully doing the above setup, follow the video-
https://www.youtube.com/watch?v=ZXbOV83EXdQ&t=1443s
Please make sure you use the exact version of the libraries that the video has mentioned.
from yolov7.
Thanks for your kind help, I will redo things, eventually come back and re-open the issue
Best regards, Walter
from yolov7.
Related Issues (20)
- face recognition HOT 1
- shape inference of TRT::EfficientNMS_TRT type is missing HOT 1
- Custom dataset training vs Transfer-Learning HOT 16
- Transfer Learning for Custom Object Detection HOT 1
- Is incremental training possible?
- Hyper-parameter optimization of YOLOv7 model
- Real-time video detection detect.py
- Why yolov7-seg YOLOR head doesn't use implicitM ?
- How Confidence Score Calculated?
- wandb
- scratch weights
- Model Conversion Problem HOT 1
- Reproducing results from paper
- Data augmentation
- labels, shapes, self.segments = zip(*cache.values())
- Reparameterizing a yolov7 model does not change model file size or inference speed HOT 2
- Can't locate my Trained YOLOv7.pt
- YOLOv7 directly in a Python environment
- more detail
- Running train.py in evolve mode
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yolov7.