This article will demostrate how to create a simple facial expression detection using transfer learning. In this we will use VGG16 as a pretrained model, on the top of this model we will Create our Facial expression detector.
And also we will use google colab for training the model.
- tensorflow 2.x
- Keras
- Pillow
-
1- First upload the dataset on your google drive, Create a new colab file and mount your google drive to your google colab workspace.
-
Now copy the dataset to your workspace
!cp -r "/content/drive/My Drive/facial Recoge Dataset" .
Now setup is complete
Import all the libraries first and download vgg16 model
setup enviormental variable and change model output layer and create a new model
Freeze all the layer except the last output layer
Import all the the dataset from directory and use augmatation on the images
Compile the model and train it