Hailo official integration with Frigate

Official Hailo8 AI Accelerator Support for Frigate NVR :tada:

We’ve partnered with the Frigate NVR team to bring official Hailo8 AI accelerator support to the project. This allows Frigate users to harness Hailo’s efficient edge AI processing for faster, more accurate home surveillance.

Overview

This guide provides a template for using Hailo with Frigate. Note that Hailo support is still not in the official release, so a specific image is used instead of ghcr.io/blakeblackshear/frigate:stable.
See the exact image in the docker-compose below.

See more details in: Installation | Frigate

Prerequisites

  • Ubuntu 22.04 LTS or RPi OS
  • Docker & Docker Compose
  • Hailo8 AI Accelerator connected to your system
  • One or more IP cameras

Installation Steps

Update: See Home Assistant Add On installation guide added to this topic.

1. Install Hailo Runtime

Raspberry Pi:

sudo apt update && sudo apt full-upgrade
sudo apt install hailo-all
reboot the rpi

x86 Systems:
Follow the Hailo-RT v4.20 installation guide.

Working version: 4.20

2. Prepare the Directory Structure

Create config and storage directories to be mapped to the container:

mkdir config storage

3. Create Docker Compose File

Create a docker-compose.yaml file:

nano docker-compose.yaml

Add the following content:

version: "3"
services:
  frigate:
    container_name: frigate
    image: ghcr.io/blakeblackshear/frigate:678ae87
    shm_size: "512mb" # calculate on your own
    stop_grace_period: 30s # allow enough time to shut down the various services
    restart: unless-stopped
    privileged: true
    ports:
      - "5000:5000"
      - "1935:1935"
      - "8554:8554"
      - "8555:8555/tcp" # WebRTC over tcp
      - "8555:8555/udp" # WebRTC over udp
    devices:
      - /dev/bus/usb:/dev/bus/usb
      - /dev/hailo0:/dev/hailo0
      - /dev/video0:/dev/video0
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ./config:/config
      - ./storage:/media/frigate
      - /tmp/cache:/tmp/cache

4. Start Docker

Run the following command to start Docker in daemon mode:

docker compose up --build -d

Warning : this is running in the background and will hold the hailo device

5. Configure Frigate

Once Docker is running, you can access Frigate in your browser at:

http://localhost:5000/

Edit the configuration file by clicking on the ‘cog wheel’ button and selecting the configuration editor.

6. Setup Camera and Detector

Configure your camera according to
1-Camera specefic Guide
2-Cameras Guide
and select one of the detector options below:

Default YOLOv6n Model (Auto Detection)

detectors:
  hailo8l:
    type: hailo8l
    device: PCIe

model:
  width: 320
  height: 320
  input_tensor: nhwc
  input_pixel_format: rgb
  input_dtype: int
  model_type: yolo-generic

Custom YOLO Model with URL (e.g. YOLOv8m)

detectors:
  hailo8l:
    type: hailo8l
    device: PCIe

model:
  path: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ModelZoo/Compiled/v2.14.0/hailo8/yolov8m.hef

SSD MobileNet v1

detectors:
  hailo8l:
    type: hailo8l
    device: PCIe

model:
  width: 300
  height: 300
  input_tensor: nhwc
  input_pixel_format: rgb
  model_type: ssd
  path: https://hailo-model-zoo.s3.eu-west-2.amazonaws.com/ModelZoo/Compiled/v2.14.0/hailo8l/ssd_mobilenet_v1.hef

Important Notes

  • If you run Frigate in the background, the Hailo device will be used, and trying to use it elsewhere will show a HAILO_OUT_OF_PHYSICAL_DEVICES(74) error.- If you run Frigate in the background, the Hailo device will be used, and trying to use it elsewhere will show a HAILO_OUT_OF_PHYSICAL_DEVICES(74) error.

  • Frigate will be restarted after boot, so even if you restart your device, Frigate will restart and the device will be used.

  • You can stop Frigate to release the Hailo device.

  • Support for running from Frigate and from additional processes will be added in the future.

Performance

  • Hailo-8: Up to 1200 FPS with YOLOv6n, handles up to 8 cameras at 20-30 FPS each
  • Hailo-8L: Around 300 FPS

Supported Models

Frigate with Hailo8 supports any YOLO or SSD model compiled for Hailo with post-processing.

Recommended Defaults

Hardware Model Input Size Performance
Hailo-8L YOLOv6n 320x320 ~11 ms inference
Hailo-8 YOLOv6n 320x320 ~7 ms inference

Tested Models

The following models have been tested and verified to work with Hailo8 and Frigate:

  • YOLOv8 variants (YOLOv8n, YOLOv8m, etc.)
  • YOLOv9 variants
  • YOLOv11 variants
  • SSD MobileNet v1 and v2
  • YOLOv5n, YOLOv5s, YOLOv6n, YOLOv6m

Home Assistant Add On installation

We’ve successfully tested the Home Assistant add-on integration with Raspberry Pi 5.

To use it, ensure your Home Assistant installation is updated to version 2025.5.3 or later. This update is crucial as it includes the necessary Hailo Driver (version 4.20).

The Frigate release that introduced Hailo support to the main repository is Release 0.16.0-beta3. As this is still a beta version, you’ll need to select the Frigate (Full Access) Beta add-on for installation within Home Assistant.

Note that you need to disable Protection mode in order to allow it to use Hailo.

Troubleshooting

For troubleshooting, please refer to the Frigate documentation: https://docs.frigate.video/

4 Likes

Will this isolate rpi5+frigate+hailo8 users from the version kablooey after most any update to the system where the hailo driver version mismatches the hailo library version mistmatches the container’s hailo version(s)? The pain there has been off the charts whenever something updates. Hoping this improves that situation.

1 Like

Hey @Christopher_Davis ,

Welcome to the Hailo Community!

This container is optimized for 4.20 version , for now we recommend staying at this version to use frigate!

Thanks for the guide… I noticed a typo in the above config during my test setup with yolo model.

You’ve got the HW setup for a hailo8L in the detector section but in the YOLO model section you’re pulling a hef file generated for the hailo8. I simply added an “l” to the end of the hailo8 to pull the right version.

Hey @David_Pinto ,

Welcome to the Hailo Community!

Thanks for pointing it out !

A main release and a beta release have been published since this, will these work?

Hey @Gregory_Laycock_Hamm ,

Welcome to the Hailo Community!

Yes it will work with the official release , will update the guide to work with the official one!

*Working version: 4.20
*
I can’t seem to find this driver version. These instructions are not very user friendly. I tried running version 4.22.0 but it says even rc1 doesn’t work with 4.22.0 as far as I can tell.

Came here after trying the Frigate 0.16.0 beta releases and rc1. All of those gave me the version error, looking for either 4.20.1 or 4.21.0 when the RPi was on 4.20.0. The ghcr.io/blakeblackshear/frigate:678ae87 image is working for me though, thank you!

Count me as another user hoping for less hailo version pain with the official release.

Hey @user223 ,

Welcome to the Hailo Community!

This is how you find 4.20 in our software downloads , you will find them under!

Hey @user235

Welcome to the Hailo Community!

Great to hear that this version is working well for you.

I’ll make sure to update the guide to include instructions for running with the official version, along with all the download links you’ll need.

Also, just a heads up - we’ll be updating all our apps and versions to 4.22 soon (once we get the Pi updated). This current version will essentially be the final release, aside from any necessary bug fixes.

Thanks for being part of the community!

I’m quite excited that by following the guide above I succeed to have Frigate running with H8 like a charm after I built the drivers and RT in Truenas (even though in unsupported mode) on a mininas with N200 CPU. If anyone is interested I may share my experience in this forum.

I’m a noobie wiht these arguments so forgive me for my ingorance. I read in the guide that there are several detection models, but there is the link to Yolo 8m and MobileNet v1 only. Where I can find more information regarding the differences of the various models, resource usage and links? The posts of @shashi regarding object and face detection blew my mind, is it something that I may implement in my system? Where I can find a simple description of how to get started with it?

Hi @Roberto_Franceschini

You want to implement face detection and object detection inside frigate? or as separate applications?

Inside Frigate for the home automation system I’m building with Home Assistant.

Hey @Roberto_Franceschini,

You can grab any model from the model zoo by just changing the model name in the link. For example, if you see “yolov8s” in the URL, just replace it with “yolov5m” or whatever model you want from the zoo. Just make sure to check that the model actually exists in the Hailo model zoo at GitHub - hailo-ai/hailo_model_zoo: The Hailo Model Zoo includes pre-trained models and a full building and evaluation environment before trying to use it.

1 Like

@Roberto_Franceschini check out our face recognition demo on it GitHub. You can use it as reference.

Hi,
I’ve use the “new” integrate face detection directly in Frigate (version 16.0 RC4) and it’s working pretty well. I use the 4.21 HailoRT driver on Ubuntu (PCIE and Driver https://hailo.ai/developer-zone/documentation/hailort-v4-21-0/?sp_referrer=install/install.html ).
I only use the ssd_mobilenet_v1.hef model.
For more information for Frigate : Face Recognition | Frigate .
In Frigate, just go to Settings, Enrichments and enable Facial Detection (with Hailo I use the small model). I’ve just adjust the recognition_threshold to 0.8.
Then go to your Face Library, add a (or more) face with picture and “train” your model when you have detection of known face. And enjoy :slight_smile:

If it can help my Frigate config linked to detection looks like :

detectors:
hailo8l:
type: hailo8l
device: PCIe

model:
width: 300
height: 300
input_tensor: nhwc
input_pixel_format: bgr
model_type: ssd
path: /config/model_cache/h8l_cache/ssd_mobilenet_v1.hef

detect:
enabled: true

face_recognition:
enabled: true
recognition_threshold: 0.8

1 Like
  • Hailo-8: Up to 1200 FPS with YOLOv6n, handles up to 8 cameras at 20-30 FPS each

Is there a model comparison somewhere? I’m running `yolov8m` in a h8 chip and can’t get more than 16FPS total.