Basics · DBPostProcess Mechanics · thresh 0.2..0.7 · unclip_ratio 1.0..2.2 · onnxruntime-web@1.21.0 WASM

DBNet Probability Threshold & Unclip-Ratio Ablation

Differentiable Binarization predicts shrunk text-line kernels so adjacent lines do not fuse, then expands each surviving blob outward by d = (area × unclip_ratio) / perimeter. Sweep thresh from 0.2 to 0.7 and unclip_ratio from 1.0 to 2.2 on a live PaddlePaddle/PP-OCRv6_small_det_onnx probability map to watch box merging, fragmenting, and raw 8-connected component counts directly.

Side-by-side comparison: Low threshold (0.2) vs Active threshold

Low threshold · thresh = 0.20 (merging risk)

Active setting · thresh = 0.40 · unclip = 1.40

Loading starter Wikipedia article scene…

Connected components & surviving polygons across thresh 0.2 → 0.7

Surviving DBNet polygons Raw 8-connected components Selected threshold marker

Threshold sweep table (0.2..0.7) — click any row to inspect

Live PP-OCRv6 Small DBNet ablation across binarization thresholds 0.2 to 0.7
Threshold Raw Components Polygons Mean Score Mean Box Area Active Pixels Behavior

How DBNet unclipping & ablation work

Show the code — Rotating-calipers minimum-area rect & DBNet Vatti unclip expansion (minAreaUnclippedRect)
Show the code — Deterministic 0.2..0.7 threshold & 1.0..2.2 unclip-ratio sweep (runThresholdAblation)