Giter VIP home page Giter VIP logo

facerecognition-1's Introduction

FaceRecognition

Machine Learning project to recognise people from an Image just like facebook.

Built with the help of dlib's state-of-the-art face recognition built with deep learning. The model has an accuracy of 99.38% on the Labeled Faces in the Wild benchmark.

Dependencies:

  • Python 3.x

  • Numpy

  • Scipy

  • Scikit-learn

  • dlib

    Tip: Installing dlib can be a tedious job. On macOS or Linux you may follow this link.

  • Extras:

    • OpenCV (required only in webcam.py for capturing frames from the webcam)

    • For using ./demo-python-files/projecting_faces.py you will need to install Openface.

      To install Openface, follow the below instructions:

          $ git clone https://github.com/cmusatyalab/openface.git
          $ cd openface
          $ pip install -r requirements.txt
          $ sudo python setup.py install

Result:

Procedure:

Training:

  • Make folder training-images.

  • Add images of each person you want to recognise to a folder by their name in training-images.

    Example

    $ mkdir training-images
    $ cd training-images
    $ mkdir Name_Of_Person

    Then copy all the images of that person in ./training-images/Name_Of_Person folder.

  • Run on cmd python create_encodings.py to get the encodings of the images and the labels. This will create encoded-images-data.csv and labels.pkl files.

    Note: There has to be only one face per image otherwise encoding will be for the first face found in the image.

  • Run on cmd python train.py to train and save the face recognition classifier. This will create classifier.pkl file. It will also create classifier.pkl.bak backup file if the classifier with that name already exists.

Prediction:

  • Make folder test-images which contains all the images you want to find people in.

  • Run on cmd python predict.py to predict the faces in each image.

Vote of Thanks

  • Thanks to Adam Geitgey whose blog inspired me to make this project.
  • Thanks to Davis King for creating dlib and for providing the trained facial feature detection and face encoding models used in this project.

facerecognition-1's People

Contributors

anubhavshrimal avatar

Watchers

James Cloos avatar Sayantan Mukherjee 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.