-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.cloud.example.yaml
More file actions
88 lines (68 loc) · 2.67 KB
/
config.cloud.example.yaml
File metadata and controls
88 lines (68 loc) · 2.67 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
# DMAF Configuration - Cloud Deployment
# This config is used by Cloud Run Job
# WhatsApp incoming media from GCS bucket
# GCS URIs are supported natively — just use gs://bucket/prefix/ and install dmaf[gcs].
# The dedup key is the full gs:// path, so files won't be reprocessed across runs.
# You can mix local paths and GCS URIs in the same list.
watch_dirs:
- "gs://your-project-whatsapp-media"
# Optional: Google Photos album to upload to (null = library root)
# Recommended: set an album name to separate DMAF face-matched uploads from
# your main camera-roll library. Avoids confusion when native Google Photos
# backup and DMAF both upload the same photo (different compression = different
# bytes, so Google Photos won't auto-deduplicate them).
google_photos_album_name: "Family Faces" # change to taste, or set null for library root
# Face Recognition Settings
recognition:
# Backend: "insightface" for cloud deployment
backend: "insightface"
# Matching tolerance - lower = stricter
tolerance: 0.5
# Detection confidence threshold (insightface only)
det_thresh: 0.4
# Detection threshold for known_people images (training set)
det_thresh_known: 0.3
# Use only highest confidence face when multiple detected
return_best_only: true
# Minimum face size in pixels (skip tiny faces)
min_face_size_pixels: 80
# Only upload if at least one known face is detected
require_any_match: true
# Upload if ANY whitelisted person appears
allow_multiple_people: true
# Known people reference images (will be in GCS in production)
# For now, needs to be synced from local data/known_people to GCS or embedded in image
known_people_dir: "./data/known_people"
# Deduplication settings - Using Firestore for cloud
dedup:
method: "sha256"
backend: "firestore"
firestore_project: "your-gcp-project-id"
firestore_collection: "dmaf_files"
# Logging level
log_level: "INFO"
# Delete source files after successful upload (safe for WhatsApp-only folder)
delete_source_after_upload: true
# Delete unmatched files after processing (optional - be careful!)
delete_unmatched_after_processing: false
# Email Alerting & Observability
alerting:
enabled: true
recipients:
- "your-email@example.com"
batch_interval_minutes: 60
borderline_offset: 0.1
event_retention_days: 90
smtp:
host: "smtp.gmail.com"
port: 587
username: "your-smtp-username@gmail.com"
password: "your-gmail-app-password" # Get from Google Account → Security → App Passwords
use_tls: true
sender_email: "your-smtp-username@gmail.com"
# Auto-Refresh Known People Training Images
known_refresh:
enabled: true
interval_days: 60
target_score: 0.65
crop_padding_percent: 0.3