Code Monkey home page Code Monkey logo

captcha_break_keras's Introduction

captcha_break_keras

keras theano 验证码破解 字母+数字

1. python get_capthch.py

生成2000个随机验证码,作为固定测试集

2. python captcha_test.py

使用生成器gen每次生成batch_size个样本,fit_generator训练,节约内存。 在测试集上测试,正确率达到0.95~ (模型预训练权重已给出,可直接使用)

3. python captcha_test_ctc_loss

ctc loss

4. python vgg_16_fine_tune.py

使用vgg16进行特征提取,训练顶部分类层

===============================================

使用腾讯验证码(英文大小写字母)--验证码下载:http://pan.baidu.com/s/1miMaFna

python tencent_captcha_test.py 共10w已标注验证码,取9w训练,1w测试。 可在测试中打印预测标签和真实标签(测试样本1w也会单独抽出,存于test_samples3文件夹中,方便对比) 也可打印错误样本,看看是哪些字符识别的不好(一般是o-p,b-h等)。 1w测试样本的正确率是 0.7873

captcha_break_keras's People

Contributors

fanhuaandluomu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

captcha_break_keras's Issues

ValueError: Negative dimension size caused by subtracting 3 from 1 for 'conv2d_2/convolution' (op: 'Conv2D') with input shapes: [?,1,78,32], [3,3,32,32]

[root@MyVps captcha_break_keras]# python2.7 captcha_test.py
0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
Using TensorFlow backend.
captcha_test.py:64: UserWarning: Update your Conv2D call to the Keras 2 API: Conv2D(32, (3, 3), activation="relu")
x=Convolution2D(322**i,3,3,activation='relu')(x)
captcha_test.py:65: UserWarning: Update your Conv2D call to the Keras 2 API: Conv2D(32, (3, 3), activation="relu")
x=Convolution2D(32
2i,3,3,activation='relu')(x)
Traceback (most recent call last):
File "captcha_test.py", line 65, in
x=Convolution2D(32*2
i,3,3,activation='relu')(x)
File "/root/anaconda2/lib/python2.7/site-packages/keras/engine/topology.py", line 596, in call
output = self.call(inputs, **kwargs)
File "/root/anaconda2/lib/python2.7/site-packages/keras/layers/convolutional.py", line 164, in call
dilation_rate=self.dilation_rate)
File "/root/anaconda2/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py", line 3138, in conv2d
data_format='NHWC')
File "/root/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/nn_ops.py", line 670, in convolution
op=op)
File "/root/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/nn_ops.py", line 338, in with_space_to_batch
return op(input, num_spatial_dims, padding)
File "/root/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/nn_ops.py", line 662, in op
name=name)
File "/root/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/nn_ops.py", line 131, in _non_atrous_convolution
name=name)
File "/root/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/gen_nn_ops.py", line 399, in conv2d
data_format=data_format, name=name)
File "/root/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 767, in apply_op
op_def=op_def)
File "/root/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 2508, in create_op
set_shapes_for_outputs(ret)
File "/root/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1873, in set_shapes_for_outputs
shapes = shape_func(op)
File "/root/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1823, in call_with_requiring
return call_cpp_shape_fn(op, require_shape_fn=True)
File "/root/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/common_shapes.py", line 610, in call_cpp_shape_fn
debug_python_shape_fn, require_shape_fn)
File "/root/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/common_shapes.py", line 676, in _call_cpp_shape_fn_impl
raise ValueError(err.message)
ValueError: Negative dimension size caused by subtracting 3 from 1 for 'conv2d_2/convolution' (op: 'Conv2D') with input shapes: [?,1,78,32], [3,3,32,32].

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.