Mlops Task-4
Face Recognition using Transfer Learning
Task description.
Create a project using transfer learning solving various problems like Face Recognition, Image Classification, using existing Deep Learning models like VGG16, VGG19, ResNet, etc.
So lets get started, firstly we need to setup our environment. Some of the required library to run our code. I have listed below
- opencv-python
- numpy
- keras
- tensorflow
- pillow
Lets collect our data for training and testing our model
I have used simple code of opencv library to collect the data, This program will click my 100's of images in sec and save into the specified directory.
Once we have collect the dataset, Lets move to train our model. I'm using hear MobileNet for Face Recognition
we gonna Freeze all layers here, because Layers are set to trainable as True by default
Let's make a function that returns our FC Head
Let's add our FC Head back onto MobileNet
Now lets Load our Face Recognition Dataset
Now we gonna train our model with the collected datatset
Once the model is trained, It will be saved in the specified directory. We will now load our model and then use it for testing.
Now lets test our model on some test images
Here's the output
Ping me if u find any error, we can solve together. You can get the code from the GitHub link provided below.
Thanks for reading.