Skip to content

lllcho/CAPTCHA-breaking

Repository files navigation

Installation

Testing environment
ubuntu14.04 + python2.7

Direct dependencies

  • keras (required version of theano : 0.7.1)
  • python-opencv

Installation pipeline recommended
1 Install Anaconda (alternative) to replace default python;

2 Configure CUDA and alter ~/.theanorc (ignore the step if not use GPU);

vim ~/.theanorc

Then add:

[global]
  device = gpu
  floatX = float32

3 Install keras: using the default or specified version (0.1.2) to avoid the problems caused by changed API of the latest version;

cd keras-master  
python setup.py install

4 Configure openCV: sudo apt-get install python-opencv, then add cv2.so to the python path.

Note: the codes work for windows as well, just make sure the python dependencies have been installed.

How to use

1 Change the input (where the CAPTCHA pictures are stored) and output path in the script;
2 run python test_type*N*.py.

Testing results

Type Accuracy
type1 0.92
type2 0.99
type3 0.99
type4 1
type5 0.74
type6 0.37

Find more testing data here


中文说明

安装

测试环境:ubuntu14.04+python2.7

直接依赖:

  • keras(theano版本要求0.7.1)
  • python-opencv

推荐安装步骤:

  1. 安装 Anaconda 或者点击这里下载安装并取代系统默认Python
  2. 配置CUDA并修改~/.theanorc文件(不使用gpu可省略这一步)

vim ~/.theanorc 然后添加: [global] device=gpu floatX=float32

  1. 由于最新版keras API发生改变,请使用自带版本,或下载指定版本(0.1.2)

cd keras-master python setup.py install

  1. 配置opencv: sudo apt-get install python-opencv 然后将cv2.so添加到PYTHON路径

代码在windows下也测试通过,安装windows版本python依赖即可

使用

  1. 打开脚本修改验证码图片所在路径以及结果输出路径
  2. 运行命令python test_type*N*.py

测试结果

类型 识别率
type1 0.92
type2 0.99
type3 0.99
type4 1
type5 0.74
type6 0.37
更多测试数据下载地址

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages