Hardware

I added an AI kit to my Raspberry Pi security camera and it outperforms professional solutions

At a glance:

  • A Raspberry Pi 5 paired with the official Hailo‑8L AI Kit runs Frigate NVR locally, delivering real‑time object detection without cloud uploads.
  • The build uses Docker, Raspberry Pi OS Lite, and a custom Hailo driver install script to overcome a max_desc_page_size kernel issue.
  • Detection zones, reduced frame‑rate (8 fps), and tracking of person, vehicle, and animal classes keep CPU load low while maintaining high accuracy.

Building the local NVR with Frigate and Raspberry Pi OS Lite

The author chose Frigate because it is lightweight, offers a minimal web UI that now includes essential toggles, and supports AI accelerators such as the Hailo‑8L module on the Raspberry Pi AI HAT. Its low resource footprint means multiple camera streams can be handled on a single Raspberry Pi 5 without overwhelming the CPU. Recent updates have also added configuration options directly in the dashboard, removing the need to edit YAML files for every new camera. Running the Lite variant of Raspberry Pi OS keeps the system lean, and the author installed Docker in rootless mode using the dockerd-rootless-setuptool.sh script to avoid privileged containers. A bare‑bones compose.yml from the official Frigate documentation was deployed with docker compose up -d, after which two RTSP cameras (one 720p and one 1080p) were added through the web UI without editing the configuration file. The RTSP handshakes completed quickly, and both streams appeared in the Frigate dashboard ready for monitoring and recording.

Integrating the Hailo‑8L AI accelerator

Object detection on the Pi’s ARM CPU alone pushed latency past 70 ms, so the Hailo‑8L AI Kit was added to offload inference. Because the latest Raspberry Pi OS ships with Hailo drivers, the author first removed them with sudo modprobe -r hailo_pci and renamed the kernel modules to prevent automatic loading. This step ensured that Frigate would bind to the correct user‑space driver rather than the distribution‑provided one. The installation script from the Frigate repository (wget https://raw.githubusercontent.com/blakeblackshear/frigate/dev/docker/hailo8l/user_installation.sh) was then executed, and the detector block detectors: hailo: type: hailo8l device: /dev/hailo0 was appended to the Frigate config. A remaining kernel parameter max_desc_page_size caused the container to fail, which was fixed by writing options hailo_pci force_desc_page_size=4096 to /etc/modprobe.d/hailo_pci.conf. After a container restart the Hailo‑8L accelerator was recognized and began processing frames with sub‑10 ms latency.

Tuning detection for performance and accuracy

With the accelerator functional, the author added per‑camera detect and record blocks, setting detection resolution to 1280×720 at 8 fps, continuous recording disabled, and motion‑only retention of ten days. The track section listed animal, person, and vehicle as tracked classes, and custom zones were drawn to limit analysis to relevant regions of each frame. These tweaks keep the AI HAT from being overloaded while still capturing the events that matter most. In testing, human detection was nearly flawless, though a garden hose was once misidentified as a snake; keeping the frame rate modest prevented the AI HAT from becoming a bottleneck. The system now records motion clips locally and serves live views over the LAN without any cloud dependency. The author reports that the setup outperforms several commercial NVRs in both privacy and detection accuracy for a fraction of the cost.

Why this matters for home surveillance

Unlike commercial cloud NVRs such as Ring, the entire pipeline — video ingest, object detection, and storage — remains on the local network, eliminating subscription fees and third‑party data exposure. The open‑source nature of Frigate and the Raspberry Pi platform also means the system can be extended with additional cameras, custom models, or integration with home‑automation hubs without vendor lock‑in. This approach gives the user full control over firmware updates and data retention policies. The project demonstrates that a modest single‑board computer paired with a purpose‑built AI accelerator can rival professional surveillance appliances in real‑world scenarios. Community contributions to Frigate continue to add support for new accelerators and detection models, suggesting the platform will only become more capable over time. For privacy‑conscious makers, the combination of Raspberry Pi hardware and open‑source NVR software offers a compelling alternative to proprietary cloud ecosystems.

Editorial SiliconFeed is an automated feed: facts are checked against sources; copy is normalized and lightly edited for readers.

FAQ

What hardware components are used in the Raspberry Pi AI‑powered NVR?
The build centers on a Raspberry Pi 5 running Raspberry Pi OS Lite, the official Raspberry Pi AI Kit containing a Hailo‑8L accelerator (the original module, not the + variant), and two RTSP cameras — one 720p and one 1080p — connected over the local network. Docker runs in rootless mode, and the Frigate NVR container orchestrates video ingest, detection, and storage.
How does the author enable the Hailo‑8L accelerator for Frigate object detection?
First the distribution‑provided Hailo kernel driver is removed with `sudo modprobe -r hailo_pci` and the module files are renamed to prevent auto‑loading. Then the Frigate‑provided installation script is fetched via `wget` from the project’s GitHub repository, made executable, and run. The detector configuration `detectors: hailo: type: hailo8l device: /dev/hailo0` is added to Frigate’s config, and a modprobe option `force_desc_page_size=4096` is written to `/etc/modprobe.d/hailo_pci.conf` to resolve a `max_desc_page_size` error.
What privacy advantages does this local Frigate setup provide compared with cloud‑based cameras like Ring?
All video streams, detection metadata, and recorded clips stay on the user’s LAN; no footage is uploaded to external servers, eliminating the risk of third‑party access or data‑breach incidents. There are no mandatory subscription fees, and the open‑source stack lets the owner audit or modify the code at any time. The system also avoids the recent Ring controversy where employee access to customer videos was reported.

More in the feed

Prepared by the editorial stack from public data and external sources.

Original article