Face Recognition using Transfer learning on a pre-trained model(VGG16)
Problem Statement:-Create a project using transfer learning solving various problems like Face Recognition, Image Classification, using existing Deep Learning models like VGG16, VGG19, ResNet, etc.
What is Transfer Learning?
Transfer learning is a machine learning method where a model developed for a task is reused as the starting point for a model on a second task.
It is a popular approach in deep learning where pre-trained models are used as the starting point on computer vision and natural language processing tasks given the vast compute and time resources required to develop neural network models on these problems and from the huge jumps in skill that they provide on related problems.
Perhaps three of the more popular models are as follows:
- VGG (e.g. VGG16 or VGG19).
- GoogLeNet (e.g. InceptionV3).
- Residual Network (e.g. ResNet50).
What is VGG16?
VGG16 is a convolutional neural network model .The model achieves 92.7% top-5 test accuracy in ImageNet, which is a dataset of over 14 million images belonging to 1000 classes. It was one of the famous model submitted to ILSVRC-2014. It makes the improvement over AlexNet by replacing large kernel-sized filters (11 and 5 in the first and second convolutional layer, respectively) with multiple 3×3 kernel-sized filters one after another.
In this model we have 16 layers in the model.
- 13 convolve layers
- 3 dense layers
VGG architecture:
Now let us start with the detailed task:
Pre-requisites :
- Keras
- Tensorflow
- Pillow
- numpy
- pandas
- Jupyter notebook and Python.
Then we need to do the following Steps
- Create a Workspace(in my case "MLOPSTASK4" for the project.
- Create a Folder called “Dataset” inside which create 2sub-folders as “Train” and “Test”. Inside both of these Folders create a sub-folder with the name of the person whose face is to be recognized, this would store images of the particular person.
Step 1: Preparation of dataset.
First we take 100 images from the required person and split it to 2 sets Train and Test. Train set consists of 80 images while Test set contains 20 images(We need to segregate manually)
Step 2: Model Creation.
- Here we are doing only two epochs as the data set is very small and the model is being trained with only 2 separate faces.
- Model after training is giving the accuracy of 100% it is only because the all the training images are taken at the same time and it is trained with 2 different faces(Small dataset).
Step 3: Testing Model
THANK YOU!!
🔗GitHub link🔗 --> https://github.com/Mayukhborana/task4mlopsfacerecg.git
Well done!👍