GitHub - Canjie-Luo/MORAN_v2: MORAN: A Multi-Object Rectified Attention Network...
source link: https://github.com/Canjie-Luo/MORAN_v2
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
MORAN: A Multi-Object Rectified Attention Network for Scene Text Recognition
MORAN is a network with rectification mechanism for general scene text recognition. The paper (accepted to appear in Pattern Recognition, 2019) in arXiv, online version is available now.
Here is a brief introduction in Chinese.
Improvements of MORAN v2:
- More stable rectification network for one-stage training
- Replace VGG backbone by ResNet
- Use bidirectional decoder (a trick borrowed from ASTER)
*The results of v1 were reported in our paper. If this project is helpful for your research, please cite our Pattern Recognition paper.
Requirements
- PyTorch 0.3.*
- TorchVision
- Python 2.7.*
- OpenCV 2.4.*
- PIL (Pillow)
Use pip to install the following libraries.
pip install -r requirements.txt
Data Preparation
Please convert your own dataset to LMDB format by using the tool provided by @Baoguang Shi.
You can also download the training (NIPS 2014, CVPR 2016) and testing datasets prepared by us.
- about 20G training datasets and testing datasets in LMDB format, password: l8em
The raw pictures of testing datasets can be found here.
Training and Testing
Modify the path to dataset folder in train_MORAN.sh
:
--train_nips path_to_dataset \ --train_cvpr path_to_dataset \ --valroot path_to_dataset \
And start training: (manually decrease the learning rate for your task)
sh train_MORAN.sh
Demo
Download the model parameter file demo.pth
.
- BaiduYun (password: l8em)
- Google Drive
- OneDrive
Put it into root folder. Then, execute the demo.py
for more visualizations.
python demo.py
Citation
@article{cluo2019moran,
author = {Canjie Luo, Lianwen Jin, Zenghui Sun},
title = {MORAN: A Multi-Object Rectified Attention Network for Scene Text Recognition},
journal = {Pattern Recognition},
volume = {},
number = {},
pages = {},
year = {2019},
}
Acknowledgment
The repo is developed based on @Jieru Mei's crnn.pytorch and @marvis' ocr_attention. Thanks for your contribution.
Attention
The project is only free for academic research purposes.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK