Skip to main content

Data retention

Face Matcher can keep everything it sees, or almost nothing, and the difference is configuration. This page explains what is stored where and which settings shape the volume and lifetime of that data. The procedures for setting cleanup schedules and freeing space are in the data retention and cleanup guide; the privacy view is in Data and privacy.

What is stored where​

DataStoreCan be switched off
Watchlists, members, cameras, detections, match results, configurationPostgreSQLNo
Face templates (of members and of detected faces)PostgreSQLNo
Enrollment pictures of membersSeaweedFS (S3)Yes
Crops of detected faces, pedestrians and objectsSeaweedFS (S3)Yes
Full frames of detectionsSeaweedFS (S3)Yes

A template is a numeric vector that cannot be turned back into a picture and carries no name or ID; the images are the sensitive part, and they are the part you can limit or drop.

Storage mode​

The global switch is the video storage mode, read and set with GET/PUT /api/v1/Setup/DataStorage/Video:

storageModeEffect
All (default)Detections from cameras and edge streams are stored with images according to the save strategies below; database events are emitted.
NoneNothing from live sources is stored and no database events are emitted; only direct events (FaceProcessed, match results) are delivered. Watchlists and their images are unaffected.

None is the setting for deployments that only need real-time decisions. Note that features which read stored detections, face search and watchlist autolearn, stop working.

Save strategies​

With storage mode All, each camera or edge stream decides how much of a tracklet is kept. The strategies are set per source in Station or via PUT /api/v1/Cameras and PUT /api/v1/EdgeStreams.

SettingValuesDefaultMeaning
faceSaveStrategyBalanced, All, MatchedOnly, NoneBalancedBalanced keeps a new image whenever the tracklet reaches a better detection quality or match score; All keeps every face; MatchedOnly applies the balanced logic to matched faces only; None keeps nothing unless a linked object is saved.
saveFrameImageDatatrue, falsetrueStore the full frame next to the crop. Full frames are the largest objects; turn them off first when space or privacy is a concern.
pedestrianSaveStrategyBalanced, All, NoneBalancedSame idea for pedestrian tracklets.
objectSaveStrategyBalanced, All, MatchedOnly, NoneBalancedSame idea for object tracklets.
Image quality1 – 100—JPEG quality of stored images.

How much "better" a detection must be for Balanced to save another image is tuned in .env: BalancedFaceStrategy__QualityStep=1000, BalancedFaceStrategy__MatchScoreStep=10, MatchedOnlyFaceStrategy__MatchScoreStep=10, and the equivalents for pedestrians and objects.

Retention presets​

GoalSettings
Unlimited storage, full evidencefaceSaveStrategy: All, saveFrameImageData: true, image quality 100
Privacy / GDPRfaceSaveStrategy: MatchedOnly, saveFrameImageData: false
Compact datafaceSaveStrategy: Balanced, saveFrameImageData: false, image quality 70
No datastorageMode: None

Switching image storage off​

NoSqlDataStorageDisabled=true in .env stops all services from writing images to S3: no enrollment pictures, no crops, no full frames. Detection, extraction, matching and liveness keep working and events keep flowing, but nothing can be visualised in Station's history and, because the enrollment pictures are gone, member templates can no longer be migrated to a newer extraction algorithm; members would have to be re-enrolled. The default is false (images are stored). The value applies to base, api, the camera services, streamdatadbworker, edge-stream-processor and edge-streams-state-synchronizer.

Lifetime​

Stored detections do not expire on their own. The base service runs a daily database cleanup configured through GET/PUT /api/v1/Setup/DbCleanup: a maximum age in days and/or a maximum number of frames, a start time (UTC), whether to delete only the images or also the SQL records, and whether to drop match results whose faces are gone. Cleanup never touches watchlists or members. Face search sessions are pruned by the same job. Schedules, sizing and space recovery on SeaweedFS and PostgreSQL are covered in the data retention and cleanup guide; protecting the stores is covered in Backup and restore.