Python = 3.6
TensorFlow = 1.0.0
Clone the repository
git clone https://github.com/xuzheyuan624/Hanzi-recognization.git
We use CASIA-HWDB (A Handwritten Chinese datasets made by CAS)
You can get this dataset by:
wget http://www.nlpr.ia.ac.cn/databases/download/feature_data/HWDB1.1trn_gnt.zip
wget http://www.nlpr.ia.ac.cn/databases/download/feature_data/HWDB1.1tst_gnt.zip
unzip the dataset to $./data
This dataset has more than 3000 Chinese characters.
If you just want to recognize a small part,you can modify the classes($./data/cfgs.py)
Configure parameters in $./data/cfgs.py and modify the path and classes.
cd $./data
bash convert_train.sh
bash convert_test.sh
You can write pictures of the dataset like:
cd $./data
python write_image.py
And you can find pictures in $./data/png
python train.py
And if you want to go on the last training:
python train.py --restore_dir=weights(the weights path that you want to restore)
python test.py --weights=ournet_final.ckpt --image=test.jpg
Choosing the wights that you want to evaluate
python eval.py --weights=eval weights
You can find the resu;t in $./results
tensorboard --logdir==./summary/ournet