From 72f9dd9d6bc83c745762117851b47b11c232d01d Mon Sep 17 00:00:00 2001
From: Vaek <timothe.boulet@student-cs.fr>
Date: Fri, 2 Apr 2021 19:06:14 +0200
Subject: [PATCH] commit

---
 __pycache__/imageProcess.cpython-38.pyc | Bin 1293 -> 1314 bytes
 faceAnalysis.py                         |   8 ++++----
 imageProcess.py                         |  10 +++++-----
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/__pycache__/imageProcess.cpython-38.pyc b/__pycache__/imageProcess.cpython-38.pyc
index 0c4e6392fe0c5f003a515ceef07af3a8448a9d21..428395c2a3acef7eb61ec9595b0de545f752ef19 100644
GIT binary patch
delta 118
zcmeC>TExX0%FD~ez`(#zEft&aaU!p*jt&C@LkdF*V-7<Ugl3Fl0`r-pSW=i$m|Ga4
zSW{S1SX&sP*f#n}F*CAl&SW-cWK^HLkVQt2y@-Q>f#DWwUTJPY<t?VXg2{(j9C$!t
M9E=={984UF0K2ysi2wiq

delta 97
zcmZ3))yu^j%FD~ez`(%3Iz2eSa3Zg)iV6b*LkdF*V-7<Ugl3FlN?}T2ZefUGPGL!5
wZDELF*%&6p%*eXAklCD(QEl={78y3yA`S)yhRN4h9JtsR7#KJhIhZ&U0e|!nSpWb4

diff --git a/faceAnalysis.py b/faceAnalysis.py
index 107d9bc..7ac476f 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 a8b4be6..13dc64a 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()
 
-- 
GitLab