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+Product overviewonRaspberry Pi 5

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 stream (a network video feed), feeds Frigate on a Raspberry Pi 5. The 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.

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, the Frigate setup with the DEEPX NPU and the RTSP camera feed setup for Frigate, which shows how to publish a feed.

Before starting

Hardware

  • Raspberry Pi 5Hosts Frigate. Tested with 8 GB.
  • Sixfab AI HAT+ (DEEPX DX-M1M)Runs person detection through Frigate’s DEEPX detector. See Specifications.Shop
  • RTSP camera or streamTested with 1 Logitech C270 USB webcam, restreamed as RTSP by a separate camera host.

Software

  • Frigate with the DEEPX detector, and DX-RTAlready running (DX-RT is DEEPX’s runtime software for the NPU). Tested on Raspberry Pi OS Trixie.
  • Toolsgit, curl, sha256sum, docker, python3 and ffprobe (from ffmpeg).

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). 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.

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.

Use port 8971 only

Frigate treats port 5000 as unauthenticated, admin-level access; see Frigate’s authentication documentation.

  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.

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:

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.

MetricValueMethod
embeddings.face_recognition_speedAbout 600 to 800 ms per inference, Arm CPUFrigate /api/stats, varies with load from other cameras and models
frontdoor detection_fps4 to 8 fpsFrigate /api/stats, depends on what else runs on the shared NPU
Detect resolution1280 × 720Camera 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 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 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), outside the requirements the documentation lists.

Face recognition needs no Frigate+ subscription (Frigate’s 0.16 release notes). 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. 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 and the FAQs it links.

Troubleshooting

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

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.

In testing, the cause was an empty Face Library: nobody had been enrolled. Add faces to Face Library. Frigate also skips faces under min_area.

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.

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

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

Restart Frigate:

docker restart frigate

Read its log:

docker logs frigate

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

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:

SettingDefaultControls
min_area750 pxSmallest face Frigate tries to recognize
detection_threshold0.7Face detection confidence before recognition
unknown_score0.8At or below this, the face is unknown
recognition_threshold0.9Confidence needed for a sub_label
min_faces1Recognitions before the sub_label applies
save_attempts200Face images saved for training

Still stuck? Ask in the Sixfab Community.

Next steps

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.
  • 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.