提交 b2663e61 编写于 作者: X xiaohang

update readme

上级 3df8fc31
Convolutional Recurrent Neural Network
Robust Scene Text Recognition with Automatic Rectification
======================================
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 ``src/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. For training with variable length, please sort the image according to the text length.
2. ``python crnn_main.py [--param val]``. Explore ``crnn_main.py`` for details.
Stable commits
--------------
dbe73da0dd7efb8bd76dbd7f0ac3856e742b98d4: support image list with label and alphabet
This software implements the Robust Scene Text Recognition with Automatic Rectification (SRN only) in pytorch.
Train for VGG text data
--------------
......
......@@ -118,7 +118,7 @@ class CRNN(nn.Module):
self.rnn = nn.Sequential(
BidirectionalLSTM(512, nh, nh),
BidirectionalLSTM(nh, nh, nh))
self.attention = Attention(nh, nh/2, nclass)
self.attention = Attention(nh, nh, nclass)
def forward(self, input, length):
# conv features
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册