PPTextDetSettings
Settings for PPTextDet. 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, Advanced
from nutrient_sdk import PPTextDetSettingsConstruction
PPTextDetSettings 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.pp_text_det_settings settings.some_field = new_value # mutate fields directly
# SDK-wide default (applies to all documents)SdkSettings.pp_text_det_settings.some_field = new_valueSettings are configured by writing to fields on the returned object. The settings property itself cannot be reassigned — doc.settings.pp_text_det_settings = other_settings is rejected.
Properties
box_threshold
@propertydef box_threshold(self) -> float
@box_threshold.setterdef box_threshold(self, value: float) -> NoneThreshold for box confidence
Type: float
Default: 0.6f
limit_side_length
@propertydef limit_side_length(self) -> int
@limit_side_length.setterdef limit_side_length(self, value: int) -> NoneLimit value for resizing, PaddleOCR runtime uses limit_side_len=64, limit_type=‘min’ for better quality
Type: int
Default: 64
limit_type
@propertydef limit_type(self) -> str
@limit_type.setterdef limit_type(self, value: str) -> None‘max’ to limit longest side, ‘min’ to limit shortest side
Type: str
Default: "min"
max_candidates
@propertydef max_candidates(self) -> int
@max_candidates.setterdef max_candidates(self, value: int) -> NoneMaximum number of text boxes to detect
Type: int
Default: 1000
model_path
@propertydef model_path(self) -> str
@model_path.setterdef model_path(self, value: str) -> NonePath to the ONNX model file (model.onnx).
Type: str
Default: GetDefaultModelPath()
threshold
@propertydef threshold(self) -> float
@threshold.setterdef threshold(self, value: float) -> NoneBinarization threshold for probability map
Type: float
Default: 0.3f
unclip_ratio
@propertydef unclip_ratio(self) -> float
@unclip_ratio.setterdef unclip_ratio(self, value: float) -> NoneRatio for polygon expansion (Official PaddleOCR uses 1.5)
Type: float
Default: 1.5f
use_cpu_only
@propertydef use_cpu_only(self) -> bool
@use_cpu_only.setterdef use_cpu_only(self, value: bool) -> NoneEnable CPU mode for ONNX Runtime. When true, forces CPU execution. When false, uses default providers.
Type: bool
Default: false