Skip to content

Commit 0d8b244

Browse files
committed
distinguish 'face too small' from 'no face at all' in the log
They need completely different fixes - snapshot resolution and camera distance versus viewing angle and light - but produced an identical log line. Now reports the largest face found, the limit it missed, and the snapshot dimensions.
1 parent 5187d50 commit 0d8b244

5 files changed

Lines changed: 49 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
All notable changes to FaceID. The Home Assistant app shows this file in the
44
update dialog; standalone users can watch GitHub releases.
55

6+
## 0.6.12 — 2026-07-26
7+
8+
- **"No face found" now says which kind.** The log distinguishes *a face was detected but
9+
it is too small* (reporting its pixel width, the `min_face_px` limit and the snapshot
10+
dimensions) from *no face at all* — two very different problems. Too small points at
11+
Frigate's `snapshots.height` or camera distance; none at all points at viewing angle or
12+
light. Previously both produced the same line, leaving nowhere to start.
13+
614
## 0.6.11 — 2026-07-26
715

816
- **New LOG tab.** The service log is now visible in the web UI — the last 500 lines,

app/mqtt_listener.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,23 @@ def _process(self, eid: str):
161161
if img is None:
162162
log.info("Event %s (%s): kein Snapshot von Frigate", eid, st["camera"])
163163
return
164-
face = FaceEngine.best_face(self.engine.faces(img), min_px=self.min_face_px)
164+
found = self.engine.faces(img)
165+
face = FaceEngine.best_face(found, min_px=self.min_face_px)
165166
if face is None:
166-
# Der haeufigste Normalfall (Ruecken zur Kamera, zu weit weg) — trotzdem
167-
# protokollieren, sonst sieht ein stiller Log wie ein Defekt aus.
168-
log.info("Event %s (%s): Versuch %d, kein Gesicht >= %dpx im Snapshot",
169-
eid, st["camera"], st["attempts"], self.min_face_px)
167+
# Haeufigster Normalfall (Ruecken zur Kamera, zu weit weg) — trotzdem
168+
# protokollieren, sonst sieht ein stiller Log wie ein Defekt aus. Die
169+
# Unterscheidung "zu klein" vs. "gar keins" entscheidet, wo man sucht:
170+
# zu klein deutet auf Frigates snapshots.height oder Kameraabstand,
171+
# gar keins eher auf Blickwinkel oder Licht.
172+
h, w = img.shape[:2]
173+
if found:
174+
big = max(int(f.bbox[2] - f.bbox[0]) for f in found)
175+
log.info("Event %s (%s): Versuch %d, groesstes Gesicht %dpx < min_face_px "
176+
"%d (Snapshot %dx%d)", eid, st["camera"], st["attempts"], big,
177+
self.min_face_px, w, h)
178+
else:
179+
log.info("Event %s (%s): Versuch %d, kein Gesicht im Snapshot %dx%d",
180+
eid, st["camera"], st["attempts"], w, h)
170181
return
171182
emb = face.normed_embedding
172183
slug, name, score = self.gallery.match(emb)

faceid-addon/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
All notable changes to FaceID. The Home Assistant app shows this file in the
44
update dialog; standalone users can watch GitHub releases.
55

6+
## 0.6.12 — 2026-07-26
7+
8+
- **"No face found" now says which kind.** The log distinguishes *a face was detected but
9+
it is too small* (reporting its pixel width, the `min_face_px` limit and the snapshot
10+
dimensions) from *no face at all* — two very different problems. Too small points at
11+
Frigate's `snapshots.height` or camera distance; none at all points at viewing angle or
12+
light. Previously both produced the same line, leaving nowhere to start.
13+
614
## 0.6.11 — 2026-07-26
715

816
- **New LOG tab.** The service log is now visible in the web UI — the last 500 lines,

faceid-addon/app/mqtt_listener.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,23 @@ def _process(self, eid: str):
161161
if img is None:
162162
log.info("Event %s (%s): kein Snapshot von Frigate", eid, st["camera"])
163163
return
164-
face = FaceEngine.best_face(self.engine.faces(img), min_px=self.min_face_px)
164+
found = self.engine.faces(img)
165+
face = FaceEngine.best_face(found, min_px=self.min_face_px)
165166
if face is None:
166-
# Der haeufigste Normalfall (Ruecken zur Kamera, zu weit weg) — trotzdem
167-
# protokollieren, sonst sieht ein stiller Log wie ein Defekt aus.
168-
log.info("Event %s (%s): Versuch %d, kein Gesicht >= %dpx im Snapshot",
169-
eid, st["camera"], st["attempts"], self.min_face_px)
167+
# Haeufigster Normalfall (Ruecken zur Kamera, zu weit weg) — trotzdem
168+
# protokollieren, sonst sieht ein stiller Log wie ein Defekt aus. Die
169+
# Unterscheidung "zu klein" vs. "gar keins" entscheidet, wo man sucht:
170+
# zu klein deutet auf Frigates snapshots.height oder Kameraabstand,
171+
# gar keins eher auf Blickwinkel oder Licht.
172+
h, w = img.shape[:2]
173+
if found:
174+
big = max(int(f.bbox[2] - f.bbox[0]) for f in found)
175+
log.info("Event %s (%s): Versuch %d, groesstes Gesicht %dpx < min_face_px "
176+
"%d (Snapshot %dx%d)", eid, st["camera"], st["attempts"], big,
177+
self.min_face_px, w, h)
178+
else:
179+
log.info("Event %s (%s): Versuch %d, kein Gesicht im Snapshot %dx%d",
180+
eid, st["camera"], st["attempts"], w, h)
170181
return
171182
emb = face.normed_embedding
172183
slug, name, score = self.gallery.match(emb)

faceid-addon/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: FaceID
2-
version: "0.6.11"
2+
version: "0.6.12"
33
slug: faceid
44
description: Face recognition for Frigate — trainable gallery, clustered unknown review, HA sensors
55
url: https://github.com/SkyTechNerds/faceid

0 commit comments

Comments
 (0)