Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

License

NotificationsYou must be signed in to change notification settings

WenmuZhou/DBNet.pytorch

Repository files navigation

note: some code is inherited fromMhLiao/DB

中文解读

network

update

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

Install Using Conda

conda env create -f environment.ymlgit clone https://github.com/WenmuZhou/DBNet.pytorch.gitcd DBNet.pytorch/

or

Install Manually

conda create -n dbnet python=3.6conda activate dbnetconda install ipython pip# python dependenciespip 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 repogit clone https://github.com/WenmuZhou/DBNet.pytorch.gitcd DBNet.pytorch/

Requirements

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

Download

TBD

Data Preparation

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

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

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

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

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

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

Train

  1. config thedataset['train']['dataset'['data_path']',dataset['validate']['dataset'['data_path']inconfig/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. configmodel_path ineval.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. configmodel_path,input_folder,output_folder inpredict.sh
  2. use following script to predict
bash predict.sh

You can change themodel_path in thepredict.sh file to your model location.

tips: if result is not good, you can changethre inpredict.sh

The project is still under development.

Performance

only train on ICDAR2015 dataset

Methodimage size (short size)learning ratePrecision (%)Recall (%)F-measure (%)FPS
SynthText-Defrom-ResNet-18(paper)7360.00786.878.482.348
ImageNet-resnet18-FPN-DBHead7361e-387.0375.0680.643
ImageNet-Defrom-Resnet18-FPN-DBHead7361e-388.6173.8480.5636
ImageNet-resnet50-FPN-DBHead7361e-388.0677.1482.2427
ImageNet-resnest50-FPN-DBHead7361e-388.1876.2781.7827

examples

TBD

todo

  • 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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp