Giter VIP home page Giter VIP logo

captcha22's People

Contributors

hirza-tango avatar thijstriemstra avatar tinusgreen avatar vu159951 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

captcha22's Issues

You have '.png' hardcoded in the server.

If i run captcha22 client label --image-type jpg, and give the genreated zip file to the engine. I get this error

Traceback (most recent call last):
  File "/usr/local/bin/captcha22", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/captcha22/__main__.py", line 278, in main
    args.func(args)
  File "/usr/local/lib/python3.6/site-packages/captcha22/lib/core/server.py", line 22, in server
    server.main()
  File "/usr/local/lib/python3.6/site-packages/captcha22/lib/server/captcha22.py", line 519, in main
    self.run_server()
  File "/usr/local/lib/python3.6/site-packages/captcha22/lib/server/captcha22.py", line 494, in run_server
    self.check_files()
  File "/usr/local/lib/python3.6/site-packages/captcha22/lib/server/captcha22.py", line 409, in check_files
    self.create_model(file)
  File "/usr/local/lib/python3.6/site-packages/captcha22/lib/server/captcha22.py", line 375, in create_model
    model = captcha(path, self.logger)
  File "/usr/local/lib/python3.6/site-packages/captcha22/lib/server/captcha22.py", line 55, in __init__
    self.get_image_size()
  File "/usr/local/lib/python3.6/site-packages/captcha22/lib/server/captcha22.py", line 61, in get_image_size
    img = cv2.imread(images[0])
IndexError: list index out of range

Likely because you have .png hardcoded here:
https://github.com/FSecureLABS/captcha22/blob/f5e2662f64cbb4d2606982a1b1d0a449a081631f/captcha22/lib/server/captcha22.py#L60

AttributeError: 'captcha' object has no attribute 'logger'

INFO:Captcha22 Engine:Create model
INFO:Captcha22 Engine:./Unsorted/admin_testcaptcha1_1.zip
INFO:Captcha22 Engine:Updating file
INFO:Captcha22 Engine:Done
INFO:Captcha22 Engine:Going to start the model training procedure
Traceback (most recent call last):
  File "/home/thijs/.virtualenvs/captcha/bin/captcha22", line 8, in <module>
    sys.exit(main())
  File "/home/thijs/.virtualenvs/captcha/lib/python3.7/site-packages/captcha22/__main__.py", line 404, in main
    args.func(args)
  File "/home/thijs/.virtualenvs/captcha/lib/python3.7/site-packages/captcha22/lib/core/server.py", line 23, in server
    server.main()
  File "/home/thijs/.virtualenvs/captcha/lib/python3.7/site-packages/captcha22/lib/server/captcha22.py", line 517, in main
    self.run_server()
  File "/home/thijs/.virtualenvs/captcha/lib/python3.7/site-packages/captcha22/lib/server/captcha22.py", line 493, in run_server
    self.continue_training()
  File "/home/thijs/.virtualenvs/captcha/lib/python3.7/site-packages/captcha22/lib/server/captcha22.py", line 467, in continue_training
    model.start_training()
  File "/home/thijs/.virtualenvs/captcha/lib/python3.7/site-packages/captcha22/lib/server/captcha22.py", line 201, in start_training
    self.logger.info("Starting training")
AttributeError: 'captcha' object has no attribute 'logger'

captcha22 client label should copy files

I came across this project and thought I'd give it a try with a very limited set of 4 captchas.

After downloading and installing using pip I ran:

captcha22 client label --input=captchas

I labeled the images and a data directory was created:

$ ls -lh data/
total 2,0M
-rw-rw-r-- 1 thijs thijs 665K dec  5 22:08 2YREA9.png
-rw-rw-r-- 1 thijs thijs 630K dec  5 22:08 6PA5K7.png
-rw-rw-r-- 1 thijs thijs  11K dec  5 22:03 NTEMYU.png
-rw-rw-r-- 1 thijs thijs 724K dec  5 22:08 XAMK6Q.png

