Skip to content

you can use dbnet to detect word or bar code,Knowledge Distillation is provided,also python tensorrt inference is provided.

Notifications You must be signed in to change notification settings

zonghaofan/dbnet_torch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1.DBnet-pytorch

my chinese blog:https://blog.csdn.net/fanzonghao/article/details/107199538

Dbnet is usually used to detect word, in fact barcode can be detected.

This project also provide word detect model.

model:

2.train

​ follow icdar15 dataset format, x1,y1,x2,y2,x3,y3,x4,y4,label,(x1,y1) is left top,(x2,y2) is right top.

where config/icdar2015_resnet18_FPN_DBhead_polyLR_code_phone.yaml you can change learning rate,train_path and so on.

single gpu train: python train_code_phone.py

multi gpus train:sh multi_gpu_train.sh , nedd notice os.environ['CUDA_VISIBLE_DEVICES'] is match nproc_per_node.

3.torch inference

​ python predict_code_phone.py

4.tensorrt inference

First python model_to_onnx.py to get onnx model. Then where onnx_project you can python dbcode_tensorrt_predict.py.

notice:change model path

5.Knowledge Distillation

python train_word_industry_res50.py train teacher(res50) model;

python train_word_industry_res18_kd.py train student(res18)model;

6.labelme json to txt:

​ --change you own path in labelme_txt_box.py
​ python labelme_txt_box.py

7.requirements

pytorch1.5

torchvision0.6

cuda9.0+

tensorrt 7.0

8.pretrain model

1.word:https://github.com/zonghaofan/dbnet_torch/tree/master/phone_word_model 2.code:https://github.com/zonghaofan/dbnet_torch/tree/master/phone_code_model

9.some examples

  1. learning rate show

    2.some test examples

3.train loss

10.reference

1. https://github.com/WenmuZhou/DBNet.pytorch

11.to do

More tensortrt inference.

About

you can use dbnet to detect word or bar code,Knowledge Distillation is provided,also python tensorrt inference is provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages