capcha_recog
基于CNN的通用型字符验证码识别
综合准确率高于90%
Model graph
Install
pip install tensorflow
If you want to run with GPU,you may trypip install tensorflow-gpu
pip install opencv-python
Train
-
Prepare your dataset (png or jpg format) in './train' directory.
We also offer a dataset if you do not have one, rununzip train.zip
to decompress it. -
Modify config.py to your liking, set basic parameters like IMAGE_HEIGHT, IMAGE_WIDTH, CAPTCHA_LENGTH and CHAR_SET_LEN.
-
run
python train.py
After training the steps you set (in config.py) the model will be saved automatically.
Test
-
Prepare your test dataset or run
unzip test.zip
to use our's. -
run
python test.py
to load model and predict all capchas in './test'
you can also modify test.py to test only one image.