Skip to main content

Detection and matching settings

Two layers of settings shape the face processing pipeline. Per-camera settings are stored with the camera entity and changed through Station or the REST API (PUT /api/v1/Cameras); they choose which detector a camera uses and how strict it is. Service-level settings live in .env of the release package and select the neural networks a service loads; changing them needs docker compose up -d and, for extraction, a template migration. Edge streams have their own equivalents, see the edge settings reference.

Face detector resource ID​

The per-camera faceDetectorResourceId selects where and how face detection runs. The _remote suffix moves detection from the camera service into the dedicated detector service; cpu, gpu or any picks the processing unit; the accurate_ prefix switches from the default Balanced network to Accurate.

ValueWhereUnitNetwork
nonedetection disabled——
cpuin the camera serviceCPUBalanced
gpuin the camera serviceGPUBalanced
accurate_cpuin the camera serviceCPUAccurate
accurate_gpuin the camera serviceGPUAccurate
cpu_remotedetector serviceCPUBalanced
gpu_remotedetector serviceGPUBalanced
any_remotedetector serviceany availableBalanced
accurate_cpu_remotedetector serviceCPUAccurate
accurate_gpu_remotedetector serviceGPUAccurate
accurate_any_remotedetector serviceany availableAccurate

GPU values require GPU acceleration to be enabled on the service (Gpu__GpuEnabled=true), see the GPU acceleration guide. Pedestrian and object detection use the same pattern (pedestrianDetectorResourceId with cpu_remote / gpu_remote / any_remote; objectDetectorResourceId with sfe_object_cpu_remote / sfe_object_gpu_remote / sfe_object_any_remote).

Detection algorithms​

The detector service preloads the networks listed in Warmup__DetectionAlgorithms (.env, comma-separated). Supported values are fast, balanced_mask and accurate_mask; the default is balanced_mask. The _mask networks also produce the face-mask attributes; fast does not.

Warmup__DetectionAlgorithms=balanced_mask

Confidence threshold and face size​

Camera settingRangeDefaultEffect
Detection confidence threshold0 – 10,000450Minimum detector confidence for a face to be accepted. Higher values reject non-faces but may miss real faces; 3,000 and above is a safe choice.
Minimum face sizepixels—Faces smaller than this are ignored. Faces under 25 px have poor biometric quality; 30 px or more is recommended.
Maximum face sizepixels—Faces larger than this are ignored; useful to skip people very close to the lens.
Detection intervalms—How often full-frame detection runs; tracking covers the frames in between.

Face size is the larger of the eye distance and the eye-to-mouth distance. The Station camera settings reference lists every per-camera field.

Face mask detection​

The extractor reports three mask-related attributes on Face and MatchResult entities, available in REST, GraphQL and notifications:

AttributeRangeMeaning
FaceMaskConfidence-10,000 – 10,000Confidence that a mask is present; higher means more likely.
NoseTipConfidence0 – 10,000Confidence that the nose tip is visible, i.e. that a mask is not worn properly.
FaceMaskStatusMask, NoMask, UnknownDerived from FaceMaskConfidence using the FaceMaskThreshold of FaceMaskConfidenceConfig.

Mask detection is not available with the fast detection network. Faces created before mask detection existed have null confidences and status Unknown. The watchlist autolearn feature uses these attributes to keep masked and unmasked reference faces apart.

Extraction algorithm​

The extractor service generates templates with one algorithm, selected by Extraction__Algorithm in .env. Each algorithm produces templates of a specific template version; the watchlist matcher and the face search service can only compare templates of the versions they were seeded with.

Extraction__AlgorithmTemplate versionNotes
fast52Fastest, lowest accuracy.
balanced53Default.
accurate54Higher accuracy, more CPU per face.
accurate_server55Highest accuracy, intended for server-class hardware.

The release package also lists specialised algorithms (accurate_mask, accurate_server_nist, accurate_server_nist_p1, accurate_server_visa, accurate_server_wild, frte_1N_014). They are not covered by the bundled migration scripts and are outside the scope of this documentation.

Choose the algorithm right after installation, before any watchlist member is enrolled. If the database already holds templates of another version, run the template migration (migrate-faces.sh, with FACE_MODEL_VERSION set to the target version) after changing the setting; otherwise enrolled members will not match. Back up the database first. The procedure is in the template migration guide.

# .env
Extraction__Algorithm=accurate
docker compose up -d extractor

Matching threshold​

The matching threshold is the score (0 – 100) at or above which a comparison counts as a match. It is set per watchlist, so a VIP list can be stricter than a staff list. The platform default is 40. Only the best-scoring member is reported for a face. The matcher service itself has one tuning knob in .env, Matching__ThreadCount (default 4), which sets how many threads compare templates in parallel.

Raise the threshold when false matches are the problem, lower it when genuine members are rejected, and re-measure after each change; the reasoning is in Tuning identification. Watchlist search through the REST API takes its own threshold parameter per request.

Object detection algorithm​

The object-detector service selects its network with Detection__Algorithm (balanced default, fast, accurate) and applies Detection__ClassThreshold (default 5000) as the minimum class confidence. Which object types a camera reports, the object size range and the per-camera confidence threshold are part of the camera's objectDetectorConfig.

Pedestrian attribute thresholds​

The pedestrian-extractor service interprets raw attribute confidences (0 – 10,000) with upper and lower thresholds: above the upper threshold the attribute is true, below the lower threshold false, in between it is left out of the response.

SettingDefault
Extraction__Attributes__AppendInterpretedAttributestrue
Extraction__Attributes__AppendConfidenceAttributesfalse
Extraction__Attributes__AppendInterpretedAttributesUnderLowerThresholdfalse
Extraction__Attributes__InterpretationThresholds__CommonThresholdUpper / Lower8000 / 4000
Extraction__Attributes__InterpretationThresholds__GlassesThresholdUpper / Lower8000 / 4000
Extraction__Attributes__InterpretationThresholds__HoldThresholdUpper / Lower7000 / 3000