The GPU is not used when running detection with YOLOv5


When I run the YOLOv5 detection code, it still uses CPU. And it causes the detection process to be slow, I get fps = 0.4. For installation, CUDA has been activated but the CUDA on the Jetson nano is still not used. Please give me an explanation why it happened and what is the solution?

Hi,

Are you using Jetson Nano with a custom Python version?
If yes, please build Pytorch from the source to get the CUDA support.

Thanks.

WhatsApp Image 2024-07-05 at 21.29.04
The following are the versions of CUDA 10.2.300 and pytorch 2.3.1 that I have installed.
I use the virtual environment Python 3.8.0. Please tell which version of Pytorch and CUDA suits my python virtual environment. Please help me

Hi,

We only provide the Python 3.6 package for JetPack 4.

If you want a custom Python version, please build it from the source.
You can find the building command and info below:

https://forums.developer.nvidia.com/t/pytorch-for-jetson/72048

Instructions → Build from Source

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.