Inside AI
← Discover
Device profile / Edge AI

Raspberry Pi AI HAT+

Build a local camera counter or pose-driven interface on Pi 5. Start with a supported model, then turn detections into useful events.

Demos you can run

Projects and experiments

Proposed build / Raspberry Pi AI HAT+

Build a workbench object detector

Proposed build · Bring up a local detector, inspect its model settings and score its response to one workbench object.

Proposed idea / Raspberry Pi AI HAT+

Count objects without keeping frames

Proposed enhancement · Turn a stream of detections into one count per crossing, retaining only aggregate totals.

Experiment · unrun / Raspberry Pi AI HAT+

Does dim light change detection?

Proposed experiment · Separate detection failures from changes in time to the first visible box.

Is this for me?

For a Pi 5 owner or Python maker who wants a camera to recognize objects locally and turn detections into useful events. Choose it for a supported vision model and a controllable Linux application. The original AI HAT+ covered here is a vision accelerator, not an all-purpose chatbot computer.

What you can do with it

Proposed first result: count a bottle once when it crosses a line, then save the count and timestamp instead of a video archive. Later possibilities include pose-driven interfaces and separating a foreground object from its background. A bounding box alone is not a reliable counter: tracking, crossing direction and duplicate suppression are your application logic. Bottle-counting build

What the complete setup costs

Planning reference: $70 for 13 TOPS or $110 for 26 TOPS, from the manufacturer announcement, re-read 10 Nov 2026; these are reference prices, not a checkout quote. From scratch, our dated Pi 5 2GB allowance of $77.50 plus $65–100 for camera, suitable power, storage and cooling gives $212.50–247.50 or $252.50–287.50. Reuse an equipped Pi 5 where possible.

The proposed local build needs no paid inference subscription. Tax, delivery, electricity, a new setup computer and optional custom-model training are excluded. Adjust owned hardware and actual quotes; its itemized defaults are one scenario within those estimates.

How to start — and what you need to learn

First install the supported Pi OS/Hailo stack and run a supplied detector with one clearly visible bottle. Confirm detections before writing any counter. Then log track IDs and line crossings; replay a short sequence against a manual count. You need terminal, Python and camera-setup skills. Custom model compilation is a separate, more demanding task. Official setup

When another product is a better choice

For one compact supported vision task on an existing Pi, consider AI Camera. For measured distance, consider OAK-D Lite. For local language models and a more flexible GPU stack, consider Jetson. Doubling the TOPS figure does not guarantee twice the speed of your complete application.

What we know — and what still needs testing

The accelerator variants and camera integration are documented. Our counter is a proposed build, not a tested product feature. Before relying on it, measure missed and duplicate crossings, low-light failures, sustained temperature and end-to-end delay. Lighting and counting test

Architecture

A camera feeds the Pi 5. Its camera software prepares the model input and sends it over PCIe to the board’s Hailo-8L (13 TOPS) or Hailo-8 (26 TOPS). On the Pi, the detection stage turns the output into boxes in camera coordinates. Pi hardware guide Raspberry Pi’s detection stage

Follow one frame in the supplied YOLOv8 example. The Pi requests a 640 × 640 RGB input and chooses a compiled network file (HEF) for the fitted accelerator. The chip returns numerical outputs. Pi-side software decodes those into detections, maps rectangles into camera coordinates and places them in object_detect.results. A separate stage reads those results to draw the preview. The rectangle on your monitor is the end of that chain. Model selection and input size · Detection stage

Documented capabilities

Raspberry Pi ships examples for object detection, instance segmentation and 17-point pose estimation. In the YOLOv8 detection example, one output describes one candidate object: class, confidence and a rectangle. A builder can act on that metadata before drawing an overlay. Pi software guide Raspberry Pi’s detection stage

Choose the output your application actually needs. A box can tell a counter where a bottle is. A segmentation mask can tell a silhouette camera which pixels to keep. Body keypoints can tell a hands-free timer whether a wrist is above a shoulder. The three supplied demos show those outputs. Counting once, replacing a background or starting the timer is application logic you add. Try the three camera demos

SDKs, APIs & extensibility

To change the application, start in Hailo’s Python detection callback, where each video buffer exposes detections and, when available, tracking IDs. To change what the network recognizes, use labels and a compatible compiled model for the chosen Hailo chip. Hailo’s Python callback Hailo’s tracking example Hailo’s compatibility table

For a first build, keep the pretrained bottle detector and change what happens after inference. In Hailo’s tracking application, keep a little state per track and count a left-to-right crossing once. Running Raspberry Pi’s preview command alone will not invoke that Python callback. The workbench guide gives both entry points. The counter example includes a short rule you can run without a camera.

Limitations

The two TOPS figures rate INT8 inference. A first visible box also depends on exposure, input preparation, post-processing and the preview. Raspberry Pi’s reference configuration includes a confidence cutoff and temporal filtering. Measure the full path if a delayed alert matters. Pi hardware guide Raspberry Pi’s YOLOv8 configuration Raspberry Pi’s detection stage

A bottle visible for only a few frames might be detected too late for a conveyor gate. The published YOLOv8 example sets its confidence threshold to 0.4 and applies a temporal filter. Check the configuration installed on your Pi. In a trial, record missed bottles separately from the delay on successful detections: a fast median can hide the objects that never triggered an event. Run the lighting and delay test

Privacy & data flow

The reference flow performs inference locally. Our proposed counter keeps only aggregate counts, with no image writer or network output. Check the actual application’s recording, streaming and log settings before making a retention claim. Pi hardware guide Pi software guide

Draw the retention boundary at the application output. For a tally, keep the track ID and last position in memory during the pass. Save a count at the end. A preview, a recorded video and a remote dashboard leave different evidence behind. Proposed check: run a short controlled sequence, close the application, inspect its output directory and logs, and repeat with the network disconnected. Write down exactly which artifacts survive. The board’s local inference capability alone cannot establish that policy.

Primary sources

Raspberry Pi · AI HAT+ Raspberry Pi · AI software guide Pi hardware guide Raspberry Pi’s YOLOv8 configuration Raspberry Pi’s detection stage Hailo’s tracking example Hailo’s Python callback Hailo’s compatibility table