SURFZJY / Real-time-Text-Detection-DBNet

PyTorch re-implementation of ''Real-time Scene Text Detection with Differentiable Binarization'' (AAAI 2020)
Apache License 2.0
97 stars 19 forks source link
differentiable-binarization pytorch real-time scene-text-detection text-detection

Real-time-Text-Detection

PyTorch re-implementation of Real-time Scene Text Detection with Differentiable Binarization

contour

Difference between thesis and this implementation

  1. Use dice loss instead of BCE(binary cross-entropy) loss.

  2. Use normal convolution rather than deformable convolution in the backbone network.

  3. The architecture of the backbone network is a simple FPN.

  4. Have not implement OHEM.

  5. The ground truth of the threshold map is constant 1 rather than 'the distance to the closest segment'.

Introduction

thanks to these project:

The features are summarized blow:

Contents

  1. Installation
  2. Download
  3. Train
  4. Predict
  5. Eval
  6. Demo

Installation

  1. pytorch 1.1.0

Download

  1. ShuffleNet_V2 Models trained on ICDAR 2013+2015 (training set)

https://pan.baidu.com/s/1Um0wzbTFjJC0jdJ703GR7Q

or https://mega.nz/#!WdhxXAxT!oGURvmbQFqTHu5hljUPdbDMzI75_UO2iWLaXX5dJrDw

Train

  1. modify genText.py to generate txt list file for training/testing data

  2. modify config.json

  3. run

python train.py

Predict

  1. run
    python predict.py

Eval

run

python eval.py

Examples

contour bbox

Todo