Followed instruction using docker. detect [POST] throwing 500 internal server error
Console Error
/usr/local/lib/python3.5/dist-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
2019-03-19 12:21:14.331394: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
Model filename: /root/pretrained_models/20180402-114759/20180402-114759.pb
* Serving Flask app "server" (lazy loading)
* Environment: production
WARNING: Do not use the development server in a production environment.
Use a production WSGI server instead.
* Debug mode: off
* Running on https://0.0.0.0:5000/ (Press CTRL+C to quit)
172.17.0.1 - - [19/Mar/2019 12:21:28] "GET / HTTP/1.1" 200 -
172.17.0.1 - - [19/Mar/2019 12:21:28] "GET /static/detect.js HTTP/1.1" 200 -
172.17.0.1 - - [19/Mar/2019 12:21:28] "GET /static/local.js HTTP/1.1" 200 -
Traceback (most recent call last):
File "server.py", line 49, in detect
faces = recognize(detection.get_faces(image, threshold))
File "/workspace/tensorface/recognition.py", line 19, in recognize
X[i, :] = embedding(img_to_np(img))
File "/workspace/tensorface/embedding.py", line 43, in embedding
images_placeholder = tf.get_default_graph().get_tensor_by_name("input:0")
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3654, in get_tensor_by_name
return self.as_graph_element(name, allow_tensor=True, allow_operation=False)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3478, in as_graph_element
return self._as_graph_element_locked(obj, allow_tensor, allow_operation)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3520, in _as_graph_element_locked
"graph." % (repr(name), repr(op_name)))
KeyError: "The name 'input:0' refers to a Tensor which does not exist. The operation, 'input', does not exist in the graph."
[2019-03-19 12:21:34,249] ERROR in app: Exception on /detect [POST]
Traceback (most recent call last):
File "server.py", line 49, in detect
faces = recognize(detection.get_faces(image, threshold))
File "/workspace/tensorface/recognition.py", line 19, in recognize
X[i, :] = embedding(img_to_np(img))
File "/workspace/tensorface/embedding.py", line 43, in embedding
images_placeholder = tf.get_default_graph().get_tensor_by_name("input:0")
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3654, in get_tensor_by_name
return self.as_graph_element(name, allow_tensor=True, allow_operation=False)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3478, in as_graph_element
return self._as_graph_element_locked(obj, allow_tensor, allow_operation)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3520, in _as_graph_element_locked
"graph." % (repr(name), repr(op_name)))
KeyError: "The name 'input:0' refers to a Tensor which does not exist. The operation, 'input', does not exist in the graph."
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.5/dist-packages/flask/_compat.py", line 35, in reraise
raise value
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "server.py", line 69, in detect
print('POST /detect error: %e' % e)
TypeError: a float is required
172.17.0.1 - - [19/Mar/2019 12:21:34] "POST /detect HTTP/1.1" 500 -
Traceback (most recent call last):
File "server.py", line 49, in detect
faces = recognize(detection.get_faces(image, threshold))
File "/workspace/tensorface/recognition.py", line 19, in recognize
X[i, :] = embedding(img_to_np(img))
File "/workspace/tensorface/embedding.py", line 43, in embedding
images_placeholder = tf.get_default_graph().get_tensor_by_name("input:0")
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3654, in get_tensor_by_name
return self.as_graph_element(name, allow_tensor=True, allow_operation=False)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3478, in as_graph_element
return self._as_graph_element_locked(obj, allow_tensor, allow_operation)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3520, in _as_graph_element_locked
"graph." % (repr(name), repr(op_name)))
KeyError: "The name 'input:0' refers to a Tensor which does not exist. The operation, 'input', does not exist in the graph."
[2019-03-19 12:21:34,307] ERROR in app: Exception on /detect [POST]
Traceback (most recent call last):
File "server.py", line 49, in detect
faces = recognize(detection.get_faces(image, threshold))
File "/workspace/tensorface/recognition.py", line 19, in recognize
X[i, :] = embedding(img_to_np(img))
File "/workspace/tensorface/embedding.py", line 43, in embedding
images_placeholder = tf.get_default_graph().get_tensor_by_name("input:0")
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3654, in get_tensor_by_name
return self.as_graph_element(name, allow_tensor=True, allow_operation=False)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3478, in as_graph_element
return self._as_graph_element_locked(obj, allow_tensor, allow_operation)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3520, in _as_graph_element_locked
"graph." % (repr(name), repr(op_name)))
KeyError: "The name 'input:0' refers to a Tensor which does not exist. The operation, 'input', does not exist in the graph."
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.5/dist-packages/flask/_compat.py", line 35, in reraise
raise value
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "server.py", line 69, in detect
print('POST /detect error: %e' % e)
TypeError: a float is required
172.17.0.1 - - [19/Mar/2019 12:21:34] "POST /detect HTTP/1.1" 500 -
172.17.0.1 - - [19/Mar/2019 12:21:57] "GET / HTTP/1.1" 200 -
172.17.0.1 - - [19/Mar/2019 12:21:57] "GET /static/local.js HTTP/1.1" 304 -
172.17.0.1 - - [19/Mar/2019 12:21:57] "GET /static/detect.js HTTP/1.1" 304 -
Traceback (most recent call last):
File "server.py", line 49, in detect
faces = recognize(detection.get_faces(image, threshold))
File "/workspace/tensorface/recognition.py", line 19, in recognize
X[i, :] = embedding(img_to_np(img))
File "/workspace/tensorface/embedding.py", line 43, in embedding
images_placeholder = tf.get_default_graph().get_tensor_by_name("input:0")
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3654, in get_tensor_by_name
return self.as_graph_element(name, allow_tensor=True, allow_operation=False)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3478, in as_graph_element
return self._as_graph_element_locked(obj, allow_tensor, allow_operation)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3520, in _as_graph_element_locked
"graph." % (repr(name), repr(op_name)))
KeyError: "The name 'input:0' refers to a Tensor which does not exist. The operation, 'input', does not exist in the graph."
[2019-03-19 12:22:02,014] ERROR in app: Exception on /detect [POST]
Traceback (most recent call last):
File "server.py", line 49, in detect
faces = recognize(detection.get_faces(image, threshold))
File "/workspace/tensorface/recognition.py", line 19, in recognize
X[i, :] = embedding(img_to_np(img))
File "/workspace/tensorface/embedding.py", line 43, in embedding
images_placeholder = tf.get_default_graph().get_tensor_by_name("input:0")
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3654, in get_tensor_by_name
return self.as_graph_element(name, allow_tensor=True, allow_operation=False)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3478, in as_graph_element
return self._as_graph_element_locked(obj, allow_tensor, allow_operation)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3520, in _as_graph_element_locked
"graph." % (repr(name), repr(op_name)))
KeyError: "The name 'input:0' refers to a Tensor which does not exist. The operation, 'input', does not exist in the graph."
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.5/dist-packages/flask/_compat.py", line 35, in reraise
raise value
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "server.py", line 69, in detect
print('POST /detect error: %e' % e)
TypeError: a float is required
172.17.0.1 - - [19/Mar/2019 12:22:02] "POST /detect HTTP/1.1" 500 -
Traceback (most recent call last):
File "server.py", line 49, in detect
faces = recognize(detection.get_faces(image, threshold))
File "/workspace/tensorface/recognition.py", line 19, in recognize
X[i, :] = embedding(img_to_np(img))
File "/workspace/tensorface/embedding.py", line 43, in embedding
images_placeholder = tf.get_default_graph().get_tensor_by_name("input:0")
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3654, in get_tensor_by_name
return self.as_graph_element(name, allow_tensor=True, allow_operation=False)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3478, in as_graph_element
return self._as_graph_element_locked(obj, allow_tensor, allow_operation)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3520, in _as_graph_element_locked
"graph." % (repr(name), repr(op_name)))
KeyError: "The name 'input:0' refers to a Tensor which does not exist. The operation, 'input', does not exist in the graph."
[2019-03-19 12:22:02,108] ERROR in app: Exception on /detect [POST]
Traceback (most recent call last):
File "server.py", line 49, in detect
faces = recognize(detection.get_faces(image, threshold))
File "/workspace/tensorface/recognition.py", line 19, in recognize
X[i, :] = embedding(img_to_np(img))
File "/workspace/tensorface/embedding.py", line 43, in embedding
images_placeholder = tf.get_default_graph().get_tensor_by_name("input:0")
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3654, in get_tensor_by_name
return self.as_graph_element(name, allow_tensor=True, allow_operation=False)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3478, in as_graph_element
return self._as_graph_element_locked(obj, allow_tensor, allow_operation)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/ops.py", line 3520, in _as_graph_element_locked
"graph." % (repr(name), repr(op_name)))
KeyError: "The name 'input:0' refers to a Tensor which does not exist. The operation, 'input', does not exist in the graph."
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.5/dist-packages/flask/_compat.py", line 35, in reraise
raise value
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "server.py", line 69, in detect
print('POST /detect error: %e' % e)
TypeError: a float is required
172.17.0.1 - - [19/Mar/2019 12:22:02] "POST /detect HTTP/1.1" 500 -
Followed instruction using docker. detect [POST] throwing 500 internal server error
Console Error