Face Recognition Using Transfer Learning (VGG16)
Transfer Learning

Face Recognition Using Transfer Learning (VGG16)

Face Recognition is a method to identify the identity of an individual using their face. It is capable of identifying a person from a digital image source or a video frame from a video source.It can be used as an attendance system, can be used to verify a customer’s identity, can be used at airports, police stations and many more.

Transfer learning make use of the knowledge gained while solving one problem and applying it to a different but related problem.

For example, knowledge gained while learning to recognize cars can be used to some extent to recognize trucks.

Pre-Training

When we train the network on a large dataset(for example: ImageNet) , we train all the parameters of the neural network and therefore the model is learned. It may take hours on your GPU.

Fine tuning

We can give the new dataset to fine tune the pre-trained CNN. Consider that the new dataset is almost similar to the orginal dataset used for pre-training. Since the new dataset is similar, the same weights can be used for extracting the features from the new dataset.

  1. If the new dataset is very small, it’s better to train only the final layers of the network to avoid overfitting, keeping all other layers fixed. So remove the final layers of the pre-trained network. Add new layers . Retrain only the new layers.

If the new dataset is very much large, retrain the whole network with initial weights from the pretrained model.

For this task I have used the dataset from kaggle , you can find it here

Original dataset is of 14 celebrities but I choose only 2 to work on . Those are arnold schwarzenegger and sofia vergara .

Let us focus on program now

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

As we have two catogories to classify from dataset, hence we have ro use two as num_classes .

No alt text provided for this image

As the dataset we got from kaggle is not sufficient for training model so we have to generate the data for training and validation also .

No alt text provided for this image

Now just we need to train the model and save it .

No alt text provided for this image
No alt text provided for this image

Now Prediction using the model .

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

Finally done , any suggestions are always welcome.

Thank you .


Aaditya Joshi

Software Engineer - Cloud Engineer at CRISIL Limited

4 å¹´

Nice Job dude ????

Salik Sayyed

SE @TCS Digital | AWS Cloud & DevOps Engineer | Also skilled in NodeJS / MERN Full Stack and Python automation

4 å¹´

Rocking performance Shyam

Atharva Patil

SWE@Cadence | Spring Boot | Java | DSA | K8s | OpenSource | Microservices

4 å¹´

Great work shyam sulbhewar

要查看或添加评论,请登录

Shyam Sulbhewar的更多文章

  • Website Deployment Using Jenkins via Job Creation Using Groovy code

    Website Deployment Using Jenkins via Job Creation Using Groovy code

    Jenkins is an incredibly powerful tool for DevOps that allows us to execute clean and consistent builds and deployments…

    6 条评论
  • Metrics Collection and Monitoring Using Prometheus and Grafana

    Metrics Collection and Monitoring Using Prometheus and Grafana

    What is Metrics ? Metrics represent the raw measurements of resource usage or behavior that can be observed and…

    8 条评论
  • CI/CD PIPELINE

    CI/CD PIPELINE

    The CI/CD pipeline is one of the best practices for devops teams to implement, for delivering code changes more…

    10 条评论
  • Launching Website on top of KUBERNETES

    Launching Website on top of KUBERNETES

    What is Kubernetes ? Kubernetes is a portable, extensible, open-source platform for managing containerized workloads…

    2 条评论
  • Launching A Secure Wordpress site

    Launching A Secure Wordpress site

    Task Description : Write an Infrastructure as code using Terraform, which automatically creates a VPC. In that VPC we…

    9 条评论
  • Launching Website Using AWS with EFS using Terraform

    Launching Website Using AWS with EFS using Terraform

    What is AWS ? Amazon web service is a platform that offers flexible, reliable, scalable, easy-to-use and cost-effective…

    8 条评论
  • Amazon EKS

    Amazon EKS

    Cloud computing is an internet-based computing service in which large groups of remote servers are networked to allow…

    6 条评论
  • MLOPS & DEVOPS TASK2

    MLOPS & DEVOPS TASK2

    1. Create container image that’s has Jenkins installed using dockerfile 2.

    4 条评论
  • MLOPS & DEVOPS Task1

    MLOPS & DEVOPS Task1

    Integration of git , github ,jenkins ,docker . Task Description : JOB#1 If Developer push to master branch then Jenkins…

    2 条评论
  • Integrating aws with Terraform

    Integrating aws with Terraform

    Task 1 : How to create/launch Application using Terraform on the top of aws. 1.

社区洞察

其他会员也浏览了