Unfortunately it seems all my original captchas were moved by this script and I mistakenly deleted the data dir. Have to harvest some new ones now :( Would be really useful if captcha22 leaves the originals alone or mentions it very clearly in the readme that these files will be moved.

It also seems JPG files are not supported:

INFO:Captcha22 Label Scripts:Executing CAPTCHA Typing Script
INFO:Captcha22 Typer:No png files found

Update: found the --image-type option for this:

captcha22 client label --image-type=jpg --input=captchas

Unable to run captcha22 server engine on Macos

I'm on mac 10.15.1 (19B2106) with Anaconda installed (tensorflow, python 3.6 installed).
Beginning of the error:

Class start Checking if there is any new files ['./Unsorted/admin_2_2.zip'] Start running Copy files Starting the copy of files mkdir: ./Busy/: File exists Traceback (most recent call last): File "/Users/abc/opt/anaconda3/envs/captcha/bin/captcha22", line 8, in <module> sys.exit(main()) File "/Users/abc/opt/anaconda3/envs/captcha/lib/python3.6/site-packages/captcha22/__main__.py", line 267, in main args.func(args) File "/Users/abc/opt/anaconda3/envs/captcha/lib/python3.6/site-packages/captcha22/lib/core/server.py", line 20, in server server.main() File "/Users/abc/opt/anaconda3/envs/captcha/lib/python3.6/site-packages/captcha22/lib/server/captcha22.py", line 503, in main self.run_server() File "/Users/abc/opt/anaconda3/envs/captcha/lib/python3.6/site-packages/captcha22/lib/server/captcha22.py", line 478, in run_server self.check_files() File "/Users/abc/opt/anaconda3/envs/captcha/lib/python3.6/site-packages/captcha22/lib/server/captcha22.py", line 387, in check_files self.copy_files(file) File "/Users/abc/opt/anaconda3/envs/captcha/lib/python3.6/site-packages/captcha22/lib/server/captcha22.py", line 253, in copy_files os.system('mkdir ' + self.busy_URL + "/" + names[0] + "/" + names[1]) IndexError: list index out of range

Additional training

Hi, is this possible, to train the already made model with additional sets?

Getting error when running captcha22 server engine.

I get this error

`Class start
Checking if there is any new files
['./Unsorted\data.zip']
Start running
Copy files
Starting the copy of files
The syntax of the command is incorrect.
Traceback (most recent call last):
File "c:\users\user\anaconda3\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "c:\users\user\anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\user\anaconda3\Scripts\captcha22.exe_main
.py", line 7, in
sites = site.getsitepackages()
File "c:\users\user\anaconda3\lib\site-packages\captcha22_main
.py", line 267, in main
args.func(args)
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\core\server.py", line 20, in server
server.main()
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 512, in main
self.run_server()
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 487, in run_server
self.check_files()
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 396, in check_files
self.copy_files(file)
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 256, in copy_files
os.system('mkdir ' + self.busy_URL + "/" + names[0] + "/" + names[1])
IndexError: list index out of range

C:\Users\user>captcha22 server engine
Class start
Checking if there is any new files
['./Unsorted\data.zip']
Start running
Copy files
Starting the copy of files
The syntax of the command is incorrect.
Traceback (most recent call last):
File "c:\users\user\anaconda3\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "c:\users\user\anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\user\anaconda3\Scripts\captcha22.exe_main
.py", line 7, in
sites = site.getsitepackages()
File "c:\users\user\anaconda3\lib\site-packages\captcha22_main
.py", line 267, in main
args.func(args)
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\core\server.py", line 20, in server
server.main()
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 512, in main
self.run_server()
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 487, in run_server
self.check_files()
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 396, in check_files
self.copy_files(file)
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 256, in copy_files
os.system('mkdir ' + self.busy_URL + "/" + names[0] + "/" + names[1])
IndexError: list index out of range

C:\Users\user>captcha22 server engine
Class start
Checking if there is any new files
['./Unsorted\data.zip']
Start running
Copy files
Starting the copy of files
The syntax of the command is incorrect.
Traceback (most recent call last):
File "c:\users\user\anaconda3\lib\runpy.py", line 193, in run_module_as_main
"main", mod_spec)
File "c:\users\user\anaconda3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\user\anaconda3\Scripts\captcha22.exe_main
.py", line 7, in
sites = site.getsitepackages()
File "c:\users\user\anaconda3\lib\site-packages\captcha22_main
.py", line 267, in main
args.func(args)
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\core\server.py", line 20, in server
server.main()
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 512, in main
self.run_server()
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 487, in run_server
self.check_files()
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 396, in check_files
self.copy_files(file)
File "c:\users\user\anaconda3\lib\site-packages/captcha22\lib\server\captcha22.py", line 256, in copy_files
os.system('mkdir ' + self.busy_URL + "/" + names[0] + "/" + names[1])
IndexError: list index out of range`

FileNotFound error

Hi, I downloaded captchas and converted them to png, then use captcha22 client label --input='captchasFolder' as in the readme.
I found out that I had to rename the data.zip into admin_somename_someid.zip and then launch the server otherwise I have issue #4.
But it still crashes, first there is this message:
INFO:Captcha22 Engine:Generate aocr
Illegal instruction
Illegal instruction
and a bit further (I think after I has finished training):
INFO:Captcha22 Engine:Testing training level
Traceback (most recent call last):
File "/home/owein/.local/bin/captcha22", line 8, in
sys.exit(main())
File "/home/owein/.local/lib/python3.9/site-packages/captcha22/main.py", line 278, in main
args.func(args)
File "/home/owein/.local/lib/python3.9/site-packages/captcha22/lib/core/server.py", line 22, in server
server.main()
File "/home/owein/.local/lib/python3.9/site-packages/captcha22/lib/server/captcha22.py", line 519, in main
self.run_server()
File "/home/owein/.local/lib/python3.9/site-packages/captcha22/lib/server/captcha22.py", line 495, in run_server
self.continue_training()
File "/home/owein/.local/lib/python3.9/site-packages/captcha22/lib/server/captcha22.py", line 437, in continue_training
model.test_training_level()
File "/home/owein/.local/lib/python3.9/site-packages/captcha22/lib/server/captcha22.py", line 130, in test_training_level
f = open(self.path + "aocr.log")
FileNotFoundError: [Errno 2] No such file or directory: './Busy/admin/name/1/aocr.log'

I tried to touch the missing log file but then:
File "/home/owein/.local/lib/python3.9/site-packages/captcha22/lib/server/captcha22.py", line 138, in test_training_level
step = ast.literal_eval(values[1].split('Step ')[1].split(':')[0])
IndexError: list index out of range

Is it possible to use captcha22 from then without starting the engine but only the api server to ignore this error ?

Error Running Captcha22 In Terminal after installing on UBUNTU 20.04.1 LTS

Installing captcha22 using both pip install captcha22 and install from the source seem to work fine, but when running right after installing, I get this error:

user@user-Predator-G3-571:~$ captcha22 Traceback (most recent call last): File "/usr/local/bin/captcha22", line 11, in <module> load_entry_point('captcha22==1.0.1', 'console_scripts', 'captcha22')() File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 490, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2854, in load_entry_point return ep.load() File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2445, in load return self.resolve() File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2451, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/home/user/.local/lib/python3.8/site-packages/captcha22/__main__.py", line 12, in <module> from lib.core.client import (api_basic, api_full, captcha_labeller, ModuleNotFoundError: No module named 'lib.core' user@user-Predator-G3-571:~$

Issues on following the readme

Please add the folowing information to readme file:
Required Python version 3.7 (tensorflow 1.15.5 - current, requires it)
After labelling we need to rename a ZIP file in the next format <captcha_name><captcha_version>.zip

No tensorflow.contrib and aocr.log

Hi,
I got problems while training.

  1. ModuleNotFoundError: No module named 'tensorflow.contrib'
  2. FileNotFoundError: [Errno 2] No such file or directory: './Busy/admin/try1/1/aocr.log'

There were other errors but they seemed to be about GPU, since I'm using CPU for Tensor. So I didn't includ them.

Could you help me with the issues?

Here's the log from terminal.

Traceback (most recent call last):
  File ".../Captcha/captcha_env/lib/python3.8/site-packages/aocr/model/seq2seq.py", line 73, in <module>
    linear = rnn_cell_impl._linear  # pylint: disable=protected-access
AttributeError: module 'tensorflow.python.ops.rnn_cell_impl' has no attribute '_linear'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ".../Captcha/captcha_env/bin/aocr", line 11, in <module>
    load_entry_point('aocr==0.7.6', 'console_scripts', 'aocr')()
  File ".../Captcha/captcha_env/lib/python3.8/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File ".../Captcha/captcha_env/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
    return ep.load()
  File ".../Captcha/captcha_env/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2443, in load
    return self.resolve()
  File ".../Captcha/captcha_env/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File ".../Captcha/captcha_env/lib/python3.8/site-packages/aocr/__main__.py", line 14, in <module>
    from .model.model import Model
  File ".../Captcha/captcha_env/lib/python3.8/site-packages/aocr/model/model.py", line 18, in <module>
    from .seq2seq_model import Seq2SeqModel
  File ".../Captcha/captcha_env/lib/python3.8/site-packages/aocr/model/seq2seq_model.py", line 25, in <module>
    from .seq2seq import model_with_buckets
  File ".../Captcha/captcha_env/lib/python3.8/site-packages/aocr/model/seq2seq.py", line 76, in <module>
    from tensorflow.contrib.rnn.python.ops import core_rnn_cell
ModuleNotFoundError: No module named 'tensorflow.contrib'
INFO:Captcha22 Engine:Create model
INFO:Captcha22 Engine:./Unsorted/admin_try1_1.zip
INFO:Captcha22 Engine:Updating file
INFO:Captcha22 Engine:Done
INFO:Captcha22 Engine:Going to start the model training procedure
INFO:Captcha22 Engine:Starting training
INFO:Captcha22 Engine:Starting wait cycle
nohup: appending output to 'nohup.out'
INFO:Captcha22 Engine:Model update
INFO:Captcha22 Engine:Testing training level
Traceback (most recent call last):
  File ".../Captcha/captcha_env/bin/captcha22", line 11, in <module>
    load_entry_point('captcha22==1.0.6', 'console_scripts', 'captcha22')()
  File ".../Captcha/captcha_env/lib/python3.8/site-packages/captcha22/__main__.py", line 278, in main
    args.func(args)
  File ".../Captcha/captcha_env/lib/python3.8/site-packages/captcha22/lib/core/server.py", line 22, in server
    server.main()
  File ".../Captcha/captcha_env/lib/python3.8/site-packages/captcha22/lib/server/captcha22.py", line 519, in main
    self.run_server()
  File ".../Captcha/captcha_env/lib/python3.8/site-packages/captcha22/lib/server/captcha22.py", line 495, in run_server
    self.continue_training()
  File ".../Captcha/captcha_env/lib/python3.8/site-packages/captcha22/lib/server/captcha22.py", line 437, in continue_training
    model.test_training_level()
  File ".../Captcha/captcha_env/lib/python3.8/site-packages/captcha22/lib/server/captcha22.py", line 130, in test_training_level
    f = open(self.path + "aocr.log")
FileNotFoundError: [Errno 2] No such file or directory: './Busy/admin/try1/1/aocr.log'

error: List index out of range (img = cv2.imread(image[0]) when i run captcha2 server engine

i installed captcha22 via pip in an Ubuntu Server 18.04 lts, Python 3.6 and Tensorflow 1.15.

I got an error when i run the command "Captcha22 server engine":

INFO:Captcha22 Engine:Captcha22 engine start
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/captcha22/lib/server/captcha22.py", line 37, in init
self.hasTrained = ast.literal_eval(lines[0].replace("\n", ""))
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/bin/captcha22", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.6/dist-packages/captcha22/main.py", line 278, in main
args.func(args)
File "/usr/local/lib/python3.6/dist-packages/captcha22/lib/core/server.py", line 22, in server
server.main()
File "/usr/local/lib/python3.6/dist-packages/captcha22/lib/server/captcha22.py", line 518, in main
self.first_start()
File "/usr/local/lib/python3.6/dist-packages/captcha22/lib/server/captcha22.py", line 514, in first_start
self.reload_models(layer + "/")
File "/usr/local/lib/python3.6/dist-packages/captcha22/lib/server/captcha22.py", line 383, in reload_models
model = captcha(path, self.logger)
File "/usr/local/lib/python3.6/dist-packages/captcha22/lib/server/captcha22.py", line 55, in init
self.get_image_size()
File "/usr/local/lib/python3.6/dist-packages/captcha22/lib/server/captcha22.py", line 61, in get_image_size
img = cv2.imread(images[0])
IndexError: list index out of range

Please help me to solve this problem.

outputs

python3.7/site-packages/captcha22/lib/crackers/captcha.py", line 208, in solve_captcha
return (json_data['outputs']['output'])
KeyError: 'outputs'

No module named 'tensorflow.contrib'

Hello,

on

captcha22 server engine

I get this

INFO:Captcha22 Engine:Create labels
INFO:Captcha22 Engine:Directories is:
INFO:Captcha22 Engine:./Busy/admin/2/1/data/
INFO:Captcha22 Engine:./Busy/admin/2/1/labels/
INFO:Captcha22 Engine:Generate aocr
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/aocr/model/seq2seq.py", line 73, in <module>
    linear = rnn_cell_impl._linear  # pylint: disable=protected-access
AttributeError: module 'tensorflow.python.ops.rnn_cell_impl' has no attribute '_linear'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/aocr", line 5, in <module>
    from aocr.__main__ import main
  File "/usr/local/lib/python3.6/dist-packages/aocr/__main__.py", line 14, in <module>
    from .model.model import Model
  File "/usr/local/lib/python3.6/dist-packages/aocr/model/model.py", line 18, in <module>
    from .seq2seq_model import Seq2SeqModel
  File "/usr/local/lib/python3.6/dist-packages/aocr/model/seq2seq_model.py", line 25, in <module>
    from .seq2seq import model_with_buckets
  File "/usr/local/lib/python3.6/dist-packages/aocr/model/seq2seq.py", line 76, in <module>
    from tensorflow.contrib.rnn.python.ops import core_rnn_cell
ModuleNotFoundError: No module named 'tensorflow.contrib'

jet@jet:~/captcher$ uname -a
Linux jet 4.9.253-tegra #1 SMP PREEMPT Mon Jul 26 12:13:06 PDT 2021 aarch64 aarch64 aarch64 GNU/Linux
jet@jet:~/captcher$ python --version
Python 3.6.9
jet@jet:~/captcher$ pip --version
pip 21.3.1 from /usr/local/lib/python3.6/dist-packages/pip (python 3.6)
jet@jet:~/captcher$
jet@jet:~/captcher$ python 
Python 3.6.9 (default, Dec  8 2021, 21:08:43) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
>>> import tensorflow as tf; print(tf.__version__)
2.6.2

What am I doin wrong?

Thank you

no training process

OS: Ubuntu 20.04.2 LTS in wsl2
Python: Anaconda python 3.7.9
Tensorflow: 1.15.5, cpu only

(captcha22) user1@DESKTOP-ABCDEF:~/anaconda3/envs/captcha22$ captcha22 server engine
INFO:Captcha22 Engine:Captcha22 engine start
INFO:Captcha22 Engine:Starting training
INFO:Captcha22 Engine:Checking if there are any new files
INFO:Captcha22 Engine:Start running
INFO:Captcha22 Engine:Model update
INFO:Captcha22 Engine:Testing training level
Traceback (most recent call last):
  File "/home/user1/anaconda3/envs/captcha22/bin/captcha22", line 8, in <module>
    sys.exit(main())
  File "/home/user1/anaconda3/envs/captcha22/lib/python3.7/site-packages/captcha22/__main__.py", line 278, in main
    args.func(args)
  File "/home/user1/anaconda3/envs/captcha22/lib/python3.7/site-packages/captcha22/lib/core/server.py", line 22, in server
    server.main()
  File "/home/user1/anaconda3/envs/captcha22/lib/python3.7/site-packages/captcha22/lib/server/captcha22.py", line 519, in main
    self.run_server()
  File "/home/user1/anaconda3/envs/captcha22/lib/python3.7/site-packages/captcha22/lib/server/captcha22.py", line 495, in run_server
    self.continue_training()
  File "/home/user1/anaconda3/envs/captcha22/lib/python3.7/site-packages/captcha22/lib/server/captcha22.py", line 437, in continue_training
    model.test_training_level()
  File "/home/user1/anaconda3/envs/captcha22/lib/python3.7/site-packages/captcha22/lib/server/captcha22.py", line 138, in test_training_level
    step = ast.literal_eval(values[1].split('Step ')[1].split(':')[0])
IndexError: list index out of range

direct aocr execution and output:

(captcha22) user1@DESKTOP-ABCDEF:~/anaconda3/envs/captcha22/Busy/admin/test/1$ aocr train --max-height 220 --max-width 50 labels/training.tfrecords
WARNING:tensorflow:From /home/user1/anaconda3/envs/captcha22/lib/python3.7/site-packages/aocr/__main__.py:20: The name tf.logging.set_verbosity is deprecated. Please use tf.compat.v1.logging.set_verbosity instead.

WARNING:tensorflow:From /home/user1/anaconda3/envs/captcha22/lib/python3.7/site-packages/aocr/__main__.py:20: The name tf.logging.ERROR is deprecated. Please use tf.compat.v1.logging.ERROR instead.

2021-04-12 18:10:29.129743: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2195015000 Hz
2021-04-12 18:10:29.134487: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55bdab3d0040 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2021-04-12 18:10:29.134673: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2021-04-12 18:10:29,140 root  INFO     phase: train
2021-04-12 18:10:29,140 root  INFO     model_dir: ./checkpoints
2021-04-12 18:10:29,141 root  INFO     load_model: True
2021-04-12 18:10:29,141 root  INFO     output_dir: ./results
2021-04-12 18:10:29,141 root  INFO     steps_per_checkpoint: 100
2021-04-12 18:10:29,142 root  INFO     batch_size: 65
2021-04-12 18:10:29,142 root  INFO     learning_rate: 1.000000
2021-04-12 18:10:29,142 root  INFO     reg_val: 0
2021-04-12 18:10:29,142 root  INFO     max_gradient_norm: 5.000000
2021-04-12 18:10:29,143 root  INFO     clip_gradients: True
2021-04-12 18:10:29,143 root  INFO     max_image_width 50.000000
2021-04-12 18:10:29,143 root  INFO     max_prediction_length 8.000000
2021-04-12 18:10:29,143 root  INFO     channels: 1
2021-04-12 18:10:29,143 root  INFO     target_embedding_size: 10.000000
2021-04-12 18:10:29,144 root  INFO     attn_num_hidden: 128
2021-04-12 18:10:29,144 root  INFO     attn_num_layers: 2
2021-04-12 18:10:29,144 root  INFO     visualize: False
2021-04-12 18:10:45,579 root  INFO     Reading model parameters from ./checkpoints/model.ckpt-0
2021-04-12 18:10:46.030381: W tensorflow/core/common_runtime/colocation_graph.cc:983] Failed to place the graph without changing the devices of some resources. Some of the operations (that had to be colocated with resource generating operations) are not supported on the resources' devices. Current candidate devices are [
  /job:localhost/replica:0/task:0/device:CPU:0].
See below for details of this colocation group:
Colocation Debug Info:
Colocation group had the following types and supported devices: 
Root Member(assigned_device_name_index_=-1 requested_device_name_='/device:GPU:0' assigned_device_name_='' resource_device_name_='/device:GPU:0' supported_device_types_=[CPU] possible_devices_=[]
Assign: CPU 
RandomUniform: CPU XLA_CPU 
Const: CPU XLA_CPU 
Mul: CPU XLA_CPU 
Sub: CPU XLA_CPU 
ApplyAdadelta: CPU 
Add: CPU XLA_CPU 
Identity: CPU XLA_CPU 
VariableV2: CPU 

Colocation members, user-requested devices, and framework assigned devices, if any:
  conv_conv1/W/Initializer/random_uniform/shape (Const) 
  conv_conv1/W/Initializer/random_uniform/min (Const) 
  conv_conv1/W/Initializer/random_uniform/max (Const) 
  conv_conv1/W/Initializer/random_uniform/RandomUniform (RandomUniform) 
  conv_conv1/W/Initializer/random_uniform/sub (Sub) 
  conv_conv1/W/Initializer/random_uniform/mul (Mul) 
  conv_conv1/W/Initializer/random_uniform (Add) 
  conv_conv1/W (VariableV2) /device:GPU:0
  conv_conv1/W/Assign (Assign) /device:GPU:0
  conv_conv1/W/read (Identity) /device:GPU:0
  conv_conv1/W/Adadelta/Initializer/zeros (Const) /device:GPU:0
  conv_conv1/W/Adadelta (VariableV2) /device:GPU:0
  conv_conv1/W/Adadelta/Assign (Assign) /device:GPU:0
  conv_conv1/W/Adadelta/read (Identity) /device:GPU:0
  conv_conv1/W/Adadelta_1/Initializer/zeros (Const) /device:GPU:0
  conv_conv1/W/Adadelta_1 (VariableV2) /device:GPU:0
  conv_conv1/W/Adadelta_1/Assign (Assign) /device:GPU:0
  conv_conv1/W/Adadelta_1/read (Identity) /device:GPU:0
  Adadelta/update_conv_conv1/W/ApplyAdadelta (ApplyAdadelta) /device:GPU:0
  save/Assign_13 (Assign) /device:GPU:0
  save/Assign_14 (Assign) /device:GPU:0
  save/Assign_15 (Assign) /device:GPU:0

2021-04-12 18:10:46.032016: W tensorflow/core/common_runtime/colocation_graph.cc:983] Failed to place the graph without changing the devices of some resources. Some of the operations (that had to be colocated with resource generating operations) are not supported on the resources' devices. Current candidate devices are [
  /job:localhost/replica:0/task:0/device:CPU:0].
