Skip to content
Image Recognition captcha without image segmentation 无需图片分割的验证码识别
Python
Branch: master
Clone or download
Latest commit e4ed7a1 Jun 29, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data/test_data setup project May 19, 2017
LICENSE Initial commit May 19, 2017
README-zhcn.md change README Jun 25, 2017
README.md Update README.md Jun 29, 2017
captcha_eval.py setup project May 19, 2017
captcha_gen_default.py setup project May 19, 2017
captcha_input.py setup project May 19, 2017
captcha_model.py setup project May 19, 2017
captcha_multi_gpu_train.py setup project May 19, 2017
captcha_recognize.py
captcha_records.py setup project May 19, 2017
captcha_train.py setup project May 19, 2017
config.py setup project May 19, 2017

README.md

Introduce

Translation: English 中文

image recognition captchas using TensorFlow, no need image segmentation, run on ubuntu 16.04, python 2.7

captchacaptchacaptchacaptchacaptchacaptcha

accuracy 99.7% judged by captcha_eval.py, training size 50000, after 20000 steps captcha generator: https://github.com/lepture/captcha

captchacaptchacaptchacaptchacaptchacaptcha

accuracy 52.1% judged by captcha_eval.py, training size 100000, after 200000 steps captcha generator: https://github.com/Gregwar/CaptchaBundle

Dependence

python 2.7

Anaconda2 4.3.1

https://www.continuum.io/downloads#linux

TensorFlow 1.1

https://github.com/tensorflow/tensorflow

captcha

https://pypi.python.org/pypi/captcha/0.1.1

Usage

1.prepare captchas

put your own captchas in <current_dir>/data/train_data/ for training, <current_dir>/data/valid_data/ for evaluating and <current_dir>/data/test_data/ for recognize testing, images file name must be label_*.jpg or label_*.png and recommend size 128x48. you can also use default generation:

python captcha_gen_default.py

2.convert dataset to tfrecords

the result file will be <current_dir>/data/train.tfrecord and <current_dir>/data/valid.tfrecord

python captcha_records.py

3.training

train and evaluate neural network on CPU or one single GPU

python captcha_train.py

you can also train over multiple GPUs

python captcha_multi_gpu_train.py

4.evaluate

python captcha_eval.py

5.recognize

read captchas from <current_dir>/data/test_data/ for recogition

python captcha_recognize.py

result like this

...
image WFPMX_num552.png recognize ----> 'WFPMX'
image QUDKM_num468.png recognize ----> 'QUDKM'
You can’t perform that action at this time.