GithubHelp home page GithubHelp logo

devashishjoshi / face_recognition Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vinayakarannil/face_recognition

0.0 2.0 0.0 3.69 MB

A light weight face recognition implementation using a pre-trained facenet model

Python 93.94% MATLAB 5.77% HTML 0.30%

face_recognition's Introduction

Face Recognition

A light weight face recognition implementation using a pre-trained facenet model. Most of the code is taken from David Sandberg's facenet repository.

Steps to follow:

  1. Create a dataset of faces for each person and arrange them in below order
root folder  
│
└───Person 1
│   │───IMG1
│   │───IMG2
│   │   ....
└───Person 2
|   │───IMG1
|   │───IMG2
|   |   ....
  1. Align the faces using MTCNN or dllib. Please use the scripts available in lib/src/align. For this project i aligned faces using MTCNN.(Please have a look at aligning faces if you need any clarifications)

[Before alignment] [After alignment]

  1. Download pre-trained-weight ,extract and keep it in lib/src/ckpt folder (for detailed info about availabe weights: available-weights)
  2. Create face embeddings using pre-trained facenet model. Run the below scripts by changing the folder paths.(edit paths in lines)
  python lib/src/create_face_embeddings.py 

Once you run the script succesfully, a pickle file with name face_embeddings.pickle will be generated inside lib/src folder

  1. Start the server by running the command
  python server/rest-server.py

access the UI using url https://127.0.0.1:5000. It will show a button with face recognition as label. Once you click on it, automatically your primary camera will get turned on and start recognizing the faces.

sample result

alt text

for more information, please go through my blog

NOTE: The faces are identified using retrievel method, instead if you have enough data, you can train a classifier on top of face embeddings (Train-a-classifier-on-own-images)

References:

face_recognition's People

Contributors

vinayakarannil avatar timombre avatar

Watchers

James Cloos avatar paper2code - bot 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.