See below for details of this colocation group:
Colocation Debug Info:
Colocation group had the following types and supported devices:
[...] 
2021-04-12 18:10:50.219172: W tensorflow/core/common_runtime/colocation_graph.cc:983] Failed to place the graph without changing the devices of some resources. Some of the operations (that had to be colocated with resource generating operations) are not supported on the resources' devices. Current candidate devices are [
  /job:localhost/replica:0/task:0/device:CPU:0].
See below for details of this colocation group:
Colocation Debug Info:
Colocation group had the following types and supported devices: 
Root Member(assigned_device_name_index_=-1 requested_device_name_='/device:GPU:0' assigned_device_name_='' resource_device_name_='/device:GPU:0' supported_device_types_=[CPU] possible_devices_=[]
Switch: CPU XLA_CPU 
Enter: CPU XLA_CPU 
LookupTableFindV2: CPU 
LookupTableInsertV2: CPU 
MutableHashTableV2: CPU 
LookupTableExportV2: CPU 

Colocation members, user-requested devices, and framework assigned devices, if any:
  MutableHashTable (MutableHashTableV2) /device:GPU:0
  MutableHashTable_lookup_table_export_values/LookupTableExportV2 (LookupTableExportV2) /device:GPU:0
  MutableHashTable_lookup_table_insert/LookupTableInsertV2 (LookupTableInsertV2) /device:GPU:0
  map_1/while/foldr/while/cond/MutableHashTable_lookup_table_find/LookupTableFindV2/Enter (Enter) /device:GPU:0
  map_1/while/foldr/while/cond/MutableHashTable_lookup_table_find/LookupTableFindV2/Enter_1 (Enter) /device:GPU:0
  map_1/while/foldr/while/cond/MutableHashTable_lookup_table_find/LookupTableFindV2/Switch (Switch) /device:GPU:0
  map_1/while/foldr/while/cond/MutableHashTable_lookup_table_find/LookupTableFindV2/Enter_2 (Enter) /device:GPU:0
  map_1/while/foldr/while/cond/MutableHashTable_lookup_table_find/LookupTableFindV2/Enter_3 (Enter) /device:GPU:0
  map_1/while/foldr/while/cond/MutableHashTable_lookup_table_find/LookupTableFindV2/Switch_2 (Switch) /device:GPU:0
  map_1/while/foldr/while/cond/MutableHashTable_lookup_table_find/LookupTableFindV2 (LookupTableFindV2) /device:GPU:0

2021-04-12 18:10:52,255 root  INFO     Global step 0. Time: 0.000, loss: 0.000000, perplexity: 1.00.
2021-04-12 18:10:52,255 root  INFO     Finishing the training and saving the model at step 0.

it just repeat the warning message until the end of the execution

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.