Skip to content
Snippets Groups Projects
Commit 921fe02d authored by Timothé Boulet's avatar Timothé Boulet :alien:
Browse files

debug

parents fda87efa b2a35e34
Branches
No related tags found
No related merge requests found
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
This diff is collapsed.
......@@ -5,7 +5,9 @@ import cv2
from utils import *
from config import emotions, input_shape, modelName
model = keras.models.load_model("models/"+modelName) #Load our model
#model = tf.keras.models.load_model("models/"+modelName) #Load our model
model = tf.saved_model.load("models/"+modelName)
print('Model used:', modelName)
def detectEmotion(face):
......
......@@ -17,11 +17,6 @@ def smileyRandom(emotionToDodge):
smiley = cv2.imread(smileyImagePath)
return smiley, emotion
ismain = __name__ == "__main__"
if ismain:
smiley, emotion = smileyRandom("")
while cap.isOpened(): #or while 1. cap.isOpened() is false if there is a problem
......
......@@ -18,8 +18,8 @@ def afficher(image):
def predir(modele, image):
# Return output of image from modele
return modele.predict(np.array([image]))[0, :]
#return modele.predict(np.array([image]))[0, :]
return modele(np.array([image]))[0, :]
def normAndResize(image, input_shape):
# For an array image of shape (a,b,c) or (a,b), transform it into (h,l,p). Also normalize it.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment