diff --git a/access_control_python_server/app.py b/access_control_python_server/app.py index 2e057c8..f81a61e 100644 --- a/access_control_python_server/app.py +++ b/access_control_python_server/app.py @@ -3,6 +3,7 @@ import json import cv2 import base64 import numpy as np +from deepface import DeepFace app = Flask(__name__) @@ -18,9 +19,8 @@ def process_image(): request_data = json.loads(request.data.decode("utf-8")) img_nparr = np.frombuffer(base64.b64decode(request_data['image']), np.uint8) img = cv2.imdecode(img_nparr,cv2.IMREAD_COLOR) - cv2.imwrite("retrieved_img.jpg",img) - print(request_data) - return "Bing Bong!" + racist_detector = DeepFace.analyze(img) + return racist_detector if __name__ == '__main__':