DBNet.pytorch

A pytorch re-implementation of Real-time Scene Text Detection with Differentiable Binarization.

Requirements

  • pytorch 1.1+
  • torchvision 0.3+
  • pyclipper
  • opencv3

Download

TBD

Data Preparation

train: prepare a text in the following format, use '\t' as a separator

/path/to/img.jpg path/to/label.txt
...

val:
use a folder

img/ store img
gt/ store gt file

Train

  1. config the train_data_path,val_data_pathin config.json
  2. use following script to run
python3 train.py

Test

eval.py is used to test model on test dataset

  1. config model_path, img_path, gt_path, save_path in eval.py
  2. use following script to test
python3 eval.py

Predict

predict.py is used to inference on single image

  1. config model_path, img_path, in predict.py
  2. use following script to predict
python3 predict.py

The project is still under development.

Performance

ICDAR 2015

only train on ICDAR2015 dataset

Method image size (short size) learning rate Precision (%) Recall (%) F-measure (%) FPS
DB-ResNet-18(paper) 736 0.007 86.8 78.4 82.3 48
TBD 736 1e-3 TBD TBD TBD TBD

examples

TBD

reference

  1. https://arxiv.org/pdf/1911.08947.pdf
  2. https://github.com/WenmuZhou/PANet.pytorch

GitHub