Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
WenjiaWang0312 authored Sep 11, 2020
1 parent 96c7f00 commit adc2994
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,23 @@

## Train and Test

`python3 main.py --batch_size=1024 --STN --mask --gradient --mixed --vis_dir='vis'`
training
download the Aster model from https://github.com/ayumiymk/aster.pytorch, Moran model from https://github.com/Canjie-Luo/MORAN_v2,
CRNN model from https://github.com/meijieru/crnn.pytorch.

change `TRAIN.VAL.rec_pretrained` in src/configs/super_resolution.yaml to your Aster model path, `TRAIN.VAL.moran_pretrained` to your MORAN model path and
`TRAIN.VAL.crnn_pretrained` to your CRNN model path.
change `TRAIN.train_data_dir` to your train data path.
change `TRAIN.VAL.val_data_dir` to your val data path.

train with textzoom
`python3 main.py --batch_size=1024 --STN --mask --gradient --vis_dir='vis'`

test with textzoom
`python3 main.py --batch_size=1024 --test --resume='your-model.pth' --STN --mask --gradient --vis_dir='vis'`

demo with single image
`python3 main.py --demo --demo_dir='xxx' --resume='your-model.pth' --STN --mask`

## TextZoom Dataset (allocated by size):

Expand Down

0 comments on commit adc2994

Please sign in to comment.