Welcome to DOFBOT Pro repository
1. YOLO Environment Setup
YOLO Environment Setup
YOLO Environment Setup1. System Information2. Prerequisites3. Install Ultralytics4. Configure GPU Acceleration5. Verify InstallationCommon ErrorsCannot uninstall sympyError PhenomenonSolutionCSI Camera Cannot Be CalledVerify EnvironmentReferences
1. System Information

2. Prerequisites
sudo apt updatesudo apt install python3-pip -ysudo pip install -U pip
3. Install Ultralytics
xxxxxxxxxxsudo pip3 install ultralytics[export]
xxxxxxxxxxsudo reboot
4. Configure GPU Acceleration
Install the following software packages including torch 2.5.0, torchvision 0.20, cuSPARSELt, and onnxruntime-gpu:
torch
xxxxxxxxxxsudo pip3 install https://github.com/ultralytics/assets/releases/download/v0.0.0/torch-2.5.0a0+872d972e41.nv24.08-cp310-cp310-linux_aarch64.whl
torchvision
xxxxxxxxxxsudo pip3 install https://github.com/ultralytics/assets/releases/download/v0.0.0/torchvision-0.20.0a0+afc54f7-cp310-cp310-linux_aarch64.whl
cuSPARSELt
xxxxxxxxxxwget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/arm64/cuda-keyring_1.1-1_all.debsudo dpkg -i cuda-keyring_1.1-1_all.debsudo apt-get updatesudo apt-get -y install libcusparselt0 libcusparselt-dev
onnxruntime-gpu
xxxxxxxxxxsudo pip3 install https://github.com/ultralytics/assets/releases/download/v0.0.0/onnxruntime_gpu-1.20.0-cp310-cp310-linux_aarch64.whl
Note: Using onnxruntime-gpu requires installing a specific version of numpy. If it's not version 1.23.5, you can run the following command to install the specified version
xxxxxxxxxxsudo pip3 install numpy==1.23.5
5. Verify Installation
Verify Ultralytics
xxxxxxxxxxpython3 -c "import ultralytics; print(ultralytics.__version__)"
Verify Torch
xxxxxxxxxxpython3 -c "import torch; print(torch.__version__); print(torch.cuda.is_available())"
Verify Torchvision
xxxxxxxxxxpython3 -c "import torchvision; print(torchvision.__version__)"
Verify Numpy
xxxxxxxxxxpython3 -c "import numpy; print(numpy.__version__)"
Note: The ultralytics version will be updated later. Refer to the version information queried in the system for the actual version.

Common Errors
Cannot uninstall sympy
Error Phenomenon
Unable to uninstall sympy

Solution
Uninstall python3-sympy: After uninstallation is complete, reinstall PyTorch
xxxxxxxxxxsudo apt remove python3-sympy -y
CSI Camera Cannot Be Called
Compile OpenCV from source and enable GStreamer support: The entire process is basically automatic installation. It is recommended to uninstall the old version and install the new version (the script automatically enables CUDA and GStreamer functions)
xxxxxxxxxxgit clone https://github.com/AastaNV/JEP.gitcd JEP/scriptbash install_opencv4.10.0_Jetpack6.1.sh


Verify Environment
xxxxxxxxxxpython3 -c "import cv2; print(cv2.getBuildInformation())" | grep GStreamerpython3 -c "import ultralytics; print(ultralytics.__version__)"python3 -c "import torch; print(torch.__version__); print(torch.cuda.is_available())"python3 -c "import torchvision; print(torchvision.__version__)"python3 -c "import numpy; print(numpy.__version__)"jtop

