# Characters Recognition
A Chinese characters recognition repository based on convolutional recurrent networks.
## Performance
#### Recognize characters in pictures
## Dev Environments
1. WIN 10 or Ubuntu 16.04
1. **PyTorch 1.4.0 (may fix ctc loss)**
2. yaml
3. easydict
## Data
#### Synthetic Chinese String Dataset
1. Download the dataset in [here](https://pan.baidu.com/s/1ufYbnZAZ1q0AlK7yZ08cvQ)
2. Edit **lib/config/360CC_config.yaml** DATA:ROOT to you image path
```angular2html
DATASET:
ROOT: 'to/your/images/path'
```
3. Put *char_std_5990.txt* in **lib/dataset/txt/**
4. Download the labels in [here](https://pan.baidu.com/s/1rd4tm0sCq5fFgB2ziUxcrA) (password: w877)
5. And put *train.txt* and *test.txt* in **lib/dataset/txt/**
test.txt
```
20456343_4045240981.jpg 89 201 241 178 19 94 19 22 26 656
20457281_3395886438.jpg 120 1061 2 376 78 249 272 272 120 1061
...
```
## Train
```angular2html
[run] python train.py --cfg lib/config/360CC_config.yaml
```
#### loss curve
```angular2html
[run] cd output/360CC/crnn/xxxx-xx-xx-xx-xx/
[run] tensorboard --log_dir log
```
#### loss overview
## Demo
```angular2html
[run] python demo.py --image_path images/test.png --checkpoints output/checkpoints/mixed_second_finetune_acc_97P7.pth
```
## References
- https://github.com/meijieru/crnn.pytorch
- https://github.com/HRNet