diff --git a/src/__pycache__/config.cpython-38.pyc b/src/__pycache__/config.cpython-38.pyc new file mode 100644 index 0000000..de6c938 Binary files /dev/null and b/src/__pycache__/config.cpython-38.pyc differ diff --git a/src/config.py b/src/config.py index 36f5f05..e3fc6bd 100644 --- a/src/config.py +++ b/src/config.py @@ -1,6 +1,6 @@ from flask import Flask from flask_mongoengine import MongoEngine -from deepface import DeepFaceLite +from deepface.DeepFaceLite import DeepFaceLite # import tensorflow as tf # from tensorflow.python.keras.backend import set_session import os diff --git a/src/controller/__pycache__/__init__.cpython-38.pyc b/src/controller/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..5ea2d72 Binary files /dev/null and b/src/controller/__pycache__/__init__.cpython-38.pyc differ diff --git a/src/controller/__pycache__/feedback_controller.cpython-38.pyc b/src/controller/__pycache__/feedback_controller.cpython-38.pyc new file mode 100644 index 0000000..5477d21 Binary files /dev/null and b/src/controller/__pycache__/feedback_controller.cpython-38.pyc differ diff --git a/src/controller/__pycache__/general_controller.cpython-38.pyc b/src/controller/__pycache__/general_controller.cpython-38.pyc new file mode 100644 index 0000000..2623481 Binary files /dev/null and b/src/controller/__pycache__/general_controller.cpython-38.pyc differ diff --git a/src/controller/__pycache__/prediction_controller.cpython-38.pyc b/src/controller/__pycache__/prediction_controller.cpython-38.pyc new file mode 100644 index 0000000..6f02c03 Binary files /dev/null and b/src/controller/__pycache__/prediction_controller.cpython-38.pyc differ diff --git a/src/deepface/DeepFaceLite.py b/src/deepface/DeepFaceLite.py index b4ce054..ce78975 100644 --- a/src/deepface/DeepFaceLite.py +++ b/src/deepface/DeepFaceLite.py @@ -62,9 +62,9 @@ class DeepFaceLite(object): all_emotions = {} - for i in range(0, len(emotion_labels)): - emotion_label = emotion_labels[i] - emotion_prediction = 100 * emotion_predictions[i] / sum_of_predictions + for j in range(0, len(emotion_labels)): + emotion_label = emotion_labels[j] + emotion_prediction = 100 * emotion_predictions[j] / sum_of_predictions all_emotions[emotion_label] = emotion_prediction emotion = { diff --git a/src/deepface/__pycache__/DeepFaceLite.cpython-38.pyc b/src/deepface/__pycache__/DeepFaceLite.cpython-38.pyc index f7468ec..145ab70 100644 Binary files a/src/deepface/__pycache__/DeepFaceLite.cpython-38.pyc and b/src/deepface/__pycache__/DeepFaceLite.cpython-38.pyc differ diff --git a/src/deepface/commons/__pycache__/functionsLite.cpython-38.pyc b/src/deepface/commons/__pycache__/functionsLite.cpython-38.pyc index 3190a25..ff813fe 100644 Binary files a/src/deepface/commons/__pycache__/functionsLite.cpython-38.pyc and b/src/deepface/commons/__pycache__/functionsLite.cpython-38.pyc differ diff --git a/src/deepface/commons/functionsLite.py b/src/deepface/commons/functionsLite.py index 46f874b..515c486 100644 --- a/src/deepface/commons/functionsLite.py +++ b/src/deepface/commons/functionsLite.py @@ -138,14 +138,16 @@ def detect_face(img, detector_backend='opencv', enforce_detection=True): # drawing settings font = ImageFont.truetype(font='font/FiraMono-Medium.otf', - size=np.floor(3e-2 * img.size[1] + 0.5).astype('int32')) + size=np.floor(2e-2 * img.size[1] + 0.5).astype('int32')) thickness = (img.size[0] + img.size[1]) // 300 - hsv_tuples = [(x / 50, 1., 1.) - for x in range(50)] - colors = list(map(lambda x: colorsys.hsv_to_rgb(*x), hsv_tuples)) - colors = list( - map(lambda x: (int(x[0] * 255), int(x[1] * 255), int(x[2] * 255)), colors)) - np.random.shuffle(colors) # Shuffle colors to decorrelate adjacent classes. + + # # colors + # hsv_tuples = [(x / 50, 1., 1.) + # for x in range(50)] + # colors = list(map(lambda x: colorsys.hsv_to_rgb(*x), hsv_tuples)) + # colors = list( + # map(lambda x: (int(x[0] * 255), int(x[1] * 255), int(x[2] * 255)), colors)) + # np.random.shuffle(colors) # Shuffle colors to decorrelate adjacent classes. # keep PIL image and cv2 image @@ -205,12 +207,12 @@ def detect_face(img, detector_backend='opencv', enforce_detection=True): for i in range(thickness): draw.rectangle( [left + i, top + i, right - i, bottom - i], - outline=colors[i]) + outline='blue') if showid: draw.rectangle( [tuple(text_origin), tuple(text_origin + label_size)], - fill=colors[i] + fill='blue' ) draw.text(text_origin, label, fill=(0, 0, 0), font=font) del draw @@ -325,12 +327,12 @@ def detect_face(img, detector_backend='opencv', enforce_detection=True): for i in range(thickness): draw.rectangle( [left + i, top + i, right - i, bottom - i], - outline=colors[i]) + outline='blue') if showid: draw.rectangle( [tuple(text_origin), tuple(text_origin + label_size)], - fill=colors[i] + fill='blue' ) draw.text(text_origin, label, fill=(0, 0, 0), font=font) del draw @@ -391,12 +393,12 @@ def detect_face(img, detector_backend='opencv', enforce_detection=True): for i in range(thickness): draw.rectangle( [left + i, top + i, right - i, bottom - i], - outline=colors[i]) + outline='blue') if showid: draw.rectangle( [tuple(text_origin), tuple(text_origin + label_size)], - fill=colors[i] + fill='blue' ) draw.text(text_origin, label, fill=(0, 0, 0), font=font) del draw @@ -452,12 +454,12 @@ def detect_face(img, detector_backend='opencv', enforce_detection=True): for i in range(thickness): draw.rectangle( [left + i, top + i, right - i, bottom - i], - outline=colors[i]) + outline='blue') if showid: draw.rectangle( [tuple(text_origin), tuple(text_origin + label_size)], - fill=colors[i] + fill='blue' ) draw.text(text_origin, label, fill=(0, 0, 0), font=font) del draw diff --git a/src/deepface_lite.ipynb b/src/deepface_lite.ipynb index bcbf485..2f8f055 100644 --- a/src/deepface_lite.ipynb +++ b/src/deepface_lite.ipynb @@ -40,7 +40,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 8, "outputs": [], "source": [ "im = Image.open(imgs[0])\n", @@ -55,7 +55,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 9, "outputs": [], "source": [ "deepface = DeepFaceLite()" @@ -69,7 +69,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 10, "metadata": { "tags": [ "outputPrepend" @@ -79,19 +79,7 @@ { "output_type": "stream", "name": "stdout", - "text": " tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:10 out of the last 12 calls to <function Model.make_predict_function.<locals>.predict_function at 0x156a673a0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x156d451f0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x155e2eaf0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x155e2eaf0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:10 out of the last 12 calls to <function Model.make_predict_function.<locals>.predict_function at 0x155e2eaf0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x1555481f0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x155ba0040> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x155ba0040> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x155ba0040> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x155af5b80> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x156448160> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x155ba0b80> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x155ba0b80> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:10 out of the last 12 calls to <function Model.make_predict_function.<locals>.predict_function at 0x155ba0b80> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x155df93a0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x1562c8790> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x1562c8790> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:10 out of the last 12 calls to <function Model.make_predict_function.<locals>.predict_function at 0x1562c8790> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x156621d30> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x15639fd30> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x15639fd30> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x15639fd30> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:8 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x155b2e4c0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:8 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x156b52940> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\n(48, 48, 1)\n(48, 48, 1)\n(48, 48, 1)\n(48, 48, 1)\n(48, 48, 1)\n(48, 48, 1)\n(48, 48, 1)\n(48, 48, 1)\n(48, 48, 1)\n(48, 48, 1)\n(48, 48, 1)\n(48, 48, 1)\n(48, 48, 1)\n(48, 48, 1)\n(48, 48, 1)\n(48, 48, 1)\n(48, 48, 1)\n(48, 48, 1)\n(48, 48, 1)\n(48, 48, 1)\n(48, 48, 1)\n(48, 48, 1)\n(48, 48, 1)\nWARNING:tensorflow:8 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x156d14550> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\n" - }, - { - "output_type": "error", - "ename": "UnboundLocalError", - "evalue": "local variable 'emotion' referenced before assignment", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mUnboundLocalError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m<ipython-input-5-e0d7d2865a2c>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mimg\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mresponses\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdeepface\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0manalyze\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mim\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdetector_backend\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'mtcnn'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;32m~/GitHub/deepface/deepface/DeepFaceLite.py\u001b[0m in \u001b[0;36manalyze\u001b[0;34m(self, img, enforce_detection, detector_backend)\u001b[0m\n\u001b[1;32m 66\u001b[0m \u001b[0memotion_label\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0memotion_labels\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mi\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 67\u001b[0m \u001b[0memotion_prediction\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m100\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0memotion_predictions\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mi\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m/\u001b[0m \u001b[0msum_of_predictions\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 68\u001b[0;31m \u001b[0memotion\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0memotion_label\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0memotion_prediction\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 69\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 70\u001b[0m \t\t\temotion = {\n", - "\u001b[0;31mUnboundLocalError\u001b[0m: local variable 'emotion' referenced before assignment" - ] + "text": "low.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x152fa7ca0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x152b31430> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x152b31430> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:10 out of the last 12 calls to <function Model.make_predict_function.<locals>.predict_function at 0x152b31430> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x153537670> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x1525614c0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x1525614c0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x1525614c0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x15351d280> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x1537ed1f0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x1533f8b80> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x1533f8b80> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:10 out of the last 12 calls to <function Model.make_predict_function.<locals>.predict_function at 0x1533f8b80> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x153d7c790> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x15383e3a0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x15383e3a0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:10 out of the last 12 calls to <function Model.make_predict_function.<locals>.predict_function at 0x15383e3a0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x1541c0790> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x153d7c160> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x153d7c160> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x153d7c160> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:8 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x1543510d0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:8 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x154351ee0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:8 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x154399ca0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 12 calls to <function Model.make_predict_function.<locals>.predict_function at 0x1542f9f70> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\nWARNING:tensorflow:9 out of the last 11 calls to <function Model.make_predict_function.<locals>.predict_function at 0x15383e8b0> triggered tf.function retracing. Tracing is expensive and the excessive number of tracings could be due to (1) creating @tf.function repeatedly in a loop, (2) passing tensors with different shapes, (3) passing Python objects instead of tensors. For (1), please define your @tf.function outside of the loop. For (2), @tf.function has experimental_relax_shapes=True option that relaxes argument shapes that can avoid unnecessary retracing. For (3), please refer to https://www.tensorflow.org/tutorials/customization/performance#python_or_tensor_args and https://www.tensorflow.org/api_docs/python/tf/function for more details.\n" } ], "source": [ @@ -100,25 +88,31 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 11, "metadata": {}, "outputs": [ { - "output_type": "error", - "ename": "NameError", - "evalue": "name 'responses' is not defined", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m<ipython-input-6-0cc425ba09a4>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mresponses\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;31mNameError\u001b[0m: name 'responses' is not defined" - ] + "output_type": "execute_result", + "data": { + "text/plain": "[{'age': 30.7075993044274,\n 'gender': 'Man',\n 'emotion': {'all': {'angry': 0.06512477993965149,\n 'disgust': 6.7842829132303e-07,\n 'fear': 1.709260232746601,\n 'happy': 96.76294326782227,\n 'sad': 0.15622316859662533,\n 'surprise': 0.004155550777795725,\n 'neutral': 1.3022944331169128},\n 'dominant': 'happy',\n 'dominant_score': 0.96762943}},\n {'age': 26.767930865363326,\n 'gender': 'Man',\n 'emotion': {'all': {'angry': 5.277312623955668e-07,\n 'disgust': 1.187022442278122e-16,\n 'fear': 3.87036667650891e-06,\n 'happy': 99.98644590539385,\n 'sad': 0.0006582994171507187,\n 'surprise': 0.0004150258933820861,\n 'neutral': 0.012470538754734247},\n 'dominant': 'happy',\n 'dominant_score': 0.9998646}},\n {'age': 32.83087182831849,\n 'gender': 'Woman',\n 'emotion': {'all': {'angry': 5.924798493660467e-17,\n 'disgust': 2.8012250014011216e-35,\n 'fear': 2.5669633820345634e-19,\n 'happy': 99.99052286148071,\n 'sad': 5.5502548552887276e-15,\n 'surprise': 4.5748366032938304e-10,\n 'neutral': 0.009481033339397982},\n 'dominant': 'happy',\n 'dominant_score': 0.9999052}},\n {'age': 23.797269748967757,\n 'gender': 'Man',\n 'emotion': {'all': {'angry': 2.014957210169301e-08,\n 'disgust': 1.4977098088557938e-22,\n 'fear': 1.4982995172865604e-13,\n 'happy': 99.97287988501071,\n 'sad': 2.770427553063583e-11,\n 'surprise': 1.3885342488821505e-09,\n 'neutral': 0.02712251896582657},\n 'dominant': 'happy',\n 'dominant_score': 0.99972874}},\n {'age': 24.393267559334838,\n 'gender': 'Man',\n 'emotion': {'all': {'angry': 2.516199693047838e-06,\n 'disgust': 4.153522671557008e-14,\n 'fear': 1.7720998002346278e-07,\n 'happy': 99.90577101707458,\n 'sad': 8.373182008858393e-09,\n 'surprise': 0.0014167230801831465,\n 'neutral': 0.09281422244384885},\n 'dominant': 'happy',\n 'dominant_score': 0.9990577}},\n {'age': 24.043515765118595,\n 'gender': 'Man',\n 'emotion': {'all': {'angry': 3.060047870579233e-14,\n 'disgust': 4.820702791899682e-32,\n 'fear': 2.730741222681364e-22,\n 'happy': 100.0,\n 'sad': 8.458075567249855e-18,\n 'surprise': 1.5083737731577966e-16,\n 'neutral': 1.637165403245433e-08},\n 'dominant': 'happy',\n 'dominant_score': 1.0}},\n {'age': 26.059357802833954,\n 'gender': 'Woman',\n 'emotion': {'all': {'angry': 2.206428399362248e-10,\n 'disgust': 3.020534017268343e-17,\n 'fear': 4.0115764138000994e-13,\n 'happy': 99.56392049789429,\n 'sad': 1.6978233263742482e-07,\n 'surprise': 2.148198147144953e-08,\n 'neutral': 0.43608020059764385},\n 'dominant': 'happy',\n 'dominant_score': 0.9956392}},\n {'age': 28.582532340085052,\n 'gender': 'Man',\n 'emotion': {'all': {'angry': 1.4657273847992167e-14,\n 'disgust': 3.884353069460525e-23,\n 'fear': 2.3620467654580146e-21,\n 'happy': 99.99973773956299,\n 'sad': 4.371422386399704e-11,\n 'surprise': 6.279944093195153e-14,\n 'neutral': 0.0002616236315589049},\n 'dominant': 'happy',\n 'dominant_score': 0.9999974}},\n {'age': 33.15181962717794,\n 'gender': 'Man',\n 'emotion': {'all': {'angry': 0.0005804318680376881,\n 'disgust': 1.5282411664450355e-09,\n 'fear': 4.49397240672534e-08,\n 'happy': 99.45535060497228,\n 'sad': 0.014507297010595919,\n 'surprise': 4.529519043923959e-09,\n 'neutral': 0.5295606180018555},\n 'dominant': 'happy',\n 'dominant_score': 0.99455345}},\n {'age': 24.973316125330875,\n 'gender': 'Man',\n 'emotion': {'all': {'angry': 1.0479751511027757e-07,\n 'disgust': 3.158302499252698e-17,\n 'fear': 8.899390252503636e-09,\n 'happy': 99.97872710227966,\n 'sad': 2.67038746670778e-07,\n 'surprise': 9.554952315471432e-10,\n 'neutral': 0.021272928279358894},\n 'dominant': 'happy',\n 'dominant_score': 0.9997873}},\n {'age': 29.062780761673267,\n 'gender': 'Man',\n 'emotion': {'all': {'angry': 6.818367918881574e-10,\n 'disgust': 1.0034776457889713e-20,\n 'fear': 1.8157855774525444e-08,\n 'happy': 100.0,\n 'sad': 2.5700747953438796e-10,\n 'surprise': 4.366894756913098e-06,\n 'neutral': 5.087406884651813e-09},\n 'dominant': 'happy',\n 'dominant_score': 1.0}},\n {'age': 29.64669995951802,\n 'gender': 'Man',\n 'emotion': {'all': {'angry': 6.7188082744309595e-15,\n 'disgust': 1.7538130760053728e-26,\n 'fear': 1.2517986581115512e-17,\n 'happy': 99.83847141265869,\n 'sad': 2.9362746517661064e-13,\n 'surprise': 2.2689903775297005e-09,\n 'neutral': 0.16152729513123631},\n 'dominant': 'happy',\n 'dominant_score': 0.9983847}},\n {'age': 35.83046389021009,\n 'gender': 'Man',\n 'emotion': {'all': {'angry': 2.6497252337791303e-16,\n 'disgust': 3.0136605102381477e-25,\n 'fear': 1.6340595552331688e-19,\n 'happy': 99.99663829803467,\n 'sad': 7.615165008995062e-11,\n 'surprise': 1.2639162264621633e-14,\n 'neutral': 0.003362429197295569},\n 'dominant': 'happy',\n 'dominant_score': 0.9999664}},\n {'age': 31.814163574056245,\n 'gender': 'Woman',\n 'emotion': {'all': {'angry': 4.494366250690218e-10,\n 'disgust': 8.417488787272204e-18,\n 'fear': 3.603830846617877e-14,\n 'happy': 99.00215268135071,\n 'sad': 3.2365238961107323e-09,\n 'surprise': 8.50359516135768e-07,\n 'neutral': 0.9978472255170345},\n 'dominant': 'happy',\n 'dominant_score': 0.9900215}},\n {'age': 32.5989310960335,\n 'gender': 'Woman',\n 'emotion': {'all': {'angry': 3.1245277297778515e-19,\n 'disgust': 1.2937012401507033e-36,\n 'fear': 2.2782449858426532e-30,\n 'happy': 99.9996364116452,\n 'sad': 7.895841427225173e-16,\n 'surprise': 1.1545087159574724e-17,\n 'neutral': 0.00036441538112042183},\n 'dominant': 'happy',\n 'dominant_score': 0.9999963}},\n {'age': 24.026988302519023,\n 'gender': 'Man',\n 'emotion': {'all': {'angry': 1.8193476255262485e-05,\n 'disgust': 5.971556267693282e-17,\n 'fear': 0.0009965600523269673,\n 'happy': 98.41691842180005,\n 'sad': 1.5820401732349498,\n 'surprise': 4.240301505225534e-10,\n 'neutral': 3.161194872220283e-05},\n 'dominant': 'happy',\n 'dominant_score': 0.9841691}},\n {'age': 30.569167771902148,\n 'gender': 'Man',\n 'emotion': {'all': {'angry': 1.6858996970533964,\n 'disgust': 0.019059079293685173,\n 'fear': 18.5241214661743,\n 'happy': 71.2277556929297,\n 'sad': 0.17017258497149765,\n 'surprise': 1.9624094024192575,\n 'neutral': 6.410582382748411},\n 'dominant': 'happy',\n 'dominant_score': 0.7122775}},\n {'age': 29.31149959101849,\n 'gender': 'Man',\n 'emotion': {'all': {'angry': 0.0333790696458891,\n 'disgust': 6.592448375392079e-10,\n 'fear': 2.2593388848690665e-05,\n 'happy': 0.002748208680714015,\n 'sad': 0.03049092774745077,\n 'surprise': 0.00048487490857951343,\n 'neutral': 99.93287324905396},\n 'dominant': 'neutral',\n 'dominant_score': 0.99932873}},\n {'age': 30.93848611997489,\n 'gender': 'Man',\n 'emotion': {'all': {'angry': 1.025754358026116e-13,\n 'disgust': 1.0377452882230766e-23,\n 'fear': 5.5629669669424425e-15,\n 'happy': 98.41204285621643,\n 'sad': 1.6239027483822e-09,\n 'surprise': 2.8596558454552223e-08,\n 'neutral': 1.5879573300480843},\n 'dominant': 'happy',\n 'dominant_score': 0.9841204}},\n {'age': 26.33239561643032,\n 'gender': 'Man',\n 'emotion': {'all': {'angry': 0.0005101358812093802,\n 'disgust': 1.1568618814660217e-09,\n 'fear': 0.01678552598594937,\n 'happy': 71.41002757429747,\n 'sad': 26.935684450187154,\n 'surprise': 2.0935702940201322e-05,\n 'neutral': 1.636966867808477},\n 'dominant': 'happy',\n 'dominant_score': 0.71410036}},\n {'age': 39.32041485268002,\n 'gender': 'Man',\n 'emotion': {'all': {'angry': 2.877078898539948e-07,\n 'disgust': 4.4046487276784636e-13,\n 'fear': 8.965399086843909e-06,\n 'happy': 99.96016622064516,\n 'sad': 0.02959908681112983,\n 'surprise': 1.2347091320742592e-08,\n 'neutral': 0.010217042527830747},\n 'dominant': 'happy',\n 'dominant_score': 0.9996018}},\n {'age': 40.37978850208853,\n 'gender': 'Woman',\n 'emotion': {'all': {'angry': 0.00047871189963188954,\n 'disgust': 1.3000094583975266e-15,\n 'fear': 44.150567054748535,\n 'happy': 55.65846562385559,\n 'sad': 0.19049039110541344,\n 'surprise': 2.4604217330193023e-06,\n 'neutral': 1.3664036568883375e-07},\n 'dominant': 'happy',\n 'dominant_score': 0.55658466}},\n {'age': 30.463646335025455,\n 'gender': 'Man',\n 'emotion': {'all': {'angry': 99.03399359774666,\n 'disgust': 0.06636489788563277,\n 'fear': 0.7675393035215969,\n 'happy': 0.010410940226772475,\n 'sad': 0.12015095876592889,\n 'surprise': 0.00021555328816884813,\n 'neutral': 0.001325008112261036},\n 'dominant': 'angry',\n 'dominant_score': 0.99034005}}]" + }, + "metadata": {}, + "execution_count": 11 } ], "source": [ "responses" ] }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [], + "source": [ + "img.show()" + ] + }, { "cell_type": "code", "execution_count": null, diff --git a/src/extension/__pycache__/constants.cpython-38.pyc b/src/extension/__pycache__/constants.cpython-38.pyc new file mode 100644 index 0000000..9927c17 Binary files /dev/null and b/src/extension/__pycache__/constants.cpython-38.pyc differ diff --git a/src/extension/__pycache__/utilServices.cpython-38.pyc b/src/extension/__pycache__/utilServices.cpython-38.pyc new file mode 100644 index 0000000..c5f6069 Binary files /dev/null and b/src/extension/__pycache__/utilServices.cpython-38.pyc differ diff --git a/src/views/__pycache__/__init__.cpython-38.pyc b/src/views/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000..9b7b8b9 Binary files /dev/null and b/src/views/__pycache__/__init__.cpython-38.pyc differ diff --git a/src/views/__pycache__/public_route.cpython-38.pyc b/src/views/__pycache__/public_route.cpython-38.pyc new file mode 100644 index 0000000..316edd3 Binary files /dev/null and b/src/views/__pycache__/public_route.cpython-38.pyc differ