dsaveliev / captchasolver Goto Github PK
View Code? Open in Web Editor NEWSimple captcha solver based on TensorFlow library
Simple captcha solver based on TensorFlow library
I'm already unpack the files, ran the script but only get to Optimization Finished. How should I solver the captcha would it be: python all_digits.py captcha.jpg?
Traceback (most recent call last):
File "captcha.py", line 109, in
sess.run(init)
File "/root/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 889, in run
run_metadata_ptr)
File "/root/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1120, in _run
feed_dict_tensor, options, run_metadata)
File "/root/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1317, in _do_run
options, run_metadata)
File "/root/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1336, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor with shape[33600,1024]
[[Node: Variable_2/Adam/Assign = Assign[T=DT_FLOAT, _class=["loc:@Variable_2"], use_locking=true, validate_shape=true, _device="/job:localhost/replica:0/task:0/device:CPU:0"](Variable_2/Adam, Variable_2/Adam/Initializer/zeros)]]
Hi.
Do you have any runnable example?
By runnable I mean I have a captcasolver.py and a folder with captchas and it do all the work.
It is hard to understand the code without any examples...
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1152, in _do_call
raise type(e)(node_def, op, message)
InvalidArgumentError: Shape [-1,9] has negative dimensions
[[Node: Placeholder_1 = Placeholderdtype=DT_FLOAT, shape=[?,9], _device="/job:localhost/replica:0/task:0/cpu:0"]]
Caused by op 'Placeholder_1', defined at:
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\ipython\start_kernel.py", line 269, in
main()
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\ipython\start_kernel.py", line 265, in main
kernel.start()
File "C:\ProgramData\Anaconda3\lib\site-packages\ipykernel\kernelapp.py", line 477, in start
ioloop.IOLoop.instance().start()
File "C:\ProgramData\Anaconda3\lib\site-packages\zmq\eventloop\ioloop.py", line 177, in start
super(ZMQIOLoop, self).start()
File "C:\ProgramData\Anaconda3\lib\site-packages\tornado\ioloop.py", line 888, in start
handler_func(fd_obj, events)
File "C:\ProgramData\Anaconda3\lib\site-packages\tornado\stack_context.py", line 277, in null_wrapper
return fn(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\zmq\eventloop\zmqstream.py", line 440, in _handle_events
self._handle_recv()
File "C:\ProgramData\Anaconda3\lib\site-packages\zmq\eventloop\zmqstream.py", line 472, in _handle_recv
self._run_callback(callback, msg)
File "C:\ProgramData\Anaconda3\lib\site-packages\zmq\eventloop\zmqstream.py", line 414, in _run_callback
callback(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\tornado\stack_context.py", line 277, in null_wrapper
return fn(*args, **kwargs)
I'm getting the following error when running $ python all_digits.py
, just after the extraction of the test images has begun:
(...)
9000
Extract test images
500
Traceback (most recent call last):
File "/Users/robertoz/dev/venvs/captcha-cracking/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 510, in _apply_op_helper
preferred_dtype=default_dtype)
File "/Users/robertoz/dev/venvs/captcha-cracking/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1107, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "/Users/robertoz/dev/venvs/captcha-cracking/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 944, in _TensorTensorConversionFunction
(dtype.name, t.dtype.name, str(t)))
ValueError: Tensor conversion requested dtype int32 for Tensor with dtype float32: 'Tensor("Add_3:0", shape=(?, 54), dtype=float32)'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "all_digits.py", line 86, in <module>
pred_digits = tf.split(1, 6, pred)
File "/Users/robertoz/dev/venvs/captcha-cracking/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 1315, in split
axis=axis, num_split=num_or_size_splits, value=value, name=name)
File "/Users/robertoz/dev/venvs/captcha-cracking/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py", line 7793, in split
"Split", split_dim=axis, value=value, num_split=num_split, name=name)
File "/Users/robertoz/dev/venvs/captcha-cracking/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 533, in _apply_op_helper
(prefix, dtypes.as_dtype(input_arg.type).name))
TypeError: Input 'split_dim' of 'Split' Op has type float32 that does not match expected type of int32.
I'm using Python 3.6 on MacOS, tensorflow version 1.9
input_data.py", line 67, in init
images.shape[1] * images.shape[2])
IndexError: tuple index out of range
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.