---
title: "PPTextDetSettings"
canonical_url: "https://www.nutrient.io/api/python/settings/vision/advanced/pp-text-det-settings/"
md_url: "https://www.nutrient.io/api/python/settings/vision/advanced/pp-text-det-settings.md"
last_updated: "2026-10-26T16:51:00.819Z"
description: "Settings for PPTextDet. Values fall back through three levels: document → SDK → built-in default."
---

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`

```python

from nutrient_sdk import PPTextDetSettings

```

## Construction

`PPTextDetSettings` is accessed through a [`Document`](/api/python/document/) instance for per-document overrides, or via [`SdkSettings`](/api/python/settings/document/sdk-settings/) for SDK-wide defaults.

```python

# Per-document override

with 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_value

```

Settings 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

```python

@property
def box_threshold(self) -> float

@box_threshold.setter
def box_threshold(self, value: float) -> None

```

Threshold for box confidence

**Type:** `float`

**Default:** `0.6f`

---

### limit_side_length

```python

@property
def limit_side_length(self) -> int

@limit_side_length.setter
def limit_side_length(self, value: int) -> None

```

Limit value for resizing, PaddleOCR runtime uses limit_side_len=64, limit_type='min' for better quality

**Type:** `int`

**Default:** `64`

---

### limit_type

```python

@property
def limit_type(self) -> str

@limit_type.setter
def limit_type(self, value: str) -> None

```

'max' to limit longest side, 'min' to limit shortest side

**Type:** `str`

**Default:** `"min"`

---

### max_candidates

```python

@property
def max_candidates(self) -> int

@max_candidates.setter
def max_candidates(self, value: int) -> None

```

Maximum number of text boxes to detect

**Type:** `int`

**Default:** `1000`

---

### model_path

```python

@property
def model_path(self) -> str

@model_path.setter
def model_path(self, value: str) -> None

```

Path to the ONNX model file (model.onnx).

**Type:** `str`

**Default:** `GetDefaultModelPath()`

---

### threshold

```python

@property
def threshold(self) -> float

@threshold.setter
def threshold(self, value: float) -> None

```

Binarization threshold for probability map

**Type:** `float`

**Default:** `0.3f`

---

### unclip_ratio

```python

@property
def unclip_ratio(self) -> float

@unclip_ratio.setter
def unclip_ratio(self, value: float) -> None

```

Ratio for polygon expansion (Official PaddleOCR uses 1.5)

**Type:** `float`

**Default:** `1.5f`

---

### use_cpu_only

```python

@property
def use_cpu_only(self) -> bool

@use_cpu_only.setter
def use_cpu_only(self, value: bool) -> None

```

Enable CPU mode for ONNX Runtime. When true, forces CPU execution. When false, uses default providers.

**Type:** `bool`

**Default:** `false`

---

---

## Related pages

- [Advanced](/api/python/settings/vision/advanced.md)
- [Per-document override](/api/python/settings/vision/advanced/ai-augmenter-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/ai-processing-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/anthropic-api-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/claude-api-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/content-extraction-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/custom-vlm-api-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/deskew-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/document-layout-json-export-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/finalizer-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/form-labeling-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/form-recognition-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/form-vlm-connection-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/form-vlm-fallback-connection-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/google-api-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/handwriting-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/inference-layout-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/inline-style-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/local-ai-processing-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/local-vlm-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/ocr-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/omr-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/open-ai-api-endpoint-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/open-ai-languages-detection-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/open-ai-picture-alt-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/pp-text-rec-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/preprocessing-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/reading-order-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/segmenter-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/table-recognition-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/vision-acceleration-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/vision-descriptor-settings.md)
- [Per-document override](/api/python/settings/vision/advanced/words-detection-settings.md)

