Code Monkey home page Code Monkey logo

captcha-recognizition's Introduction

CAPTCHA-Recognizition

Using CNN model to recognize CAPTCHA by using Keras.

train captcha

CNN structure

all loss

four character loss

captcha-recognizition's People

Contributors

percent4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

captcha-recognizition's Issues

训练的时候报错

Using TensorFlow backend.
WARNING:tensorflow:From G:\Program Files\Python\lib\site-packages\tensorflow\python\framework\op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
WARNING:tensorflow:From G:\Program Files\Python\lib\site-packages\keras\backend\tensorflow_backend.py:3445: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.
Instructions for updating:
Please use rate instead of keep_prob. Rate should be set to rate = 1 - keep_prob.


Layer (type) Output Shape Param # Connected to

input_1 (InputLayer) (None, 22, 50, 3) 0


conv2d_1 (Conv2D) (None, 22, 50, 32) 896 input_1[0][0]


conv2d_2 (Conv2D) (None, 22, 50, 32) 9248 conv2d_1[0][0]


max_pooling2d_1 (MaxPooling2D) (None, 11, 25, 32) 0 conv2d_2[0][0]


conv2d_3 (Conv2D) (None, 11, 25, 64) 18496 max_pooling2d_1[0][0]


conv2d_4 (Conv2D) (None, 11, 25, 64) 36928 conv2d_3[0][0]


max_pooling2d_2 (MaxPooling2D) (None, 5, 12, 64) 0 conv2d_4[0][0]


conv2d_5 (Conv2D) (None, 5, 12, 128) 73856 max_pooling2d_2[0][0]


conv2d_6 (Conv2D) (None, 5, 12, 128) 147584 conv2d_5[0][0]


max_pooling2d_3 (MaxPooling2D) (None, 2, 6, 128) 0 conv2d_6[0][0]


conv2d_7 (Conv2D) (None, 2, 6, 256) 295168 max_pooling2d_3[0][0]


conv2d_8 (Conv2D) (None, 2, 6, 256) 590080 conv2d_7[0][0]


max_pooling2d_4 (MaxPooling2D) (None, 1, 3, 256) 0 conv2d_8[0][0]


flatten_1 (Flatten) (None, 768) 0 max_pooling2d_4[0][0]


dropout_1 (Dropout) (None, 768) 0 flatten_1[0][0]


c1 (Dense) (None, 10) 7690 dropout_1[0][0]


c2 (Dense) (None, 10) 7690 dropout_1[0][0]


c3 (Dense) (None, 10) 7690 dropout_1[0][0]


c4 (Dense) (None, 10) 7690 dropout_1[0][0]

Total params: 1,203,016
Trainable params: 1,203,016
Non-trainable params: 0


WARNING:tensorflow:From G:\Program Files\Python\lib\site-packages\tensorflow\python\ops\math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.cast instead.
Epoch 1/5
Traceback (most recent call last):
File "G:/Learn Files/Python/CAPTCHA-Recognizition-master/captcha_tagging/keras_model_training.py", line 64, in
validation_steps=10 # 用10組資料來驗證
File "G:\Program Files\Python\lib\site-packages\keras\legacy\interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "G:\Program Files\Python\lib\site-packages\keras\engine\training.py", line 1418, in fit_generator
initial_epoch=initial_epoch)
File "G:\Program Files\Python\lib\site-packages\keras\engine\training_generator.py", line 181, in fit_generator
generator_output = next(output_generator)
File "G:\Program Files\Python\lib\site-packages\keras\utils\data_utils.py", line 709, in get
six.reraise(*sys.exc_info())
File "G:\Program Files\Python\lib\site-packages\six.py", line 693, in reraise
raise value
File "G:\Program Files\Python\lib\site-packages\keras\utils\data_utils.py", line 685, in get
inputs = self.queue.get(block=True).get()
File "G:\Program Files\Python\lib\multiprocessing\pool.py", line 657, in get
raise self._value
File "G:\Program Files\Python\lib\multiprocessing\pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "G:\Program Files\Python\lib\site-packages\keras\utils\data_utils.py", line 626, in next_sample
return six.next(_SHARED_SEQUENCES[uid])
File "G:/Learn Files/Python/CAPTCHA-Recognizition-master/captcha_tagging/keras_model_training.py", line 21, in gen
X[i] = imagePixel
ValueError: could not broadcast input array from shape (20,60,3) into shape (22,50,3)

进程已结束,退出代码1

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.