SegmenterSettings
Settings for Segmenter. 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: Advanced, Vision
from nutrient_sdk import SegmenterSettingsConstruction
SegmenterSettings 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.segmenter_settings settings.some_field = new_value # mutate fields directly
# SDK-wide default (applies to all documents)SdkSettings.segmenter_settings.some_field = new_valueSettings are configured by writing to fields on the returned object. The settings property itself cannot be reassigned — doc.settings.segmenter_settings = other_settings is rejected.
Properties
confidence_threshold
@propertydef confidence_threshold(self) -> float
@confidence_threshold.setterdef confidence_threshold(self, value: float) -> NoneDetection confidence threshold (0.0 to 1.0). Detections with confidence below this threshold will be filtered out.
Type: float
Default: 0.5f
detect_orientation
@propertydef detect_orientation(self) -> bool
@detect_orientation.setterdef detect_orientation(self, value: bool) -> NoneIndicates whether automatic page orientation detection is enabled.
Type: bool
Default: true
minimum_zone_size
@propertydef minimum_zone_size(self) -> int
@minimum_zone_size.setterdef minimum_zone_size(self, value: int) -> NoneMinimum zone size in pixels (width * height). Zones smaller than this will be filtered out.
Type: int
Default: 100
target_size
@propertydef target_size(self) -> int
@target_size.setterdef target_size(self, value: int) -> NoneTarget size for image preprocessing (height and width).
Type: int
Default: 640
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: true