TL;DR:

  • The Raspberry Pi AI HAT+ pairs a Raspberry Pi 5 with a Hailo-8L NPU providing 26 TOPS — capable of running multiple simultaneous neural network models in real time
  • The official Raspberry Pi software stack (rpicam-apps, picamera2, hailo-all) handles camera capture, preprocessing, and inference with minimal configuration
  • Practical for object detection, pose estimation, face recognition, and audio classification at edge sites without cloud round-trips

Raspberry Pi hardware has always punched above its price point for prototyping and light production deployments. The AI HAT+ — a HAT (Hardware Attached on Top) accessory for the Raspberry Pi 5 — represents a meaningful capability step: you’re no longer running inference on the Pi’s ARM CPU, you’re running it on a dedicated Hailo-8L neural processing unit capable of 26 TOPS.

That’s enough to run YOLOv8n object detection at 30+ FPS on a 720p input stream, simultaneously with a separate classification model, while the Pi’s CPU and RAM remain largely free for application logic. Here’s what this looks like in practice and what it changes for edge deployments.

The Hardware Stack

The AI HAT+ connects via the Raspberry Pi 5’s PCIe M.2 slot (an M.2 HAT is required to mount it physically). The key components:

  • Hailo-8L: The inference chip, providing 26 TOPS peak throughput for neural network execution
  • Hailo-8: Available as a higher-performance variant (26 TOPS Lite vs 26 TOPS full — confusingly similar branding, but the Hailo-8 in the standard AI HAT is the 26 TOPS unit; the AI Kit uses the 13 TOPS Hailo-8L)
  • PCIe 3.0 x1 interface: Provides sufficient bandwidth for most CV workloads; the connection is handled transparently by the driver stack

For most edge AI projects, the relevant specs are:

ParameterValue
NPU peak throughput26 TOPS
Power consumption~3W (NPU under load)
Supported frameworksPyTorch, TensorFlow/Keras (via Hailo Model Zoo)
InterfaceM.2 HAT → Pi 5 PCIe
Camera supportPi Camera Module 3, HDMI input, USB cameras

Software Stack

The Raspberry Pi organisation maintains hailo-all, a meta-package that installs the complete software stack: HailoRT runtime, Hailo TAPPAS framework, rpicam-apps integration, and picamera2 integration.

# Install the complete stack
sudo apt update
sudo apt install hailo-all

# Verify detection
hailortcli fw-control identify

A successful installation shows the Hailo device firmware version and confirms the PCIe connection is working.

The TAPPAS framework provides pre-built GStreamer pipelines for common vision tasks. Running a detection pipeline against a camera feed:

# YOLOv8 object detection with live display
gst-launch-1.0 \
  libcamerasrc ! \
  video/x-raw,format=NV12,width=1280,height=720,framerate=30/1 ! \
  queue ! \
  hailonet hef-path=/usr/share/hailo-models/yolov8n.hef ! \
  queue ! \
  hailooverlay ! \
  autovideosink

The hailonet element handles model loading, input preprocessing, NPU inference, and output postprocessing. The CPU is not involved in the inference computation.

Python Integration with picamera2

For Python applications, picamera2 handles camera capture and feeds frames to HailoRT for inference:

from picamera2 import Picamera2
from picamera2.devices.hailo import Hailo

with Hailo("yolov8n.hef") as hailo:
    model_h, model_w, _ = hailo.get_input_shape()
    
    picam2 = Picamera2()
    config = picam2.create_preview_configuration(
        main={"size": (1280, 720), "format": "RGB888"},
        lores={"size": (model_w, model_h), "format": "RGB888"},
    )
    picam2.configure(config)
    picam2.start()
    
    while True:
        frame = picam2.capture_array("lores")
        results = hailo.run(frame)
        detections = hailo.get_results()
        
        # detections is a list of (class_id, confidence, bbox) tuples
        for detection in detections:
            class_id, confidence, bbox = detection
            if confidence > 0.5:
                print(f"Detected class {class_id} at {bbox} ({confidence:.2f})")

The lores stream provides a resized camera feed sized to the model’s input dimensions; the main stream is full resolution for display or storage. HailoRT handles the conversion and inference in hardware.

Practical Use Cases at 26 TOPS

Object detection for manufacturing quality control: YOLOv8n at 30 FPS on a production line camera, detecting defects or missing components. The Pi’s CPU handles logging, alerting, and communication with SCADA/MES systems while the NPU runs continuous inference.

Person detection for access control: Run a person detection model and a separate face recognition model simultaneously. At 26 TOPS, both can run concurrently on different NPU compute blocks.

Wildlife camera traps: Replace cloud-dependent camera traps with local inference. Detect specific animal classes locally and only transmit to cloud when the target species is present — reducing cellular data costs by 90%+ at remote sites.

Audio classification: The Hailo NPU isn’t limited to visual models. Audio spectrograms can be classified using CNN-based models compiled for the Hailo architecture — enabling keyword spotting, industrial sound anomaly detection, or wildlife audio monitoring without the CPU overhead of running Whisper or equivalent on-CPU.

Multi-sensor fusion: The Pi 5 has enough I/O to handle LoRaWAN, serial sensors, and camera simultaneously. With the NPU handling inference, the CPU is free to run application logic, lightweight databases (SQLite), and network communication.

Model Compilation and the Hailo Model Zoo

Hailo provides a model zoo with pre-compiled .hef files for common architectures: YOLOv5/v6/v7/v8, ResNet, EfficientNet, MobileNet, and more. For custom models, the Hailo Dataflow Compiler (available free with registration) compiles PyTorch or TensorFlow models to .hef format:

  1. Export your model to ONNX from PyTorch/TF
  2. Quantize and compile with the Hailo Dataflow Compiler
  3. Deploy the .hef file to the Pi

The compilation process handles quantisation (INT8) automatically. Most well-structured models compile without modification; custom architectures with non-standard operations may require adjustment.

Power and Thermal Considerations

The Pi 5 + AI HAT+ combination draws approximately 8–12W under full inference load — more than a bare Pi 5, but well within the capability of a standard USB-C PD power supply. For battery-powered deployments, duty-cycling the NPU (power down between inference runs) can bring average draw to 4–6W.

The HAT itself doesn’t require additional cooling beyond the Pi 5’s active cooler if ambient temperatures are below 30°C. Above that, or in enclosures with limited airflow, a small case fan improves sustained performance.

Positioning vs Other Edge AI Hardware

PlatformTOPSPriceForm factorNotes
Pi 5 + AI HAT+26~£100SBCGeneral purpose; good ecosystem
NVIDIA Jetson Orin Nano40~£200SBCMore powerful; better for training
Google Coral Dev Board4~£80SBCLower power; limited model support
Hailo-8 M.2 (PC)26~£70M.2 moduleSame NPU; requires separate host

The Pi AI HAT+ fills the gap between the very low-power Coral ecosystem and the much higher-cost Jetson line. For teams with existing Pi deployments or Pi expertise, it’s the lowest-friction path to hardware-accelerated inference.

Getting Started

The official Raspberry Pi documentation covers installation in detail. The AI HAT+ is available directly from Raspberry Pi and approved resellers at ~£70; add a Pi 5 (4GB recommended) at ~£55 and an M.2 HAT at ~£12. Total platform cost under £140 for a capable edge inference node is a significant change from what edge AI deployments cost two years ago.