FormRecognitionSettings
Settings for FormRecognition. Values fall back through three levels: document → SDK → built-in default. Writes target the document only when set on a document’s settings, otherwise the SDK globally when set on SdkSettings.
using Nutrient;The SDK creates this class through factory methods or other SDK objects.
Properties
CheckboxLogitBias
public float CheckboxLogitBias { get; set; }Logit bias applied to the Checkbox class before sigmoid during postprocessing. Positive values increase Checkbox detections, negative values suppress them. Default 0 (no bias).
Type: float
ConfidenceThreshold
public float ConfidenceThreshold { get; set; }Confidence threshold for form field predictions that always exist as real fields, independent of the Specialist form-field VLM. This value has moved twice before (0.5 -> 0.35 -> 0.2), each time lowered because the 3-class form-field-v1 medium detector was observed to surface real-form fields at lower confidence than the synthetic benchmark implied. Default 0.35 (not the original, never-validated-on-real-documents 0.5 spec default) restores some of that precision, which is only safe because LowConfidenceThreshold now exists to recover genuinely weak-but-real fields when the VLM independently corroborates one geometrically (see FormVlmCorrelator’s three-phase matching) — raising this value without that corroboration path would reintroduce the exact recall loss this setting was lowered twice to avoid.
Type: float
LowConfidenceThreshold
public float LowConfidenceThreshold { get; set; }A second, much lower confidence floor for form field predictions that must NEVER be trusted on their own and must NEVER be written to the DocumentGraph — candidates between this value and ConfidenceThreshold only ever become real fields when the Specialist form-field VLM independently corroborates one geometrically (FormVlmCorrelator phase 3). This is what lets ConfidenceThreshold sit higher (fewer uncorroborated false positives) without losing recall on genuinely real fields the detector alone is unsure about. Must be <= ConfidenceThreshold; default 0.1 (tuned after field testing).
Type: float
ModelPath
public string ModelPath { get; set; }Path to the ONNX RF-DETR model file (model.onnx).
Type: string
NumSelect
public int NumSelect { get; set; }Number of top predictions to select during postprocessing. Default is 300 as specified in the RF-DETR configuration.
Type: int
SignatureLogitBias
public float SignatureLogitBias { get; set; }Logit bias applied to the Signature class before sigmoid during postprocessing. Positive values increase Signature detections, negative values suppress them. Default 0 (no bias).
Type: float
TextLogitBias
public float TextLogitBias { get; set; }Logit bias applied to the Text class before sigmoid during postprocessing. Positive values increase Text detections, negative values suppress them. Default 0 (no bias).
Type: float
UseCpuOnly
public bool UseCpuOnly { get; set; }Enable CPU mode for ONNX. When true, forces CPU execution. When false, attempts to use GPU if available (CUDA/MPS).
Type: bool
Resource management
public void Dispose()FormRecognitionSettings implements IDisposable. Call Dispose() or use a C# using declaration to release its native handle right away. If you don’t, the handle is released when the object is garbage collected.