Closed ghost closed 4 years ago
Hi,
I will contunue and end it in next week cause im on vacation right now. Thwre was A problem with connecting craft and crnn but ill solve it in next week.
Thanks
it;s ready to go right now ;) best, Damian
@s3nh
conda env export > environment.yml
The reason I am asking for you to upload your crnn and craft models to test, is because when I run flask and choose the file and click predict, I get an error message:
Could not find a format to read the specified file in mode 'i'
Here are the models that I used models.zip
Here is the log:
Traceback (most recent call last):
File "/home/home/anaconda3/envs/craft2/lib/python3.6/site-packages/flask/app.py", line 2463, in __call__
return self.wsgi_app(environ, start_response)
File "/home/home/anaconda3/envs/craft2/lib/python3.6/site-packages/flask/app.py", line 2449, in wsgi_app
response = self.handle_exception(e)
File "/home/home/anaconda3/envs/craft2/lib/python3.6/site-packages/flask/app.py", line 1866, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/home/anaconda3/envs/craft2/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/home/anaconda3/envs/craft2/lib/python3.6/site-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/home/home/anaconda3/envs/craft2/lib/python3.6/site-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/home/anaconda3/envs/craft2/lib/python3.6/site-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/home/anaconda3/envs/craft2/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/home/anaconda3/envs/craft2/lib/python3.6/site-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "/home/home/anaconda3/envs/craft2/lib/python3.6/site-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/home/programs/pytorch-text-recognition-master/app.py", line 47, in make_prediction
crr = CraftReader(file)
File "/home/home/programs/pytorch-text-recognition-master/text_reco/models/craft/craft_reader.py", line 25, in __init__
super(CraftReader, self).__init__(image)
File "/home/home/programs/pytorch-text-recognition-master/text_reco/models/craft/imgproc.py", line 7, in __init__
self.image = io.imread(img_array)
File "/home/home/anaconda3/envs/craft2/lib/python3.6/site-packages/skimage/io/_io.py", line 61, in imread
img = call_plugin('imread', fname, plugin=plugin, **plugin_args)
File "/home/home/anaconda3/envs/craft2/lib/python3.6/site-packages/skimage/io/manage_plugins.py", line 210, in call_plugin
return func(*args, **kwargs)
File "/home/home/anaconda3/envs/craft2/lib/python3.6/site-packages/imageio/core/functions.py", line 221, in imread
reader = read(uri, format, "i", **kwargs)
File "/home/home/anaconda3/envs/craft2/lib/python3.6/site-packages/imageio/core/functions.py", line 139, in get_reader
"Could not find a format to read the specified file " "in mode %r" % mode
ValueError: Could not find a format to read the specified file in mode 'i'
Happened to me also. setup.py cause this problem, I'll work on it right now.
Solved.
file.save('static/images.jpg')
caused that problem. At the moment I deleted static image section so uploaded image will not show.
WIll try to move it to vue.js where I will add more functionalities.
@s3nh Hi there, What is the current code status?