Skip to content

xuzheyuan624/Hanzi-recognization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hanzi Recognization

Requirement

Python = 3.6
TensorFlow = 1.0.0

Installation

Clone the repository

git clone https://github.com/xuzheyuan624/Hanzi-recognization.git

Datastes

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

Make tfrecord

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

Train

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)

Test

python test.py --weights=ournet_final.ckpt --image=test.jpg

Eval

Choosing the wights that you want to evaluate

python eval.py --weights=eval weights

You can find the resu;t in $./results

Summary

tensorboard --logdir==./summary/ournet

loss: accuracy: network architecture:

About

A Hanzi recognization algorithm based on Deep Learning

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published