hello,
Thank you for all your support.
I’m using Orin, and I’m trying to run YOLOv8 on that device using Python’s ultralytics library.
Of course, I asked this question because the purpose is to use the GPU, not the CPU.
I have carefully checked all the references below and confirmed that torch recognizes the GPU, but I am unable to install the torchvision module, so I am inquiring.
https://forums.developer.nvidia.com/t/pytorch-for-jetson/72048
https://docs.nvidia.com/deeplearning/frameworks/install-pytorch-jetson-platform/index.html
https://github.com/pytorch/vision?tab=readme-ov-file
The JetPack I use is version 6.0.
Accordingly, the command below was executed.
# If installation is attempted first
pip uninstall ultralytics
pip uninstall -y torch torchvision torchaudio
# Install YOLO
export PATH="$PATH:/home/{}/.local/bin"
pip install --upgrade pip==23.2.1
pip install ultralytics
# install torch(2.2.0a0+6a974be)
pip uninstall -y torchvision
cd installation
sudo apt-get -y update
# wget https://developer.download.nvidia.cn/compute/redist/jp/v60dp/pytorch/torch-2.2.0a0+6a974be.nv23.11-cp310-cp310-linux_aarch64.whl torch-2.2.0a0+6a974be .nv23.11-cp310-cp310-linux_aarch64.whl
sudo apt-get -y install libopenblas-base libopenmpi-dev libomp-dev
pip install numpy torch-2.2.0a0+6a974be.nv23.11-cp310-cp310-linux_aarch64.whl
# install torchvision(0.17)
sudo apt-get install libjpeg-dev zlib1g-dev libpython3-dev libopenblas-dev libavcodec-dev libavformat-dev libswscale-dev
git clone --branch release/0.17 https://github.com/pytorch/vision torchvision
cd torchvision
export BUILD_VERSION=0.17
python setup.py install --user
cd ../..
# check installation
python
import torch
torch.__version__
torch.cuda.is_available()
exit()
# excute detection
python detect_helmet.py --source rtsp://{} --use_trt True imgsz=800
JetPack 6.0 torch for Jetson provided by NVIDIA is identified as torch-2.2.0a0+6a974be.nv23.11-cp310-cp310-linux_aarch64.whl.
However, how can I obtain the TorchVision whl file for that version?
Even if you refer to the reference above, it only shows the version, and only tells you to clone github and build from source, without any details.
I referenced GitHub - pytorch/vision: Datasets, Transforms and Models specific to Computer Vision and found out that torchvision was version 0.17 when torch was version 2.2, and I tried `pip install torchvision==0.17’, but In this case, torch is downgraded to CPU version 2.2.0 (not whl for jetpack).
I also cloned the source and built it.
In this case, the build fails due to insufficient memory on the Jetson device.
As a result, I am failing to perform object detection using the ultralytics library. Because there is no torch vision module. Could you please support the TorchVision whl file suitable for jetpack 6.0 and torch 2.2.0a0+6a974be, which are officially supported by NVIDIA?
I am not good enough. I would appreciate it if you could explain in detail.