diff --git a/__pycache__/imageProcess.cpython-38.pyc b/__pycache__/imageProcess.cpython-38.pyc index 0c4e6392fe0c5f003a515ceef07af3a8448a9d21..428395c2a3acef7eb61ec9595b0de545f752ef19 100644 Binary files a/__pycache__/imageProcess.cpython-38.pyc and b/__pycache__/imageProcess.cpython-38.pyc differ diff --git a/faceAnalysis.py b/faceAnalysis.py index 107d9bc9d0247b7583cbae2a518b54980d361f79..7ac476fe3049073b6944f802b7475c216ee558eb 100644 --- a/faceAnalysis.py +++ b/faceAnalysis.py @@ -3,15 +3,15 @@ import keras import numpy as np import cv2 from utils import * -from config import emotions, input_shape +from config import emotions, input_shape, modelName def detectEmotion(face): #Return the most likely emotion there is on a 48x48x1 gray face - #input = 48 - face = normAndResize(face, input_shape) + face = normAndResize(face, input_shape) #Process our image for input of model + + model = keras.models.load_model(modelName) #Load our model - model = keras.models.load_model('firstModel') #Load our model emotionVect = predir(model, face) emotionNbr = np.argmax(emotionVect) emotion = emotions[emotionNbr] diff --git a/imageProcess.py b/imageProcess.py index a8b4be6c44677402604ba168963a1c8bae7b0de9..13dc64af80d0d4c3e284a0d350db093eb2d1afb4 100644 --- a/imageProcess.py +++ b/imageProcess.py @@ -53,9 +53,9 @@ def selectFace(image): face = image[y:y+h, x:x+w] return face -image = cv2.imread("cagnol.jpg", 1) #Load Cagnol colored image -imageProcess(image) -cv2.imshow("Cagnol", image) -cv2.waitKey(0) -cv2.destroyAllWindows() +# image = cv2.imread("cagnol.jpg", 1) #Load Cagnol colored image +# imageProcess(image) +# cv2.imshow("Cagnol", image) +# cv2.waitKey(0) +# cv2.destroyAllWindows()