This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /api/csharp/settings/vision/advanced/inference-layout-settings.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. InferenceLayoutSettings

Settings for InferenceLayout. 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

ConfidenceThreshold

public float ConfidenceThreshold { get; set; }

Detection confidence threshold (0.0 to 1.0). Detections with confidence below this threshold will be filtered out.

Type: float

GroupExpansionHeightRatio

public float GroupExpansionHeightRatio { get; set; }

Recovery grouping: proximity-cluster expansion as a multiple of a box’s height (bridges lines within a block). Larger merges more aggressively.

Type: float

HandwritingLayoutRecovery

public bool HandwritingLayoutRecovery { get; set; }

Master switch for handwriting layout recovery: on pages the detector under-segments, harvest its sub-threshold boxes and consolidate them into block zones. Default on — the gate is selective (it fires only on genuinely under-segmented pages), the recovery is additive (it only adds blocks over un-zoned space, never replaces refined zones), and it is measured ParseBench-neutral on printed documents while recovering handwriting the detector would otherwise lose entirely.

Type: bool

HarvestConfidenceFloor

public float HarvestConfidenceFloor { get; set; }

Recovery harvest: on a triggered page, keep detections down to this confidence. The detector’s internal detection floor is max(ConfidenceThreshold - 0.2, 0.1). Detections below that floor are unavailable for recovery, even if this setting is lower. At the default ConfidenceThreshold of 0.5, the effective recovery floor is therefore at least 0.3. Set this below ConfidenceThreshold to recover sub-threshold detections.

Type: float

MergeRecoveredFragments

public bool MergeRecoveredFragments { get; set; }

When set (the default), a small recovered fragment that continues an adjacent same-row text zone is MERGED into that zone (extending it) instead of standing alone, and the VLM crop of any zone masks the picture regions it overlaps so the merged rectangle is read as its true (non-rectangular) content. Clear it to keep recovered zones disjoint from the detector’s zones (no merge, no crop masking).

Type: bool

RecoveryWordCoverageCeiling

public float RecoveryWordCoverageCeiling { get; set; }

Recovery discriminator: skip recovery when the fraction of the page’s recognised words already covered by the kept (>= ConfidenceThreshold) zones meets or exceeds this value. A well-segmented printed/complex page has high word coverage even when non-text ink (charts, figures) sits outside the zones, so this suppresses the ink gate’s false positives; an under-segmented handwriting scan has near-zero covered words and still recovers. Ignored when HandwritingLayoutRecovery is off.

Type: float

UnderSegmentationInkThreshold

public float UnderSegmentationInkThreshold { get; set; }

Recovery gate: trigger when the fraction of text-like ink OUTSIDE the kept (>= ConfidenceThreshold) zones exceeds this value. Higher = fires on fewer pages. Ignored when HandwritingLayoutRecovery is off.

Type: float

Resource management

public void Dispose()

InferenceLayoutSettings 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.