Class PIITextRedactionSettings
- Namespace
- VisioForge.Core.Types.X.AI
- Assembly
- VisioForge.Core.dll
On-screen-text-category settings for the PII redaction block. Text regions are located with the PaddleOCR
PP-OCR detection model and confirmed with the recognition model (both Apache-2.0): recognition is what
filters the detector's false positives (on a real scene the detector alone fires on textures and edges, so
detection without recognition would redact most of the frame). By default every recognized text region is
redacted; set VisioForge.Core.Types.X.AI.PIITextRedactionSettings.TextFilterRegex to redact only the regions whose recognized text matches (for
example e-mail addresses or phone numbers). The detection, recognition, and dictionary models are all
required whenever VisioForge.Core.Types.X.AI.PIITextRedactionSettings.Enabled is true.
public class PIITextRedactionSettingsInheritance
Inherited Members
Properties
BoxScoreThreshold
Gets or sets the minimum mean probability a detected region must reach to be kept. Defaults to 0.5.
public float BoxScoreThreshold { get; set; }Property Value
BoxThreshold
Gets or sets the binarization threshold applied to the detector probability map. Defaults to 0.3.
public float BoxThreshold { get; set; }Property Value
CharacterDictionaryPath
Gets or sets the path to the recognizer character dictionary (one symbol per line). Required when
VisioForge.Core.Types.X.AI.PIITextRedactionSettings.Enabled is true; must match the recognition model's language.
public string CharacterDictionaryPath { get; set; }Property Value
ClassificationModelPath
Gets or sets the path to the angle-classification ONNX model that corrects 180°-rotated text. Optional.
public string ClassificationModelPath { get; set; }Property Value
DetectionModelPath
Gets or sets the path to the text-detection (DBNet) ONNX model. Required when VisioForge.Core.Types.X.AI.PIITextRedactionSettings.Enabled is true.
public string DetectionModelPath { get; set; }Property Value
Enabled
Gets or sets a value indicating whether on-screen text is redacted. Can be toggled off (and back on)
while the pipeline is running only if the category was enabled when the block was built; enabling a
category that was disabled at build time has no effect until the block is rebuilt (the detector is
created only for categories enabled at build). Defaults to true.
public bool Enabled { get; set; }Property Value
Remarks
Volatile-backed: it is written from the UI thread (a live toggle) and read on the block's detection and streaming threads, so the flag must be published across threads for the toggle to take effect promptly on weak memory models.
MaxSideLength
Gets or sets the side length, in pixels, the detector input's longer side is resized to. Defaults to 1024. Set to 0 (or a negative value) to use the adaptive PP-OCRv5 resize path instead.
public int MaxSideLength { get; set; }Property Value
RecognitionModelPath
Gets or sets the path to the text-recognition (CRNN/SVTR) ONNX model. Required when
VisioForge.Core.Types.X.AI.PIITextRedactionSettings.Enabled is true — recognition filters out the detector's non-text false positives.
public string RecognitionModelPath { get; set; }Property Value
TextFilterRegex
Gets or sets a regular expression applied to the recognized text of each region. null or empty
(the default) redacts ALL recognized text. A non-empty pattern redacts only the regions whose
recognized text matches (for example e-mail addresses or phone numbers). Recognition runs regardless
(it is what filters non-text detections); this only narrows which recognized regions are redacted.
public string TextFilterRegex { get; set; }Property Value
UnclipRatio
Gets or sets the unclip ratio used to expand detected text polygons. Defaults to 1.6.
public float UnclipRatio { get; set; }