All Projects → WenmuZhou → Dbnet.pytorch

WenmuZhou / Dbnet.pytorch

Licence: apache-2.0
A pytorch re-implementation of Real-time Scene Text Detection with Differentiable Binarization

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Dbnet.pytorch

East
A tensorflow implementation of EAST text detector
Stars: ✭ 2,804 (+544.6%)
Mutual labels:  text-detection, ocr
craft-text-detector
Packaged, Pytorch-based, easy to use, cross-platform version of the CRAFT text detector
Stars: ✭ 151 (-65.29%)
Mutual labels:  ocr, text-detection
pytorch.ctpn
pytorch, ctpn ,text detection ,ocr,文本检测
Stars: ✭ 123 (-71.72%)
Mutual labels:  ocr, text-detection
Text Detection
Text detection with mainly MSER and SWT
Stars: ✭ 167 (-61.61%)
Mutual labels:  text-detection, ocr
Psenet.pytorch
A pytorch re-implementation of PSENet: Shape Robust Text Detection with Progressive Scale Expansion Network
Stars: ✭ 416 (-4.37%)
Mutual labels:  text-detection, ocr
Awesome Deep Text Detection Recognition
A curated list of resources for text detection/recognition (optical character recognition ) with deep learning methods.
Stars: ✭ 2,282 (+424.6%)
Mutual labels:  text-detection, ocr
vietnamese-ocr-toolbox
A toolbox for Vietnamese Optical Character Recognition.
Stars: ✭ 26 (-94.02%)
Mutual labels:  ocr, text-detection
Tedeval
TedEval: A Fair Evaluation Metric for Scene Text Detectors
Stars: ✭ 143 (-67.13%)
Mutual labels:  text-detection, ocr
React Native Tesseract Ocr
Tesseract OCR wrapper for React Native
Stars: ✭ 384 (-11.72%)
Mutual labels:  text-detection, ocr
Text Detection Ctpn
text detection mainly based on ctpn model in tensorflow, id card detect, connectionist text proposal network
Stars: ✭ 3,242 (+645.29%)
Mutual labels:  text-detection, ocr
Adelaidet
AdelaiDet is an open source toolbox for multiple instance-level detection and recognition tasks.
Stars: ✭ 2,565 (+489.66%)
Mutual labels:  text-detection, ocr
Megreader
A research project for text detection and recognition using PyTorch 1.2.
Stars: ✭ 332 (-23.68%)
Mutual labels:  text-detection, ocr
Craft Pytorch
Official implementation of Character Region Awareness for Text Detection (CRAFT)
Stars: ✭ 2,220 (+410.34%)
Mutual labels:  text-detection, ocr
Ocr.pytorch
A pure pytorch implemented ocr project including text detection and recognition
Stars: ✭ 196 (-54.94%)
Mutual labels:  text-detection, ocr
East icpr
Forked from argman/EAST for the ICPR MTWI 2018 CHALLENGE
Stars: ✭ 154 (-64.6%)
Mutual labels:  text-detection, ocr
doctr
docTR (Document Text Recognition) - a seamless, high-performing & accessible library for OCR-related tasks powered by Deep Learning.
Stars: ✭ 1,409 (+223.91%)
Mutual labels:  ocr, text-detection
Craft Remade
Implementation of CRAFT Text Detection
Stars: ✭ 127 (-70.8%)
Mutual labels:  text-detection, ocr
Craft keras
Keras implementation of Character Region Awareness for Text Detection (CRAFT)
Stars: ✭ 143 (-67.13%)
Mutual labels:  text-detection, ocr
PSENet-Tensorflow
TensorFlow implementation of PSENet text detector (Shape Robust Text Detection with Progressive Scale Expansion Networkt)
Stars: ✭ 51 (-88.28%)
Mutual labels:  ocr, text-detection
Chineseaddress ocr
Photographing Chinese-Address OCR implemented using CTPN+CTC+Address Correction. 拍照文档中文地址文字识别。
Stars: ✭ 309 (-28.97%)
Mutual labels:  text-detection, ocr

Real-time Scene Text Detection with Differentiable Binarization

note: some code is inherited from MhLiao/DB

中文解读

network

update

2020-06-07: 添加灰度图训练,训练灰度图时需要在配置里移除dataset.args.transforms.Normalize

Install Using Conda

conda env create -f environment.yml
git clone https://github.com/WenmuZhou/DBNet.pytorch.git
cd DBNet.pytorch/

or

Install Manually

conda create -n dbnet python=3.6
conda activate dbnet

conda install ipython pip

# python dependencies
pip install -r requirement.txt

# install PyTorch with cuda-10.1
# Note that you can change the cudatoolkit version to the version you want.
conda install pytorch torchvision cudatoolkit=10.1 -c pytorch

# clone repo
git clone https://github.com/WenmuZhou/DBNet.pytorch.git
cd DBNet.pytorch/

Requirements

  • pytorch 1.4+
  • torchvision 0.5+
  • gcc 4.9+

Download

TBD

Data Preparation

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

./datasets/train/img/001.jpg	./datasets/train/gt/001.txt

Validation data: prepare a text test.txt in the following format, use '\t' as a separator

./datasets/test/img/001.jpg	./datasets/test/gt/001.txt
  • Store images in the img folder
  • Store groundtruth in the gt folder

The groundtruth can be .txt files, with the following format:

x1, y1, x2, y2, x3, y3, x4, y4, annotation

Train

  1. config the dataset['train']['dataset'['data_path']',dataset['validate']['dataset'['data_path']in config/icdar2015_resnet18_fpn_DBhead_polyLR.yaml
  • . single gpu train
bash singlel_gpu_train.sh
  • . Multi-gpu training
bash multi_gpu_train.sh

Test

eval.py is used to test model on test dataset

  1. config model_path in eval.sh
  2. use following script to test
bash eval.sh

Predict

predict.py Can be used to inference on all images in a folder

  1. config model_path,input_folder,output_folder in predict.sh
  2. use following script to predict
bash predict.sh

You can change the model_path in the predict.sh file to your model location.

tips: if result is not good, you can change thre in predict.sh

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
SynthText-Defrom-ResNet-18(paper) 736 0.007 86.8 78.4 82.3 48
ImageNet-resnet18-FPN-DBHead 736 1e-3 87.03 75.06 80.6 43
ImageNet-Defrom-Resnet18-FPN-DBHead 736 1e-3 88.61 73.84 80.56 36
ImageNet-resnet50-FPN-DBHead 736 1e-3 88.06 77.14 82.24 27
ImageNet-resnest50-FPN-DBHead 736 1e-3 88.18 76.27 81.78 27

examples

TBD

todo

  • [x] mutil gpu training

reference

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

If this repository helps you,please star it. Thanks.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].