huyhoang17 / DB_text_minimal

[WIP] A Pytorch implementation of DB-Text - Real-time Scene Text Detection with Differentiable Binarization

Home Page:https://arxiv.org/abs/1911.08947

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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
  • Pytorch-lightning
  • Model serving with Torchserve
  • Metric callback (P/R/F1)
  • IoU-based metric (P/R/F1 - Pascal)
  • Overlap-based metric (P/R/F1 - DetEval)
  • Model quantization
  • Model pruning
  • Docker / docker-compose
  • ONNX, TensorRT
  • Text recognition model

Reference

I got a lot of code from DBNet.pytorch, thanks to @WenmuZhou

About

[WIP] A Pytorch implementation of DB-Text - Real-time Scene Text Detection with Differentiable Binarization

https://arxiv.org/abs/1911.08947

License:MIT License


Languages

Language:Python 97.7%Language:Makefile 2.3%