FacesTool interface

Face detection tool configuration (YuNet).

Signature:

export interface FacesTool

Properties

Property Type Description

aggregation?

AggregationStrategy

(Optional)

bucketSecs?

number

(Optional)

confidenceThreshold?

number

(Optional) Detection score threshold (score = sqrt(cls·obj)). Default 0.5 — with the aspect-preserving letterboxed model input, real faces score ~0.5-0.9 even on broadcast wide shots; lower towards 0.3 to pick up very small crowd faces at the cost of noise.

gallery?

({ name: string; image: Uint8Array; } | { name: string; rgb24: Uint8Array; width: number; height: number; })[]

(Optional) Face recognition against an enrolled gallery (SFace). Enrolment images are raw rgb24 frames with ONE prominent subject — the largest confident face is enrolled; a face-less image fails configuration.

gate?

Gate

(Optional) Only run this tool while the gate holds (see Gate).

id?

string

(Optional) Instance id (G3): names this instance so gates can reference it and the same tool may appear more than once. Default: the tool name. Must be unique across localAnalysis.

inferEveryMs?

number

(Optional) Minimum media-time between inferences in ms (framerate-invariant). Default 500. Explicit 0 = every frame.

matchThreshold?

number

(Optional) Cosine similarity an enrolled face must reach. Default 0.4 (OpenCV’s canonical SFace threshold 0.363 plus margin).

model?

"yunet"

(Optional) Today’s model, named for forward compatibility.

sampleN?

number

(Optional)

tool

"faces"

windowSecs

number