FaceML
- 5 Devlogs
- 16 Total hours
Expression facial recognition using ML
Expression facial recognition using ML
I have just officially redid the model with EfficientNetB0 and EfficientNetB2 however those were not enough to make it incredibly accurate prediction of your facial expression, I try to keep the whole model as light weight as I possibly can, however because of it the prediction accuracy cannot get above a 68% for now, I will improve on it in future iteration, especially right now the emotion it can detect best are Happy, Sad, Anger and neutral everything else seems to get overshadowed. I will now be moving on to the more aesthetic part of the website and be implementing things like animated website background and interactive stuff. I have just finished the animated space mouse that took me like an hour to draw and another hour to actually implement the animation inside of javascript
In this iteration I worked on multiple things, first I finally finished my ML model (sort of) the accuracy is again not very high unfortunately however, what I can really do is bring this further later. For now I have just start integrating the camera where I have the basic web setup of purely headers and like buttons to activate my camera with, I have also added basic face detection from javascript which I just used the library for because I cannot be asked to make another detection software which would a project in of itself, I have also added basic green line for debug to check where your face are because my model need only the precise picture of your face and not just random part of your body, and yes that is my face, please don’t dox me.
. Next iteration I will be finishing the main bit for actually outputting the prediction of the model
In this iteration I have worked on multiple models of the CNN by first just training it with the basic layer with no global average pooling and no augmentation of data to allow me to see which model is the best for this data set, I got a validation accuracy of around 53.13% however its not really good as I really want it to get as high as 65% as according to the thesis paper research done on the FER2013 dataset for facial expression people have reached up to 72% accuracy with a refined and tuned model
Afterward I tried out Augmented data without global average pooling which got 55% and improved one which uses everything and got 57% which is fair enough
Next step will probably be trying out class weight
I have now finished writing my CNN and now using my training data that I have finally finish organising to begin to train the network to identify the expression based on the face, I am right now using a very basic linear convolutional neural network to train it based on filters and kernel, right now I have 3 different Conv layers and in total 12 layers including the input layer with over 683000 parameters which is quite nice, this should provide me with enough complexity to actually get this working. Now I will be working towards just feeding my organised FER-2013 training data into the neural network and using keras will hopefully avoid the stupid amount of maths I need to do for like the layers e.g. gradient descent and backpropagation. 
In my first like 2 hours of this project I have actually done quite a few things:
Imported Tensorflow
Downloaded WSL2 for tensorflow gpu acceleration to allow training for the project later on
Downloaded and imported all my files for the training data necessary for the image recognition of expression and being able to identify based on the expression which I made into a list
Now making the loading of the dataset into the main program and preparing the training data of the Machine learning program by using matplotlib and make it into a set size for the CNN stuff which should hopefully allow better spatial relations between the pixels for this algorithm to work which is pretty cool
Anyways enough yap and I am gonna continue 