代码链接:GitHub - Vill-Lab/2021-ACMMM-PCAN
代码有以下链接改写而成:GitHub - JasonBoy1/TextZoom: A super-resolution dataset of paired LR-HR scene text images
2. Train
Prepare training datasets
- Download the TextZoom dataset (1.7w+ LR-HR pair images) from the link TextZoom.
- Set '--dataset/lmdb/str/TextZoom' as the HR and LR image path.
- download the Aster model from GitHub - ayumiymk/aster.pytorch: ASTER in Pytorch,
Moran model from GitHub - Canjie-Luo/MORAN_v2: MORAN: A Multi-Object Rectified Attention Network for Scene Text Recognition,
CRNN model from GitHub - meijieru/crnn.pytorch: Convolutional recurrent network in pytorch. - Set '--pth/crnn.pth', '--pth/demo.pth.tar', '--pth/moran.pth' as the file path of ocr metrics.
training
- Change your own yaml file under 'src/config/all/own.yaml'
- Run the following code.
CUDA_VISIBLE_DEVICES=1 python3 main.py --STN --mask --edge --config 'all/own.yaml'