Git Product home page Git Product logo

crnn-ctc's Introduction

«crnn-ctc» implemented CRNN+CTC

Table of Contents

Latest News

  • [2023/10/11]v0.2.0. Support training/evaluation/prediction of CRNN+CTC based on license plate.
  • [2023/10/10]v0.1.0. Support training/evaluation/prediction of CRNN+CTC based on EMNIST digital characters.

Background

This warehouse aims to better understand and apply CRNN+CTC, and currently achieves digital recognition and license plate recognition

Installation

pip install -r requirements.txt

Usage

Train

$ python -m torch.distributed.run --nproc_per_node 4 --master_port 32512 train_emist.py --device 0,1,2,3 ../datasets/EMNIST/ runs/emnist_ddp/
$ python -m torch.distributed.run --nproc_per_node 4 --master_port 32512 train_plate.py --device 0,1,2,3 ../datasets/git_plate/CCPD_CRPD_OTHER_ALL/ ../datasets/git_plate/val_verify/ runs/plate_ddp/

Eval

$ python eval_emnist.py runs/emnist_ddp/crnn-emnist-e100.pth ../datasets/EMNIST/
args: Namespace(pretrained='runs/emnist_ddp/crnn-emnist-e100.pth', val_root='../datasets/EMNIST/')
Loading CRNN pretrained: runs/emnist_ddp/crnn-emnist-e100.pth
Batch:62 ACC:100.000: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 63/63 [00:02<00:00, 30.82it/s]
ACC:95.100
$ python eval_plate.py runs/plate_ddp/crnn-plate-e100.pth ../datasets/git_plate/val_verify/
args: Namespace(pretrained='runs/plate_ddp/crnn-plate-e100.pth', val_root='../datasets/git_plate/val_verify/')
Loading CRNN pretrained: runs/plate_ddp/crnn-plate-e100.pth
Load test data: 2014
Batch:62 ACC:96.667: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 63/63 [00:02<00:00, 22.51it/s]
ACC:97.319

Predict

$ python predict_emnist.py runs/emnist_ddp/crnn-emnist-e100.pth ../datasets/EMNIST/ runs/
args: Namespace(pretrained='runs/emnist_ddp/crnn-emnist-e100.pth', save_dir='runs/', val_root='../datasets/EMNIST/')
Loading CRNN pretrained: runs/emnist_ddp/crnn-emnist-e100.pth
Label: [6 5 3 8 6] Pred: [6 5 3 8 6]
Label: [2 1 4 3 0] Pred: [2 1 4 3 0]
Label: [8 5 3 3 5] Pred: [8 5 3 3 5]
Label: [0 7 9 4 9] Pred: [0 7 9 4 9]
Label: [6 1 7 2 0] Pred: [6 1 7 2 0]
Label: [8 8 9 9 5] Pred: [8 8 9 9 5]

$ python predict_plate.py runs/plate_ddp/crnn-plate-e100.pth ./assets/plate/宁A87J92_0.jpg runs/
args: Namespace(image_path='./assets/plate/宁A87J92_0.jpg', pretrained='runs/plate_ddp/crnn-plate-e100.pth', save_dir='runs/')
Loading CRNN pretrained: runs/plate_ddp/crnn-plate-e100.pth
Pred: 宁A87J92
$ python predict_plate.py runs/plate_ddp/crnn-plate-e100.pth ./assets/plate/川A3X7J1_0.jpg runs/
args: Namespace(image_path='./assets/plate/川A3X7J1_0.jpg', pretrained='runs/plate_ddp/crnn-plate-e100.pth', save_dir='runs/')
Loading CRNN pretrained: runs/plate_ddp/crnn-plate-e100.pth
Pred: 川A3X7J1

Maintainers

  • zhujian - Initial work - zjykzj

Thanks

Contributing

Anyone's participation is welcome! Open an issue or submit PRs.

Small note:

License

Apache License 2.0 © 2023 zjykzj

crnn-ctc's People

Contributors

zjykzj avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.