amineHorseman / facial-expression-recognition-svm

Training SVM classifier to recognize people expressions (emotions) on Fer2013 dataset
GNU General Public License v3.0
163 stars 62 forks source link

Face Landmarks usage #4

Open NomiMalik0207 opened 5 years ago

NomiMalik0207 commented 5 years ago

I want to know about how you ae feeding your network with landmarks? are you appending landmarks on image or just using as a label?

amineHorseman commented 5 years ago

Yes I append the landmarks with the hog features and the flatten image, then I feed everything to the SVM. Since it's supervised learning, the SVM expects also the labels so that it learn to classify each data to the correct label. But the labels are not appended with the data

NomiMalik0207 commented 5 years ago

But from you model Picture it seems you are feeding your model only with image, and sending landmarks as a different layer, Can you explain a little bit more about feeding landmarks? Thank you for your time

amineHorseman commented 5 years ago

In this svm version I concatenate the two, but in the other repository using cnn indeed I feed the images alones in a 2d convolutional layer, and I feed the landmarks (pixels positions) in another layer. In some cases I don't feed the landmarks alone, but I append the hog features, thoses were just tests I was trying to see how feeding an image alone, and feeding additional data which are not raw pixels can affect the training

NomiMalik0207 commented 5 years ago

Got it. But i have tried a CNN model, and including landmarks did not effect the accuracy.. :(

amineHorseman commented 5 years ago

What was the model you used?

NomiMalik0207 commented 5 years ago

VGG

amineHorseman commented 5 years ago

I have a hypothesis but not sure: may be the landmarks are useful only on small architecture, like the 5-layers model I used, but in the case of bigger models having dozen of layers the parameters space is huge and the network can optimize the solution better, without the need of extra features such as landmarks of HOG In other words, in bigger CNN models, the landmarks provided may be just redundant information