# captcha_tf **Repository Path**: lichuan2013/captcha_tf ## Basic Information - **Project Name**: captcha_tf - **Description**: No description available - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2017-08-03 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README Introduce ========= image recognition captchas using TensorFlow, no need to cut off image, run on ubuntu 16.04, python 2.7 ![captcha](https://raw.githubusercontent.com/PatrickLib/captcha_recognition/master/data/test_data/CMQVA_num717_1.png)![captcha](https://raw.githubusercontent.com/PatrickLib/captcha_recognition/master/data/test_data/CMQZJ_num908_1.png)![captcha](https://raw.githubusercontent.com/PatrickLib/captcha_recognition/master/data/test_data/CRGEU_num339_1.png)![captcha](https://raw.githubusercontent.com/PatrickLib/captcha_recognition/master/data/test_data/CZHBN_num989_1.png)![captcha](https://raw.githubusercontent.com/PatrickLib/captcha_recognition/master/data/test_data/DZPEW_num388_1.png) accuracy 99.7% judged by captcha_eval.py, training size 50000, after 20000 steps captcha generator: https://github.com/lepture/captcha ![captcha](https://raw.githubusercontent.com/PatrickLib/captcha_recognition/master/data/test_data/1ab2s_num286.jpg)![captcha](https://raw.githubusercontent.com/PatrickLib/captcha_recognition/master/data/test_data/1ezx8_num398.jpg)![captcha](https://raw.githubusercontent.com/PatrickLib/captcha_recognition/master/data/test_data/1iv22_num346.jpg)![captcha](https://raw.githubusercontent.com/PatrickLib/captcha_recognition/master/data/test_data/1kxw2_num940.jpg)![captcha](https://raw.githubusercontent.com/PatrickLib/captcha_recognition/master/data/test_data/3mtj9_num765.jpg) 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 **/data/train_data/** for training, **/data/valid_data/** for evaluating and **/data/test_data/** for prediction 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 **/data/train.tfrecord** and **/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.predicte read captchas from **/data/test_data/** for recogition ``` python captcha_predict.py ``` result like this ``` ... image WFPMX_num552.png precise ----> 'WFPMX' image QUDKM_num468.png precise ----> 'QUDKM' ```