YOLO environment construction

YOLO environment construction1. System Information2. Preliminary preparation3. Install Ultralytics4. Configure GPU acceleration4. Verify the installationCommon errorsCannot uninstall sympyError phenomenonSolutionCSI camera cannot be calledVerify the environmentReferences

1. System Information

image-20241228093006633

2. Preliminary preparation

3. Install Ultralytics

4. Configure GPU acceleration

Since we have already installed torch 2.5.0 and torchvision 0.20 in the previous tutorial, there is no need to run the torch and torchvision installation commands here, only the other software packages need to be installed.

torch

torchvision

cuSPARSELt

onnxruntime-gpu

Note: Using onnxruntime-gpu requires installing a specific version of numpy. If it is not 1.23.5, you can run the following command to install the specified version

4. Verify the installation

Validating Ultralytics

Verifying Torch

Verifying Torchvision

Verify Numpy

Note: The ultralytics version will be updated later, please refer to the version information queried in the system

image-20241230112550391

Common errors

Cannot uninstall sympy

Error phenomenon

Cannot uninstall sympy

image-20241230111303169

Solution

Uninstall python3-sympy: Reinstall PyTorch after uninstallation

CSI camera cannot be called

Compile OpenCV from source code and enable GStreamer support: basically the entire process is automatically installed. It is recommended to uninstall the old version and install the new version (the script automatically enables CUDA and GStreamer functions)

image-20250111110031036

image-20250111115337639

Verify the environment

image-20250111115433425

image-20250111115449526

References

https://docs.ultralytics.com/guides/nvidia-jetson/

https://github.com/AastaNV/JEP