This software implements the Convolutional Recurrent Neural Network (CRNN) in pytorch. Origin software could be found in crnn
A demo program can be found in demo.py
. Before running the demo, download a pretrained model
from Baidu Netdisk or Dropbox.
This pretrained model is converted from auther offered one by tool
.
Put the downloaded model file crnn.pth
into directory data/
. Then launch the demo by:
python demo.py
The demo reads an example image and recognizes its text content.
Example image:
Expected output: loading pretrained model from ./data/crnn.pth a-----v--a-i-l-a-bb-l-ee-- => available
tool/create_dataset.py
and sort the image according to the text length.python train.py --adadelta --trainRoot {train_path} --valRoot {val_path} --cuda
. Explore train.py
for details.@article{shi2016end,
title={An end-to-end trainable neural network for image-based sequence recognition and its application to scene text recognition},
author={Shi, Baoguang and Bai, Xiang and Yao, Cong},
journal={IEEE transactions on pattern analysis and machine intelligence},
volume={39},
number={11},
pages={2298--2304},
year={2016},
publisher={IEEE}
}