forked from SkyTechNerds/faceid
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample-config.yaml
More file actions
105 lines (102 loc) · 6.44 KB
/
Copy pathexample-config.yaml
File metadata and controls
105 lines (102 loc) · 6.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# FaceID configuration — copy to config.yaml and adjust.
# config.yaml is gitignored: it contains your MQTT credentials.
frigate:
url: https://192.168.1.10:8971 # authenticated Frigate API (recommended)
username: faceid-viewer # dedicated Frigate viewer account
password: "change-me"
verify_tls: true # false only for a trusted self-signed setup
mqtt:
host: 192.168.1.2 # your MQTT broker (same one Frigate uses)
port: 1883
user: mqtt-user
password: "mqtt-password"
faceid:
port: 8600 # web UI / API port
backend: auto # auto, cpu, cuda or openvino
# MQTT topic prefix + client id — change only when running multiple instances
mqtt_prefix: faceid
# Cosine-similarity thresholds (ArcFace embeddings):
# >= match_threshold -> recognized (published + Frigate sub_label)
# < unknown_threshold -> definitely a stranger
# in between -> uncertain; goes to the review queue only
match_threshold: 0.50
unknown_threshold: 0.35
match_margin: 0.08 # best match must lead the runner-up by this much
min_confirmations: 2 # distinct agreeing frames required before publishing
# A match score is the mean of the top-k most similar reference photos of a person.
# Higher resists a single lucky photo, but drags down people whose references cover
# many angles — their own less similar photos pull the mean. Measure before changing:
# scripts/measure-recognition.py --top-k N. On one real gallery, 1 nearly doubled
# correct recognitions over 3 with no misassignments.
match_top_k: 3
max_faces_per_person: 40 # soft cap; the most redundant photo is set aside
trimmed_keep: 10 # how many set-aside photos to keep per person (0 = delete)
dedupe_threshold: 0.65 # default sensitivity of the "remove duplicates" action
hires_enroll: true # fetch review-queue faces from the recording instead of
# the detect snapshot — typically twice the face size
ignore_threshold: 0.50 # similarity at which a face counts as ignored
# (defaults to match_threshold when unset)
ignore_margin: 0.12 # ignore must beat every enrolled person by this much
ignore_learning: true # learn new looks of ignored people as extra anchors
min_face_px: 48 # minimum face size in the snapshot (pixels)
min_face_quality: 0.35 # blur/light/pose/size gate before matching
det_size: 640 # detection input size (higher = better far faces, slower)
max_attempts: 6 # recognition attempts per Frigate event
clip_analysis: true # sample the finished clip for diverse, stronger evidence
clip_max_frames: 24
clip_max_samples: 8
clip_retry_attempts: 3 # a finished event clip may need a moment to appear
clip_retry_seconds: 10 # unavailable is retried; a readable clip with no face is final
# Clips are downloaded once and shared by recognition + browser playback.
# These hard disk-cache limits protect the host from long recordings.
media_max_clip_mb: 150
media_cache_mb: 1000
media_retention_hours: 24
audit_retention_days: 90 # SQLite decision history (0 = keep forever)
known_evidence_days: 30 # local review images for recognized people
unknown_evidence_days: 14 # local review images for unknown/review events
liveness_enabled: true # passive RGB print/screen attack reduction
liveness_threshold: 0.5 # raise for stricter security and more false rejects
liveness_required_frames: 3 # consecutive live frames before required-mode identity
frigate_topic_prefix: frigate # must match `mqtt.topic_prefix` in Frigate's config
poll_interval: 0 # seconds; >0 also polls Frigate's event API.
# Catches events MQTT never announces — notably
# ones created through Frigate's API (e.g. a
# camera's own person detection used as a
# reliability bridge). 30 is a sensible value.
retry_seconds: 2.5 # min. seconds between attempts on the same event
cluster_eps: 0.55 # DBSCAN cosine distance for grouping unknowns in the UI
# review UI: unknown faces with a best-match score >= this get grouped into a
# "Looks like <person>" suggestion with the dropdown pre-selected. Keep below
# match_threshold so borderline faces are pre-sorted without weak-match noise.
suggest_threshold: 0.40
set_sub_label: false # opt-in: write confirmed names back to Frigate events
access_control_enabled: false # 5.0 role foundation; enable only after assignments are configured
guest_match_threshold: 0.62 # stricter than the resident recognition default
guest_match_margin: 0.12 # guest must clearly lead every other identity
presence_window: 120 # camera sensor shows everyone seen within this window (s)
calibration_target_far: 0.01 # maximum false-accept rate for recommendations
scenario_window: 90 # seconds for a visit to continue across cameras
camera_graph: # optional adjacency; omit to allow every camera transition
front_door: [hall]
hall: [front_door, garden]
garden: [hall]
reid_enabled: true # clothing continuity hint; never declares face identity
reid_ttl: 180
reid_threshold: 0.90
automation_cooldown: 60
webhook_urls: [] # receive the same versioned payload as faceid/v1/events
ai_enabled: false # optional local Ollama vision + semantic event search
ai_url: http://localhost:11434
ai_vision_model: gemma3:4b
ai_embedding_model: embeddinggemma
ai_timeout: 45
# process events only from these cameras (empty = all cameras)
cameras: []
# cameras that get a Home Assistant discovery sensor (sensor.faceid_<camera>)
discovery_cameras: [front_door, garden]
# optional HTTP Basic Auth for the web UI + API (recommended for standalone
# installs; leave empty to disable — the HA add-on is protected by ingress)
auth:
user: ""
password: ""