Note
Hello, welcome to the SunFounder Raspberry Pi & Arduino & ESP32 Enthusiasts Community on Facebook! Dive deeper into Raspberry Pi, Arduino, and ESP32 with fellow enthusiasts.
Why Join?
Expert Support: Solve post-sale issues and technical challenges with help from our community and team.
Learn & Share: Exchange tips and tutorials to enhance your skills.
Exclusive Previews: Get early access to new product announcements and sneak peeks.
Special Discounts: Enjoy exclusive discounts on our newest products.
Festive Promotions and Giveaways: Take part in giveaways and holiday promotions.
👉 Ready to explore and create with us? Click [here] and join today!
Note
If you are using the pre-installed “Raspberry Pi OS with AI Fusion Lab Kit” image, you can skip this section. This image already includes all the software installations, environment configurations, and example code deployments described in this chapter.
0. Setup YOLO Environment
This chapter shows you how to install Yolo on the Raspberry Pi and verify that it works correctly.
To use camera module conveniently, Assemble the Pan-tilt (For Camera) is recommended.
Note
Assembling the pan-tilt may obscure some pins, so it is recommended to assemble it only when using the camera, or place it on the outside after assembly.
Access the Raspberry Pi Desktop:
Remote Desktop: Use VNC for a full desktop experience.
Raspberry Pi Connect: Use Raspberry Pi Connect to access your Pi securely from any browser.
Install required dependencies:
sudo apt update sudo apt upgrade -y sudo apt install python3-pip python3-opencv python3-numpy python3-picamera2 -y
Install Ultralytics (the official YOLO library):
# Install CPU version of PyTorch (specify CPU source) pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cpu --break-system-packages # Install ultralytics, but skip torch dependencies pip3 install ultralytics --no-deps --break-system-packages # Manually install ultralytics' other dependencies pip3 install pyyaml requests psutil polars tqdm matplotlib seaborn --break-system-packages