# crnn.pytorch **Repository Path**: srwpf/crnn.pytorch ## Basic Information - **Project Name**: crnn.pytorch - **Description**: Convolutional recurrent network in pytorch - **Primary Language**: Python - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-07-26 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README Convolutional Recurrent Neural Network ====================================== This software implements the Convolutional Recurrent Neural Network (CRNN) in pytorch. Origin software could be found in [crnn](https://github.com/bgshih/crnn) Run demo -------- A demo program can be found in ``demo.py``. Before running the demo, download a pretrained model from [Baidu Netdisk](https://pan.baidu.com/s/1pLbeCND) or [Dropbox](https://www.dropbox.com/s/dboqjk20qjkpta3/crnn.pth?dl=0). 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: ![Example Image](./data/demo.png) Expected output: loading pretrained model from ./data/crnn.pth a-----v--a-i-l-a-bb-l-ee-- => available Dependence ---------- * [warp_ctc_pytorch](https://github.com/SeanNaren/warp-ctc/tree/pytorch_bindings/pytorch_binding) * lmdb Train a new model ----------------- 1. Construct dataset following [origin guide](https://github.com/bgshih/crnn#train-a-new-model). If you want to train with variable length images (keep the origin ratio for example), please modify the `tool/create_dataset.py` and sort the image according to the text length. 2. Execute ``python train.py --adadelta --trainRoot {train_path} --valRoot {val_path} --cuda``. Explore ``train.py`` for details.