Class FaceRecognitionSettings
- Namespace
- VisioForge.Core.Types.X.AI
- Assembly
- VisioForge.Core.dll
Settings for the face recognition (face identity) block. The block runs a two-stage pipeline: a face detector (YuNet) locates faces and their five landmarks, each face is aligned to a canonical 112x112 crop and turned into an embedding (SFace / ArcFace), and the embedding is matched 1:N against an enrolled VisioForge.Core.Types.X.AI.FaceGallery by cosine similarity.
public class FaceRecognitionSettingsInheritance
Inherited Members
Remarks
The default models are the OpenCV Zoo YuNet detector (MIT) and SFace recognizer (Apache-2.0), which are designed to work together (SFace aligns with YuNet's five landmarks). Model weights are not shipped with the SDK; point VisioForge.Core.Types.X.AI.FaceRecognitionSettings.DetectorModelPath and VisioForge.Core.Types.X.AI.FaceRecognitionSettings.EmbeddingModelPath at the ONNX files.
Constructors
FaceRecognitionSettings()
Initializes a new instance of the VisioForge.Core.Types.X.AI.FaceRecognitionSettings class.
public FaceRecognitionSettings()FaceRecognitionSettings(string, string)
Initializes a new instance of the VisioForge.Core.Types.X.AI.FaceRecognitionSettings class with model paths.
public FaceRecognitionSettings(string detectorModelPath, string embeddingModelPath)Parameters
detectorModelPathstring-
Path to the face-detection model.
embeddingModelPathstring-
Path to the face-embedding model.
Properties
BoxColor
Gets or sets the color used for face boxes and labels when VisioForge.Core.Types.X.AI.FaceRecognitionSettings.DrawResults is enabled. Defaults to lime green.
public SKColor BoxColor { get; set; }Property Value
BoxThickness
Gets or sets the stroke thickness, in pixels, of the face boxes. Defaults to 2.
public float BoxThickness { get; set; }Property Value
DetectionConfidenceThreshold
Gets or sets the minimum detection score (0..1) a face must reach to be kept. Defaults to 0.6.
public float DetectionConfidenceThreshold { get; set; }Property Value
DetectionInputSize
Gets or sets the square input size, in pixels, the frame is letterboxed into for the detector. Must be a multiple of 32 (YuNet requirement); non-multiples are rounded up internally. Defaults to 320.
public int DetectionInputSize { get; set; }Property Value
DetectorModelPath
Gets or sets the path to the face-detection ONNX model (YuNet). Required.
public string DetectorModelPath { get; set; }Property Value
DeviceId
Gets or sets the hardware device id for CUDA / DirectML. Defaults to 0.
public int DeviceId { get; set; }Property Value
DrawLandmarks
Gets or sets a value indicating whether the five facial landmarks are drawn for each face. Defaults to false.
public bool DrawLandmarks { get; set; }Property Value
DrawResults
Gets or sets a value indicating whether recognized faces are drawn into the video frame. Defaults to true.
public bool DrawResults { get; set; }Property Value
EmbeddingModel
Gets or sets the embedding model family, which selects the aligned-crop preprocessing. Defaults to VisioForge.Core.Types.X.AI.FaceEmbeddingModel.SFace.
public FaceEmbeddingModel EmbeddingModel { get; set; }Property Value
EmbeddingModelPath
Gets or sets the path to the face-embedding ONNX model (SFace / ArcFace). Required.
public string EmbeddingModelPath { get; set; }Property Value
FramesToSkip
Gets or sets the number of frames to skip between recognitions on live video. 0 processes every frame.
public int FramesToSkip { get; set; }Property Value
Gallery
Gets or sets the enrolled face gallery the detected faces are matched against. When null or empty,
faces are detected and embedded but reported as unknown (no identity).
public FaceGallery Gallery { get; set; }Property Value
LabelFontSize
Gets or sets the label font size, in pixels. A value of 0 auto-scales the font to the frame height. Defaults to 0.
public float LabelFontSize { get; set; }Property Value
MaxFaces
Gets or sets the maximum number of faces to detect per frame. Defaults to 20.
public int MaxFaces { get; set; }Property Value
NmsThreshold
Gets or sets the IoU threshold (0..1) used to suppress overlapping face boxes. Defaults to 0.3.
public float NmsThreshold { get; set; }Property Value
Provider
Gets or sets the execution provider. Defaults to VisioForge.Core.Types.X.AI.OnnxExecutionProvider.Auto.
public OnnxExecutionProvider Provider { get; set; }Property Value
RecognitionThreshold
Gets or sets the minimum cosine similarity (typically 0..1) an embedding must reach against a gallery entry to be reported as that identity. Defaults to 0.36 (the SFace same-identity threshold).
public float RecognitionThreshold { get; set; }