Compact, practical AI inference examples for the Raspberry Pi 5 using the DEEPX NPU. Examples range from object detection and pose estimation to instance segmentation and image denoising — designed to get you running on edge AI quickly.
Quick links
- Sixfab Website | Sixfab Docs
- DEEPX Website
- Runtime & tools: sixfab-dx dx_rt
- Driver: dx_rt_npu_linux_driver
- Full toolchain: dx-all-suite
deepx-rpi5-examples/
├── auto-install.sh # One-shot setup: resources, Python deps, C++ build
├── python_examples/ # Full Python demo collection (28 demos, TUI launcher)
├── cpp_examples/ # Full C++ demo collection (26 demos, TUI launcher)
├── community_projects/ # Community contributions and templates
└── docs/ # Guides for installation and usage
Install the DEEPX runtime first via the Sixfab APT repository:
wget https://github.com/sixfab/sixfab_dx/releases/download/v0.1/apt-repo-sixfab.deb
sudo dpkg -i apt-repo-sixfab.debThe sixfab-dx package automatically installs the DEEPX runtime on the system.
sudo apt update && sudo apt install sixfab-dxTo get the best inference throughput from the DX-M1 NPU, open the boot configuration file:
sudo nano /boot/firmware/config.txtAdd the following lines at the end of the file:
dtparam=pciex1
dtparam=pciex1_gen=3Save and exit (Ctrl+X, then Y, then Enter), then reboot:
sudo rebootdxrt-cli -sSee docs/install-raspberry-pi5.md for full hardware and software setup instructions.
Once sixfab-dx is installed, run the setup script to download models and build the C++ examples:
git clone https://github.com/sixfab/sixfab-dx-examples.git
cd sixfab-dx-examples
./auto-install.shauto-install.sh will:
- Validate the DEEPX runtime is working
- Download models, videos, and sample images from the GitHub release
- Install Python dependencies into the Sixfab venv
- Build all C++ demos
After setup, activate the environment for every new session:
source /opt/sixfab-dx/venv/bin/activateAfter setup, activate the environment for every new session:
source /opt/sixfab-dx/venv/bin/activateNote: This activates the shared Sixfab virtual environment. If you prefer to use your own isolated environment, you can create one and install the required wheels manually:
python3 -m venv ~/my-venv source ~/my-venv/bin/activatePre-built wheels for
dx_engineandnumpyare available under/opt/sixfab-dx/wheels/:ls /opt/sixfab-dx/wheels/ # dx_engine-3.3.0-cp311-cp311-linux_aarch64.whl # dx_engine-3.3.0-cp313-cp313-linux_aarch64.whl # numpy-2.4.4-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl # numpy-2.4.4-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whlInstall the wheels matching your Python version (
cp311→ Python 3.11,cp313→ Python 3.13):pip install /opt/sixfab-dx/wheels/numpy-2.4.4-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl pip install /opt/sixfab-dx/wheels/dx_engine-3.3.0-cp311-cp311-linux_aarch64.whlTo check your Python version:
python3 --version
A full collection of 28 demos with a Rich-based TUI launcher. Covers object detection (13 YOLO variants, SCRFD, YOLOX), segmentation, classification, pose estimation, PPU-accelerated variants, and advanced analytics (zone intrusion, people tracking, traffic counting, queue analysis).
# Launch the interactive menu
bash python_examples/start.shSee docs/python-examples.md for the full demo list and configuration guide.
26 demos written in idiomatic C++17 using only OpenCV and the DeepX SDK — no Qt, no YAML. Same categories as the Python collection. Each demo is a single readable file.
# Launch the interactive menu
bash cpp_examples/start.sh
# Or run a binary directly
./cpp_examples/build/object_detection/yolov8_demo --source libcameraSee docs/cpp-examples.md for the demo list, build instructions, and flags.
All demos accept the same set of input sources:
| Source | config.yml value |
|---|---|
| Raspberry Pi camera | rpicam |
| USB webcam | webcam |
| Video file | video |
| Single image | image |
| RTSP stream | rtsp |
Community improvements are welcome. If you have a demo, model optimization tip, or pipeline to share, add it under community_projects/ and update community_projects/community_projects.md with usage notes. See the template at community_projects/template_example/ for the expected structure.
This project is distributed under the MIT License.










