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

example on a face

parent 8876e825
No related branches found
No related tags found
No related merge requests found
File added
No preview for this file type
#Name of model used
modelName = 'firstModel'
#Emotions provided by the dataset
emotions = ["Angry", "Disgust", "Fear", "Happy", "Sad", "Suprise", "Neutral"]
#Shape of input of the model
input_shape = (48,48,1)
\ No newline at end of file
...@@ -3,8 +3,7 @@ import keras ...@@ -3,8 +3,7 @@ import keras
import numpy as np import numpy as np
import cv2 import cv2
from utils import * from utils import *
emotions = ["Angry", "Disgust", "Fear", "Happy", "Sad", "Suprise", "Neutral"] from config import emotions, input_shape
input_shape = (48,48,1)
def detectEmotion(face): def detectEmotion(face):
#Return the most likely emotion there is on a 48x48x1 gray face #Return the most likely emotion there is on a 48x48x1 gray face
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
import cv2 import cv2
import numpy as np import numpy as np
import faceAnalysis as fa import faceAnalysis as fa
input_shape = (48,48,1)
def imageProcess(image): def imageProcess(image):
#Objectives : detect faces, identify emotion associated on it, modify the image by framing faces and writing their emotions associated #Objectives : detect faces, identify emotion associated on it, modify the image by framing faces and writing their emotions associated
......
...@@ -9,14 +9,6 @@ nbrImages = 35887 ...@@ -9,14 +9,6 @@ nbrImages = 35887
maxNbrImages = nbrImages maxNbrImages = nbrImages
emotions = ["Angry", "Disgust", "Fear", "Happy", "Sad", "Suprise", "Neutral"] emotions = ["Angry", "Disgust", "Fear", "Happy", "Sad", "Suprise", "Neutral"]
def traitement(a,b,c): #For testing
pass
# arr = strToArray(b)
# print(a)
# plt.imshow(arr)
# plt.show()
# pass
def strToArray(string): #Fer2013 provides images as string so it needs to be transformed def strToArray(string): #Fer2013 provides images as string so it needs to be transformed
A = [] A = []
lenght = len(string) lenght = len(string)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment