Using CNN model to recognize CAPTCHA by using Keras.
percent4 / captcha-recognizition Goto Github PK
View Code? Open in Web Editor NEWUsing CNN model to recognize CAPTCHA by using Keras.
Using CNN model to recognize CAPTCHA by using Keras.
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
.
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]
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.