Code Monkey home page Code Monkey logo

transfer-learning-face-recognition-using-vgg-16's Introduction

Blog Transfer-Learning-Face-Recognition-using-VGG-16

This repository shows how we can use transfer learning in keras with the example of training a face recognition model using VGG-16 pre-trained weights.The example shown here is based on Refik Can Malli keras-vggface: https://github.com/rcmalli/keras-vggface. The vggface is the famous VGG-16 CNN trained on 2.6 million images of 2,622 different identities. the paper Deep Face Recognition describes it well : http://www.robots.ox.ac.uk/~vgg/publications/2015/Parkhi15/parkhi15.pdf

vgg face descriptor: http://www.robots.ox.ac.uk/~vgg/software/vgg_face/

vggface data : http://www.robots.ox.ac.uk/~vgg/data/vgg_face/

Transfer learning refers to the technique of using knowledge of one domain to another domain.i.e. a NN model trained on one dataset can be used for other dataset by fine-tuning the former network.

Definition : Given a source domain Ds and a learning task Ts, a target domain Dt and learning task Tt, transfer learning aims to help improve the learning of the the target predictive function Ft(.) in Dt using the knowledge in Ds and Ts, where Ds โ‰  Dt, or Ts โ‰  Tt.

A good explanation of how to use transfer learning practically is explained in http://cs231n.github.io/transfer-learning/

The vggface model weights is loaded as such without including the last layers by calling

VGGFace(include_top=False, weights='vggface',input_tensor=None) 

from keras-vggface : https://github.com/rcmalli/keras-vggface.

only the last three dense layers are fine tuned as per our requirement. All the layers of the vggface network are made non-trainable except the last three layers by using

layer_count = 0
for layer in custom_vgg_model.layers:
	layer_count = layer_count+1
for l in range(layer_count-3):
	custom_vgg_model.layers[l].trainable=False

transfer-learning-face-recognition-using-vgg-16's People

Contributors

anujshah1003 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.