DB_text_minimal
DB_text_minimal copied to clipboard
[WIP] A Pytorch implementation of DB-Text - Real-time Scene Text Detection with Differentiable Binarization
A Pytorch implementation of DB-Text paper
Make awesome things that matter.
Command
Train model
- Modify some configuration in config.yaml
make train
Test model
make test-all
Evaluate model
- For evaluation metric, please refer to MegReader repository
# iou-based Pascal
make ioueval
# overlap-based DetEval
make deteval
History (on TotalText dataset)
Train data

Test data



Test dataset (TotalText)
| Heatmap | Polygon | Rotated rectangle |
|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Text-line detection (the model trained on CTW1500 dataset)
| Image origin | Text-line detected |
|---|---|
![]() |
![]() |
![]() |
![]() |
Full pipeline



Metric evaluation (DetEval - P/R/HMean)
# for TotalText dataset
make deteval
| Method | image size | init lr | b-thresh | p-thresh | unclip ratio | Precision | Recall | F-measure |
|---|---|---|---|---|---|---|---|---|
| TotalText-resnet18-fcn (word-level) | 640 | 0.005 | 0.25 | 0.50 | 1.50 | 0.70 | 0.64 | 0.67 |
| CTW1500-resnet18-fcn (line-level) | 640 | 0.005 | 0.25 | 0.50 | 1.50 | 0.83 | 0.66 | 0.74 |
ToDo
- [ ] Support datasets
- [x] TotalText
- [x] ICDAR2015
- [x] SCUT-CTW1500
- [x] MSRA-TD500
- [ ] COCO-Text
- [ ] Synthtext
- [ ] ArT2019 (included Total-Text, SCUT-CTW1500 and Baidu Curved Scene Text dataset)
- [ ] Pytorch-lightning
- [x] Model serving with Torchserve
- [x] Metric callback (P/R/F1)
- [x] IoU-based metric (P/R/F1 - Pascal)
- [x] Overlap-based metric (P/R/F1 - DetEval)
- [ ] Model quantization
- [ ] Model pruning
- [ ] Docker / docker-compose
- [ ] ONNX, TensorRT
- [x] Text recognition model
Reference
I got a lot of code from DBNet.pytorch, thanks to @WenmuZhou












