GithubHelp home page GithubHelp logo

facialrecognition's Introduction

FacialRecognition

Facial Recognition in Python using OpenCV

OpenCV

OpenCV is the most popular library for computer vision. Originally written in C/C++, it now provides bindings for Python.

OpenCV uses machine learning algorithms to search for faces within a picture. For something as complicated as a face, there isn’t one simple test that will tell you if it found a face or not. Instead, there are thousands of small patterns/features that must be matched. The algorithms break the task of identifying the face into thousands of smaller, bite-sized tasks, each of which is easy to solve. These tasks are also called classifiers.

Dependencies

  1. OpenCV
  2. NumPy
  3. Glob
  4. Pillow
  5. OS

Execution of the Code

The code is mainly divided into three parts: i) Dataset Creator ii) Training iii) Detecting

The above three parts are implemented using three functions: i)dataset_creator() ii)trainer() iii)detector()

  1. Execute the FacialRecgn.py
  2. The user can choose whether to create the dataset or run the detector. Create a dataset if you don't have a dataset yet.
  3. The dataset can be created using a batch of images or with a webcam. Choose the option you prefer. i) Every time while adding a dataset for a new face, append the person's name in the list idlist. ii) The batch of photos to create a dataset should be placed in a folder with the person's name(in all lower case) as the folder name and this folder is in turn placed in the Data folder. iii) Increment the user ID by one eveytime you add a new face's dataset
  4. After the dataset is created, the trainer is run and the trainingdata.yml file is created in the folder trainer.
  5. Run the detector. The detection can also be done on webcams or on images. The folder TestImages has some test images to run detection on.

facialrecognition's People

Contributors

pranjalnaman avatar

Stargazers

Anjali Jain 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.