Models2020Runs on this site

DBNet: Real-time Scene Text Detection with Differentiable Binarization

A segmentation network that learns its own binarization threshold, so post-processing shrinks to one contour pass. The family behind PaddleOCR's detectors, and the one running on this site.

Minghui Liao, Zhaoyi Wan, Cong Yao, Kai Chen, Xiang Bai · AAAI 2020 · Segmentation (differentiable binarization) · last verified 2026-09-05

Segmentation detectors predict, for every pixel, the probability that it belongs to text. Turning that probability map into boxes needs a threshold, and before DBNet (Liao et al., AAAI 2020) the threshold was a fixed number chosen by hand. DB adds a second output, a threshold map, and combines the two with a steep sigmoid so that binarization becomes a differentiable operation the network can learn. At inference the threshold branch is dropped; a plain threshold on the probability map, one contour pass and a polygon “unclip” step produce the final shapes.

Why every OCR toolkit picked it

  • Accuracy and speed together. The abstract reports an F-measure of 0.828 at 62 FPS on MSRA-TD500 with a ResNet-18 backbone.
  • Arbitrary shapes. Because the output is a mask, curved and rotated text come out as polygons with no special cases.
  • Tiny post-processing. No affinity maps, no character grouping, no NMS.

PaddleOCR’s PP-OCR detectors, MMOCR’s default detector, docTR’s db_resnet50 and OpenCV’s TextDetectionModel_DB are all DB-family models. The detector on this site runs PP-OCRv6 and PP-OCRv5 detection models, which are DB-style networks with lighter backbones, exported to ONNX.

DB++ (2022)

Real-Time Scene Text Detection with Differentiable Binarization and Adaptive Scale Fusion (Liao et al., TPAMI 2022, arXiv:2202.10304) adds an Adaptive Scale Fusion module that weights multi-scale features before segmentation, improving robustness to text size. The DB idea is unchanged.

Knobs you will meet in code

Parameter What it does Typical value
binary threshold probability above which a pixel counts as text 0.3
box / polygon threshold minimum mean score inside a region to keep it 0.5–0.7
unclip ratio how far to expand the shrunken kernel back to the full text 1.5–2.0
max candidates cap on regions considered 1000

The OpenCV guide shows these in a runnable script.

Citation

@inproceedings{liao2020db,
  title     = {Real-time Scene Text Detection with Differentiable Binarization},
  author    = {Liao, Minghui and Wan, Zhaoyi and Yao, Cong and Chen, Kai and Bai, Xiang},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year      = {2020}
}