This project demonstrates real-time Object Detection on the Raspberry Pi 5 platform, using the Transcend ECM300 embedded camera module.
- Hardware Requirements
- Install Raspberry Pi 5 OS
- Connect the ECM300 Camera
- Install IMX675 Camera Driver
- Quickly Run Object Detection
- Run Object Detection Manual
- Third-Party Licenses
-
Supported Platforms
- Raspberry Pi 5
-
Supported Cameras
- Transcend ECM300 (IMX675 sensor)
-
Recommended SD Card
- A microSD card with at least 128 GB capacity and UHS-1 speed class or higher.
Important: The ECM300 camera driver is only compatible with Raspberry Pi OS running Linux kernel version 6.12.25+rpt-rpi-2712. Using a different kernel version will result in driver incompatibility.
-
Download Raspberry Pi OS (64-bit, Debian Bookworm) dated 2025-05-13 from https://downloads.raspberrypi.org/raspios_arm64/images/raspios_arm64-2025-05-13/2025-05-13-raspios-bookworm-arm64.img.xz
Note: This specific OS version includes the required kernel 6.12.25+rpt-rpi-2712.
-
Write the image to the microSD card using Raspberry Pi Imager.
- In the "Choose operating system" step, select "Use custom" at the bottom of the list, then choose the downloaded image file.
-
Insert the microSD card into the Raspberry Pi 5 and complete the initial setup (language, username, WiFi, etc.).
-
Important: During the OS installation process, when prompted with "Update Software" dialog:
-
After first boot, verify the kernel version:
uname -r
Expected output:
6.12.25+rpt-rpi-2712Warning: If the kernel version does not match exactly, do NOT proceed with driver installation. The camera driver will not work with other kernel versions.
-
Do NOT run system updates after installation, as this may upgrade the kernel to an incompatible version:
# DO NOT RUN THIS # sudo apt update && sudo apt upgrade
The installation script will automatically lock the kernel version to prevent accidental updates.
-
Power off the Raspberry Pi 5 completely:
sudo shutdown -h now
-
Insert the camera module as follows:
- ECM300: Insert into the CAM/DISP 1 port (the port closer to the USB-C power connector)
-
Power on the Raspberry Pi 5.
Copy the Driver_Install folder to the desktop:
cd ~/Desktop/RaspberryPi_ObjectDetection_Demo/Driver_InstallNote: Please make sure the device is connected to the Internet before starting the installation.
Option A: Automatic Installation (Recommended)
Execute the installation script:
chmod +x install_imx675.sh
./install_imx675.shThe installation will:
- Install build dependencies (meson, ninja, kernel headers, etc.)
- Clone and compile libcamera with IMX675 support
- Install kernel module and device tree overlay
- Configure system settings
- Lock kernel version to prevent incompatible updates
Installation time: Approximately 15-25 minutes depending on your SD card speed and internet connection.
Option B: Manual Installation
Refer to the manual located in:
Driver_Install/CameraDriver_Package_v1.0/docs/
Follow the step-by-step instructions in the manual for manual installation.
After installation completes successfully, reboot the system:
sudo rebootAfter reboot, verify the camera driver is working:
# List available cameras
libcamera-hello --list
# Test camera preview for 5 seconds
libcamera-vid -t 5000Expected output:
Available cameras
-----------------
0 : imx675 [2592x1944 10-bit RGGB] (/base/axi/pcie@120000/rp1/i2c@80000/imx675@1a)
Note: The camera will only appear in the list after you physically connect it in the next section.
On first run, the script will automatically create a virtual environment (.venv) and install required packages. This may take a few minutes.
cd ~/Desktop/RaspberryPi_ObjectDetection_Demo
chmod +x run_object_detection_raspi.sh
./run_object_detection_raspi.shWhen prompted, select the desired object classes, or enter 'd' to use the default list (Person, Glasses, Tie, Monitor/TV).
Example:
If you want to detect Person, Glasses, Tie, and Monitor/TV, enter: 233,136,325,201
Press 'q' to exit the application.
Navigate to the project directory and activate the virtual environment:
cd ~/Desktop/RaspberryPi_Object_Detection_Demo
source .venv/bin/activateNote: If the virtual environment doesn't exist (or you see bash: .venv/bin/activate: No such file or directory),
Run the following commands to create it and install the required packages:
python3 -m venv .venv --system-site-packages
source .venv/bin/activate
pip install -r requirements.txtpython webcam_yolo_raspi.pyThe program will:
- Automatically start
libcamera-vidin the background - Stream frames via pipe to the YOLO detection engine
- Display real-time detection results
Press 'q' to exit fullscreen mode.
To deactivate the virtual environment:
deactivateThis project uses NRtred/yolo11n_object365, which is licensed under the MIT License. All third-party license details are stored in the Third-Party Licenses/ directory for reference.



