Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

报错说yolo3那里的变量没有初始化,请问怎么解决呢 #54

Open
sy173 opened this issue Oct 21, 2022 · 0 comments
Open

报错说yolo3那里的变量没有初始化,请问怎么解决呢 #54

sy173 opened this issue Oct 21, 2022 · 0 comments

Comments

@sy173
Copy link

sy173 commented Oct 21, 2022

Traceback (most recent call last):
File "D:\Anacaonda\envs\invoice-master\lib\site-packages\flask\app.py", line 2091, in call
return self.wsgi_app(environ, start_response)
File "D:\Anacaonda\envs\invoice-master\lib\site-packages\flask\app.py", line 2076, in wsgi_app
response = self.handle_exception(e)
File "D:\Anacaonda\envs\invoice-master\lib\site-packages\flask_cors\extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "D:\Anacaonda\envs\invoice-master\lib\site-packages\flask\app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "D:\Anacaonda\envs\invoice-master\lib\site-packages\flask\app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "D:\Anacaonda\envs\invoice-master\lib\site-packages\flask_cors\extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "D:\Anacaonda\envs\invoice-master\lib\site-packages\flask\app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "D:\Anacaonda\envs\invoice-master\lib\site-packages\flask\app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "C:\Users\HP\Desktop\invoice-master\app.py", line 110, in invoice_ocr
Recognition_invoice = Recognition_invoice(whole_path)
File "C:\Users\HP\Desktop\invoice-master\app.py", line 81, in Recognition_invoice
result_type = OCR(img1)
File "C:\Users\HP\Desktop\invoice-master\model_post_type.py", line 156, in ocr
alph=0.01, ##对检测的文本行进行向右、左延伸的倍数
File "C:\Users\HP\Desktop\invoice-master\model_post_type.py", line 124, in model
text_recs = text_detect(**config) ##文字检测
File "C:\Users\HP\Desktop\invoice-master\model_post_type.py", line 45, in text_detect
boxes, scores = detect.text_detect(np.array(img))
File "C:\Users\HP\Desktop\invoice-master\text\keras_detect_type.py", line 57, in text_detect
K.learning_phase(): 0
File "C:\Users\HP\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\client\session.py", line 958, in run
run_metadata_ptr)
File "C:\Users\HP\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\client\session.py", line 1181, in _run
feed_dict_tensor, options, run_metadata)
File "C:\Users\HP\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\client\session.py", line 1359, in _do_run
run_metadata)
File "C:\Users\HP\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\client\session.py", line 1384, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.FailedPreconditionError: Error while reading resource variable conv2d_74/kernel from Container: localhost. This could mean that the variable was uninitialized. Not found: Container localhost does not exist. (Could not find resource: localhost/conv2d_74/kernel)
[[node conv2d_74/Conv2D/ReadVariableOp (defined at C:\Users\HP\Desktop\invoice-master\text\keras_yolo3.py:49) ]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant