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

cv2 assertion failure in windows #3

Open
pankaj-giri opened this issue Sep 6, 2020 · 0 comments
Open

cv2 assertion failure in windows #3

pankaj-giri opened this issue Sep 6, 2020 · 0 comments

Comments

@pankaj-giri
Copy link
Owner

Environment -
tensorflow==1.15
keras==2.31
cv2==4.2.0

C:\Users\girip\anaconda3\envs\python3.6\lib\site-packages\keras\engine\saving.py:384: UserWarning: Error in loading the saved optimizer state. As a result, your model is starting with a freshly initialized optimizer.
warnings.warn('Error in loading the saved optimizer '
[2020-09-06 18:41:08,267] ERROR in app: Exception on /predict_input [POST]
Traceback (most recent call last):
File "C:\Users\girip\anaconda3\envs\python3.6\lib\site-packages\flask\app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\girip\anaconda3\envs\python3.6\lib\site-packages\flask\app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\girip\anaconda3\envs\python3.6\lib\site-packages\flask_cors\extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "C:\Users\girip\anaconda3\envs\python3.6\lib\site-packages\flask\app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "C:\Users\girip\anaconda3\envs\python3.6\lib\site-packages\flask_compat.py", line 39, in reraise
raise value
File "C:\Users\girip\anaconda3\envs\python3.6\lib\site-packages\flask\app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\girip\anaconda3\envs\python3.6\lib\site-packages\flask\app.py", line 1936, in dispatch_request
return self.view_functionsrule.endpoint
File "MNIST_web.py", line 138, in predict_input
predictions = segment_predict_digits(opencv_image)
File "MNIST_web.py", line 109, in segment_predict_digits
if cv2.contourArea(contour) < 100:
cv2.error: OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\imgproc\src\shapedescr.cpp:315: error: (-215:Assertion failed) npoints >= 0 && (depth == CV_32F || depth == CV_32S) in function 'cv::contourArea'

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