---
title: "Add face recognition to Frigate camera"
description: "Raspberry Pi face recognition: the Sixfab AI HAT+ (DEEPX DX-M1M) detects people on a Raspberry Pi 5, and Frigate face recognition names them."
url: "https://docs.sixfab.com/projects/ai-hat-plus/add-face-recognition-frigate-camera/"
last_updated: "2026-10-12"
---

# Add face recognition to Frigate camera

Run person detection on the AI HAT+ NPU and Frigate face recognition on the Raspberry Pi 5 CPU, so Frigate adds an enrolled person’s name to each matching person event.

**Works with:** [AI HAT+](https://docs.sixfab.com/edge-ai/ai-hat-plus/) on Raspberry Pi 5

![Frigate Debug view with a box around a person, labeled with the enrolled name and a 92% match score](https://docs.sixfab.com/wp-content/uploads/sixfab-docs/06-frigate-debug-view-recognized-face-name-and-92-percent-score.png)

## How it works

Frigate is an NVR (network video recorder): software that records camera streams and detects objects in them. A USB webcam, restreamed by a camera host as an [RTSP](https://docs.sixfab.com/projects/ai-hat-plus/choose-ai-hat-plus-project/#rtsp) stream (a network video feed), feeds Frigate on a Raspberry Pi 5. The [NPU](https://docs.sixfab.com/projects/ai-hat-plus/choose-ai-hat-plus-project/#npu) (neural processing unit, a chip built to run AI models) on the AI HAT+ finds each person in the frame. Frigate then finds the face inside the person box on the Raspberry Pi 5 CPU, compares it with the faces in its Face Library and, on a match, adds the name to the person event as a `sub_label`, the extra name field Frigate stores on an event.

![Pipeline diagram: an RTSP camera feeds Frigate on the Raspberry Pi 5, the DEEPX NPU finds the person box, the Raspberry Pi 5 CPU detects and recognizes the face, and Frigate adds the name to the person event as a sub_label](https://docs.sixfab.com/wp-content/uploads/sixfab-docs/06-face-recognition-pipeline-camera-to-frigate-npu-and-cpu.svg)

Frigate must detect a `person` before it recognizes a face:

1. An RTSP camera or stream feeds Frigate.
2. Frigate on the Raspberry Pi 5 reads the stream at `[RTSP_URL]`.
3. Frigate’s DEEPX NPU detector runs the compiled model `yolov8-n_640x640_ppu.dxnn` (YOLOv8n, COCO-80) and finds `person` objects.
4. Inside each person box, Frigate finds the face on the CPU, because the detection model has no `face` class. Faces under `min_area` (750 px) are skipped.
5. The ArcFace model, which turns a face into numbers Frigate can compare, matches the face against your Face Library on the CPU.
6. Frigate combines results across frames, then adds the name as a `sub_label`.

Read the result in Frigate’s web interface at `https://[PI_IP]:8971`: the person event carries the enrolled name as its `sub_label`.

## Requirements

Complete these first, in this order: the [AI HAT+ quickstart](https://docs.sixfab.com/edge-ai/ai-hat-plus/quickstart/), the [Frigate setup with the DEEPX NPU](https://docs.sixfab.com/projects/ai-hat-plus/set-up-frigate-nvr-ai-hat-plus/) and the [RTSP camera feed setup for Frigate](https://docs.sixfab.com/projects/ai-hat-plus/connect-camera-feeds-mqtt-frigate/), which shows how to publish a feed.

**Before starting**

**Hardware**

- **Raspberry Pi 5**: Hosts Frigate. Tested with 8 GB.
- **Sixfab AI HAT+ (DEEPX DX-M1M)**: Runs person detection through Frigate’s DEEPX detector. See [Specifications](https://docs.sixfab.com/edge-ai/ai-hat-plus/hardware-reference/specifications/). [Shop](https://shop.sixfab.com/products/ai-hat-plus-raspberry-pi-5?utm_source=docs.sixfab.com&utm_medium=referral&utm_campaign=ai-projects&utm_content=raspberry-pi-face-recognition-camera-frigate)
- **RTSP camera or stream**: Tested with 1 Logitech C270 USB webcam, restreamed as RTSP by a separate camera host.

**Software**

- **Frigate with the DEEPX detector, and DX-RT**: Already running (DX-RT is DEEPX’s runtime software for the NPU). Tested on Raspberry Pi OS Trixie.
- **Tools**: `git`, `curl`, `sha256sum`, `docker`, `python3` and `ffprobe` (from ffmpeg).

> [!NOTE]
> **Frigate’s DEEPX detector is on the dev branch**
>
> DEEPX support was merged into Frigate’s dev branch on September 21, 2026 (PR #24336) and is not in a stable release yet; the latest stable release is v0.18.0 (September 12, 2026). Sixfab develops and maintains DEEPX support in Frigate ([Frigate’s DEEPX NPU detector docs](https://github.com/blakeblackshear/frigate/blob/dev/docs/docs/configuration/object_detectors.md)). This project uses the image the Frigate setup pulls, `ghcr.io/blakeblackshear/frigate:af0ba19-standard-arm64`, built from commit af0ba19 of the dev branch.

## Install

Both methods copy the model and the label map into `[FRIGATE_CONFIG_DIR]/model_cache`, back up `config.yaml`, merge this project’s camera, one model entry and the `face_recognition` settings into it, leaving other cameras and models alone, and restart Frigate.

**Install script**

Run on the Raspberry Pi 5, with Frigate and its DEEPX detector running:

```bash
git clone https://github.com/sixfab/sixfab-dx-frigate.git
cd sixfab-dx-frigate/apps/smart-doorbell
./install.sh --rtsp-url [RTSP_URL]
```

- `--rtsp-url` (string): The RTSP address of your camera. The installer asks for it if you leave it out.
- `--container` (string): The Frigate container name. Defaults to `frigate`.
- `--config-dir` (string): Frigate’s config directory. The installer reads it from the container’s `/config` mount if you leave it out.
- `--yes` (flag): Skips the question before the Frigate restart.

The installer downloads the model file from the project’s GitHub release and checks its SHA-256 before it installs it; it needs `git`, `curl` and `sha256sum`. It checks the feed with `ffprobe` and stops with an error if it cannot read it. It asks before it restarts the Frigate container, waits 20 s and turns the `frontdoor` camera on. On success it prints:

```text
Install complete.
```

If you decline the restart, it prints `Restart Frigate yourself` instead.

**Manual install**

1. **Connect RTSP camera feed**

   Publish your camera as `rtsp://[STREAM_HOST]:8554/[STREAM_PATH]`. The test used a Logitech C270 USB webcam that FFmpeg restreamed from a separate host. The repository has no unit for it, and the RTSP camera feed page gives no webcam command: this project uses the feed but does not create it. The installer checks the feed with `ffprobe` and stops with an error if it cannot read it.

2. **Get code**

   Clone the repository and open the project folder:

   ```bash
   git clone https://github.com/sixfab/sixfab-dx-frigate.git [REPO_DIR]
   cd [REPO_DIR]/[PROJECT_PATH]
   ```

3. **Download model**

   Download `yolov8-n_640x640_ppu.dxnn` from the project’s GitHub release. Use the repository address without a trailing `.git` in the download URL.

   ```bash
   curl -fL -o model/yolov8-n_640x640_ppu.dxnn https://github.com/sixfab/sixfab-dx-frigate/releases/download/smart-doorbell-v1.0.0/yolov8-n_640x640_ppu.dxnn
   ```

   Check its SHA-256 checksum:

   ```bash
   awk '$1 !~ /^#/ && NF {print $3 "  " $2}' models.txt | sha256sum -c -
   ```

   ```text
   model/yolov8-n_640x640_ppu.dxnn: OK
   ```

   The release notes list the model’s license and details. The label map, `coco80-labelmap.txt`, is a text file that lists the 80 class names the model detects; the installer copies it with the model.

4. **Run installer**

   ```bash
   RTSP_URL=[RTSP_URL] ./install.sh
   ```

   The installer copies the model and label map into `[FRIGATE_CONFIG_DIR]/model_cache`, backs up `config.yaml`, merges this project’s config into it, asks before it restarts the Frigate container, waits 20 s and turns the `frontdoor` camera on. On success it prints `Install complete.`; if you decline the restart, it prints `Restart Frigate yourself` instead.

   The installer expects a container named `frigate` and reads the config directory from its `/config` mount. To use other values, set `CONTAINER` and `CONFIG_DIR` before you run it; set `ASSUME_YES=1` to skip the restart question. Its last step calls Frigate’s API from inside the container with `docker exec`, not over the network: Frigate runs with host networking, so port 5000 is already reachable on the Raspberry Pi 5 and there is no Docker `-p` flag to withhold.

5. **Check configuration**

   The installer merges this configuration. Replace the RTSP path with your own feed. Keep the camera name `frontdoor`, because the installer turns that camera on by name.

   ```yaml
   face_recognition:
     enabled: true
     model_size: large
     device: CPU

   models:
     - scene: all
       devices:
         - deepx:PCIe:0
       path: /config/model_cache/yolov8-n_640x640_ppu.dxnn
       labelmap_path: /config/model_cache/coco80-labelmap.txt
       width: 640
       height: 640
       input_tensor: nhwc
       input_pixel_format: rgb
       input_dtype: int
       model_type: yolo-generic

   cameras:
     frontdoor:
       ffmpeg:
         inputs:
           - path: rtsp://[STREAM_HOST]:8554/[STREAM_PATH]
             roles:
               - detect
               - record
       detect:
         enabled: true
         width: 1280
         height: 720
         scene: all
       objects:
         track:
           - person
         filters:
           person:
             min_score: 0.5
             threshold: 0.6
       motion:
         threshold: 15
         contour_area: 8
       face_recognition:
         enabled: true
       zones:
         frontdoor_zone:
           coordinates: 0.1,0.9,0.9,0.9,0.9,0.1,0.1,0.1
           objects:
             - person
   ```

   If this Frigate also runs [Porch Pirate](https://docs.sixfab.com/projects/ai-hat-plus/catch-package-theft-porch-pirate/), both projects define a zone named `frontdoor_zone`, and Porch Pirate’s listener does not filter by camera, so a person at this camera can trigger a false theft alert. Rename one zone.

### Add faces to Face Library

Frigate names only the people in its Face Library, so add each person you want recognized. You manage faces in Frigate itself; there is no separate app.

> [!WARNING]
> **Use port 8971 only**
>
> Frigate treats port 5000 as unauthenticated, admin-level access; see [Frigate’s authentication documentation](https://docs.frigate.video/configuration/authentication/).

1. Open `https://[PI_IP]:8971/faces` as an admin user. The menu link shows only in desktop browsers, for admins, with face recognition on.
2. Select **Add Face** and upload 1 to 5 clear, front-facing color photos per person that show only the face, as Frigate’s documentation recommends. Frigate’s face models are trained on color images. The test started with 1 photo.
3. As Frigate captures real recognition attempts, they appear under **Recent Recognitions**. Refine the library with them; add variety slowly, because blurry or poor photos make results worse.

![Frigate Face Library: Recent Recognitions thumbnails, each tagged with the enrolled name Molly Dominguez, and the Add Face button at the top right](https://docs.sixfab.com/wp-content/uploads/sixfab-docs/06-frigate-face-library-recent-recognitions-and-add-face-button.png)

## Verify

Run every check on the Raspberry Pi 5. The project works when a person event carries the enrolled name.

Walk into the camera view and open `https://[PI_IP]:8971`: Frigate shows a `person` event.

Query the stats from inside the container with the [Frigate HTTP API](https://docs.frigate.video/integrations/api/):

```bash
docker exec frigate curl -s http://localhost:5000/api/stats
```

The JSON document includes `cameras.frontdoor.detection_fps` and `embeddings.face_recognition_speed`. While someone moves in view, `detection_fps` is above 0 and `face_recognition_speed` is nonzero; a `detection_fps` of 0 on a still scene is normal.

After you enroll a face, the person event carries the name as a `sub_label`.

## Results

Tested on September 29, 2026, with a real face: a Raspberry Pi 5 (8 GB) with the AI HAT+ (DEEPX DX-M1M), Raspberry Pi OS Trixie, the Frigate build af0ba19 and 1 Logitech C270 camera at 1280 × 720. Other cameras and models shared the same Raspberry Pi 5 and the same NPU. The values were read from Frigate’s live stats; the number of samples and the run time were not recorded.

| Metric | Value | Method |
| --- | --- | --- |
| `embeddings.face_recognition_speed` | About 600 to 800 ms per inference, Arm CPU | Frigate `/api/stats`, varies with load from other cameras and models |
| `frontdoor` `detection_fps` | 4 to 8 fps | Frigate `/api/stats`, depends on what else runs on the shared NPU |
| Detect resolution | 1280 × 720 | Camera config |

The tester accepted this speed for naming people in events; that is a judgment, not a benchmark.

No accuracy figures were taken: enrolled people, distance, lighting and false matches were not measured.

## Details

### Why face recognition runs on the CPU

Frigate calls the work it does after object detection, such as face recognition, an enrichment. Frigate’s DEEPX detector runs object detection only, and Frigate’s [hardware-accelerated enrichments](https://docs.frigate.video/configuration/hardware_acceleration_enrichments/) do not list DEEPX support, so face recognition runs on the Raspberry Pi 5 Arm CPU.

This project uses `model_size: large` (ArcFace) with `device: CPU`. [Frigate’s face recognition documentation](https://docs.frigate.video/configuration/face_recognition/) describes `small` as a FaceNet model that runs on the CPU, requires an integrated or discrete GPU or NPU for `large`, and lists a CPU with AVX and AVX2 instructions as a minimum requirement. AVX and AVX2 are x86 instructions, which the Raspberry Pi 5’s Arm CPU does not have; in the test, `large` still ran on that CPU, at about 600 to 800 ms per inference (see [Results](https://docs.sixfab.com/projects/ai-hat-plus/add-face-recognition-frigate-camera/#results)), outside the requirements the documentation lists.

Face recognition needs no Frigate+ subscription ([Frigate’s 0.16 release notes](https://github.com/blakeblackshear/frigate/releases/tag/v0.16.0)). With a standard detection model, Frigate finds faces with a small CPU model.

## Limitations

- Only person detection runs on the NPU: see [Why face recognition runs on the CPU](https://docs.sixfab.com/projects/ai-hat-plus/add-face-recognition-frigate-camera/#why-face-recognition-runs-on-the-cpu). Moving face recognition to the NPU needs changes to Frigate itself, which this project does not include.
- Only 1 camera and 1 NPU board (the AI HAT+ with the DEEPX DX-M1M) were tested.
- The project names people in Frigate events, for example as a video doorbell view at your door. It does not ring, send alerts or MQTT messages, and it does not cover a doorbell button, a chime, an intercom, a phone notification or a door lock.
- Frigate does not run face recognition on the recording stream; it runs on live frames while the person is in view.
- Infrared (grayscale) faces are more likely to be confused with other people. Train on color photos first.
- Frigate chooses the DX-RT version its DEEPX detector uses. The tested build pins DX-RT v3.4.0, and this project cannot change it.
- If the DX-RT daemon (the DEEPX runtime) restarts, restart the Frigate container too.
- Tested with Frigate in Docker only. Home Assistant OS and the Frigate add-on were not tested.

## Privacy

The project stores face data, and Frigate can record video.

- Many jurisdictions treat face data as biometric data. Enroll only people who agreed, and check your local rules first.
- The camera config assigns the `record` role, but this project’s fragment does not turn recording on: Frigate records video only if you enable recording in your own config.
- Frigate saves up to 200 face images (`save_attempts`) for training.
- Recordings and face images stay on your Raspberry Pi 5. Delete them when a person asks.
- To delete the face database and start over, follow [Frigate’s face recognition documentation](https://docs.frigate.video/configuration/face_recognition/) and the FAQs it links.

## Troubleshooting

### The camera image is rotated

In testing, the cause was the physical mounting of the USB webcam, not a config setting. Rotate the camera or its cable orientation.

### The camera shows `detection_fps: 0`

Frigate detects only where it sees motion, so 0 on a still scene is normal. In testing, restarting the upstream feed to force fresh motion cleared it.

### No recognition results, but `face_recognition_speed` is nonzero

In testing, the cause was an empty Face Library: nobody had been enrolled. [Add faces to Face Library](https://docs.sixfab.com/projects/ai-hat-plus/add-face-recognition-frigate-camera/#add-faces). Frigate also skips faces under `min_area`.

### The Face Library is missing from the menu on a phone

The link is hidden on phones by design: Frigate shows it only when the browser counts as desktop, the user is an admin and face recognition is enabled. Open `https://[PI_IP]:8971/faces` directly.

### No face attempts appear in the Face Library

Turn on debug logging for face recognition. Add this to `[FRIGATE_CONFIG_DIR]/config.yaml`:

```yaml
logger:
  logs:
    frigate.data_processing.real_time.face: debug
```

Restart Frigate:

```bash
docker restart frigate
```

Read its log:

```bash
docker logs frigate
```

If no face messages appear, also add `frigate.embeddings.maintainer: debug`. Attempts that Frigate keeps show under **Recent Recognitions**.

### Scores pass the threshold but no name is added

Frigate decides across frames, weighted by face area. Check `min_faces` and `recognition_threshold`. Frigate’s face recognition documentation lists these defaults (checked October 2, 2026); this project’s installer changes none of them:

| Setting | Default | Controls |
| --- | --- | --- |
| `min_area` | 750 px | Smallest face Frigate tries to recognize |
| `detection_threshold` | 0.7 | Face detection confidence before recognition |
| `unknown_score` | 0.8 | At or below this, the face is unknown |
| `recognition_threshold` | 0.9 | Confidence needed for a `sub_label` |
| `min_faces` | 1 | Recognitions before the `sub_label` applies |
| `save_attempts` | 200 | Face images saved for training |

Still stuck? Ask in the [Sixfab Community](https://community.sixfab.com/).

## Next steps

- [Choose project](https://docs.sixfab.com/projects/ai-hat-plus/choose-ai-hat-plus-project/): The series this project belongs to: every DEEPX NPU project for the Raspberry Pi 5.
- [Boss Detector](https://docs.sixfab.com/projects/ai-hat-plus/get-person-alert-camera-boss-detector/): Person detection with Frigate.
- [Porch Pirate](https://docs.sixfab.com/projects/ai-hat-plus/catch-package-theft-porch-pirate/): Package detection with Frigate.
- [System monitoring](https://docs.sixfab.com/edge-ai/ai-model-deployment/system-monitoring/): Check NPU load with `dxtop`.
- [Frigate face recognition](https://docs.frigate.video/configuration/face_recognition/): Frigate’s documentation for face recognition settings.

## License and credits

- The detection model is derived from Ultralytics YOLOv8n and is licensed under AGPL-3.0. Each model’s details are in the [smart-doorbell-v1.0.0 release notes](https://github.com/sixfab/sixfab-dx-frigate/releases/tag/smart-doorbell-v1.0.0).
- The face models come from Frigate, which downloads them on first use; their license is set by the upstream project.
- The code is licensed under the MIT License.
- Credits: Ultralytics for YOLOv8n and DEEPX for the compiled `.dxnn` build.
- Frigate NVR and its face recognition are the Frigate project’s work. The DEEPX detector is described in [Frigate’s object detector documentation](https://github.com/blakeblackshear/frigate/blob/dev/docs/docs/configuration/object_detectors.md#deepx-npu).
