Coder Social home page Coder Social logo

face-recognition's Introduction

Face-Recognition

An attempt at building a face recognition program with the help of OpenCV.

To be honest the heavy lifting has been done by OpenCV itself and in this project I have only utilised the tools already available to build something useful

3 STEP PROCESS

  • CREATE DATA
  • TRAIN MODEL
  • RECOGNITION

STEP 1 : CREATING THE DATASET

First of all we need to create labelled dataset so that the model can refer to it for labelling new faces it encounters; this is handled by the create_data script

  • just run the script and user will be prompted to provide a name (a unique label to classify the observed face as!)
  • upon entry of a unique name for the face a preview screen will pop up display the camera view with the face enclosed in a box.
  • at this poiint the script is recording images of the face detected, stop after sometime (20 seconds of waiting is more than enough)
  • in the end simply close the script.

At the end of this step you will find that images of your face have been captured and saved in the ./dataset/ directory

STEP 2 : TRAINING MODEL AND GENERATING THE FEATURE SET

Now that we have sufficient data about ( prefferably multiple ) individual faces we go ahead to train our model so that the distinguishing features of the faces can be extracted.

  • in this step we simply run the train_model.py script, which in the end generates a pickle dump (consider pickle as a format to store data)

  • simply run the script and you will find the images being analysed and data stored in ./encodings/encoding.pickle (all the faces are stored in the same pickle file)

STEP 3 : TESTING YOUR MODEL

Since the model has trained itself and now knows about the facial data of some individuals. You can try to test it's capability by running the recognition.py script

  • the user will get a preview of the camera view with the faces detected being in a box with on top

resource utilised:

-> OpenCV ( https://github.com/opencv/opencv )
-> Face_Recognition ( https://github.com/ageitgey/face_recognition )

face-recognition's People

Contributors

nikhil-k-singh avatar

Watchers

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