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.
Tags: Vision
from nutrient_sdk import FormRecognitionSettingsConstruction
FormRecognitionSettings is accessed through a Document instance for per-document overrides, or via SdkSettings for SDK-wide defaults.
# Per-document overridewith Document.open("input.pdf") as doc: settings = doc.settings.form_recognition_settings settings.some_field = new_value # mutate fields directly
# SDK-wide default (applies to all documents)SdkSettings.form_recognition_settings.some_field = new_valueSettings are configured by writing to fields on the returned object. The settings property itself cannot be reassigned — doc.settings.form_recognition_settings = other_settings is rejected.
Properties
confidence_threshold
@propertydef confidence_threshold(self) -> float
@confidence_threshold.setterdef confidence_threshold(self, value: float) -> NoneConfidence threshold for form field predictions. Default is 0.5 as specified in the RF-DETR model.
Type: float
Default: 0.35f
model_path
@propertydef model_path(self) -> str
@model_path.setterdef model_path(self, value: str) -> NonePath to the TorchScript RF-DETR model file (model.onnx).
Type: str
Default: GetDefaultModelPath()
num_classes
@propertydef num_classes(self) -> int
@num_classes.setterdef num_classes(self, value: int) -> NoneNumber of object classes (TextBox, ChoiceButton, Signature).
Type: int
Default: 3
num_select
@propertydef num_select(self) -> int
@num_select.setterdef num_select(self, value: int) -> NoneNumber of top predictions to select during postprocessing. Default is 300 as specified in the RF-DETR configuration.
Type: int
Default: 300
use_cpu_only
@propertydef use_cpu_only(self) -> bool
@use_cpu_only.setterdef use_cpu_only(self, value: bool) -> NoneEnable CPU mode for ONNX. When true, forces CPU execution. When false, attempts to use GPU if available (CUDA/MPS).
Type: bool
Default: false