Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

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

A pure pytorch implemented ocr project including text detection and recognition

License

NotificationsYou must be signed in to change notification settings

courao/ocr.pytorch

Repository files navigation

A pure pytorch implemented ocr project.
Text detection is based CTPN and text recognition is based CRNN.
More detection and recognition methods will be supported!

Prerequisite

  • python-3.5+
  • pytorch-0.4.1+
  • torchvision-0.2.1
  • opencv-3.4.0.14
  • numpy-1.14.3

They could all be installed through pip except pytorch and torchvision. As for pytorch and torchvision,they both depends on your CUDA version, you would prefer to readingpytorch's official site

Detection

Detection is based onCTPN, some codes are borrowed frompytorch_ctpn, several detection results:detect1detect2

Recognition

Recognition is based onCRNN, some codes are borrowed fromcrnn.pytorch

Test

Download pretrained models fromBaidu Netdisk (extract code: u2ff) orGoogle Driverand put these files into checkpoints.Then run

python3 demo.py

The image files in ./test_images will be tested for text detection and recognition, the results will be stored in ./test_result.

If you want to test a single image, run

python3 test_one.py [filename]

Train

Training codes are placed into train_code directory.
TrainCTPN
TrainCRNN

Licence

MIT License

About

A pure pytorch implemented ocr project including text detection and recognition

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp