Giter Club home page Giter Club logo

face_recognition's Introduction

Description - Face_Recognition

Face Detection and Recognition on some famous personalities

1. Dataset acquisition

  • Train Data

    Collected a set of 60 images of famous celebrities of India (namely Deepika Padukone, Ayushmaan Khurrana, Kriti Sannon, Sushant Singh Rajput, Narendra Modi, Carryminati) for the training set.

  • Validation Data

    Collected 18 images of the same celebrities for the validation set.

2. Detection of Faces

Using dlib cnn face detector to find the faces in image, crop and store them in separate folders sorted according to individual person. Download 'mmod_human_face_detector' to use as 'dlib cnn face detector'

! wget http://dlib.net/files/mmod_human_face_detector.dat.bz2 
! bzip2 -dk mmod_human_face_detector.dat.bz2

The directory structure looks like this:

Directory structure :
|Images /
|  |-- (60 images)
|Images_crop /
|  |--ayushmaan/
|     |--(10 images)
|  |--carry/ 
|     |--(10 images)
|  |--deep/ 
|         |--(10 imgaes)
|  |-- sush/ (10 images)
|  |--kriti / (10 images) 
|  |--modi / (10 images)
|Images_test / 
|  |-- .. / (18 images)
|Images_test_crop / 
|  |--ayushmaan / (3 images)
|  |--carry / (3 images)
|  |--deep / (3 imgaes)
|  |--kriti / (3 images)
|  |--modi / (3 images)
|  |--sush / (3 images) 
|Upload_your_images /
|  |--Here you can put your own images to test the model
|Your_predictions /
|  |--The result
|Face_Recognition.ipynb
|mmod_human_face_detector.dat

3. Download the model weights

As vgg-face weights are not available as .h5 file to download,from this article

Download Vgg-face weights from google drive with ! gdown https://drive.google.com/uc?id=1CPSeum3HpopfomUEK1gybeuIVoeJT_Eo Define vgg-face model architecture in tensorflow-keras and load weights.

4. Train Softmax regressor for 6 person classification from embeddings.

Prepare train data and test data from the embeddings and feed into a simple softmax regressor with 3 layers containing first layer with 100 units and tanh activation function , second layer with 10 units and tanh activation function and third layer with 6 units for each person with softmax activation.

  • Predictions For an image(may contain multiple faces) extract each face,get embeddings,get prediction from classifier network,make bounding box around face and write person name.

5. Sample Images of Face Recognised Images

sush_1 modi_2 deep_1 ayushmaan_2 deepika DwnavjPUYAAqEh2 when_sushant_singh_rajput_revealed_similarities_between_him_kriti_sanon_to_be_the_reason_of_their_friendship

Good to go with your model. โœ”โœŒ

face_recognition's People

Contributors

ankita18mandal avatar

Watchers

 avatar

face_recognition's Issues

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.