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!
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 reading pytorch's official site
Detection is based on CTPN, some codes are borrowed from pytorch_ctpn, several detection results:
Recognition is based on CRNN, some codes are borrowed from crnn.pytorch
Download pretrained models from Baidu Netdisk (extract code: u2ff) or Google Driver and 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]
Training codes are placed into train_code directory.
Train CTPN
Train CRNN
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。