Giter VIP home page Giter VIP logo

real-time3.6's Introduction

RealTimeFacialRecognition

Built with Python 2.7, OpenCV2, Numpy, Scipy, scikit-learn, matplotlib.

  • note: this application currently only works on Mac because of forward slash in path is incompatible with windows

Summary

Real time facial tracking and recognition using harrcascade and SVM(Radial Basis Function Kernal). Designed SVM classification model using cross-validation and exhaustively grid search, implemented using scikit in python, and trained on Extended Yale Database B. Achieved facial Tracking in OpenCV and optimized Haarcascade to detect up to 45 degrees head tilting. To build the model, 2452 samples from 38 people in the database are splitted into training and testing sets by a ratio of 3:1. The top 150 eigenfaces are extracted from 1839 training faces in the database using Principal Component Analysis (PCA). The principal components are then feeded into the C-SVM Classification model and trained with various kernel tricks. At the end of the recognition task, an accuracy of 93.3% is obtained with the Radial Basis Function (RBF) kernel on the testing set of 613 samples.

The dataset used is the Extended Yale Face Database B Cropped

http://vision.ucsd.edu/~leekc/ExtYaleDatabase/ExtYaleB.html

Requirements

Use as local command-line utility

$ git clone https://github.com/AlexOuyang/RealTimeFaceRecognition.git

Training For Face Recognition

Training for face recognition using the command below. face_profile_name is the name of the user face profile directory that you want to create in the default ../face_profiles/ folder for storing user face images and training the SVM classification model:

python train.py [face_profile_name=<the name of the profile folder in database>]

Example to create a face profile named David:

python train.py David

Usage during run time:

press and hold 'p' to take pictures of you continuously once a cropped face is detected from a 
pop up window. All images are saved under ../face_profiles/face_profile_name

press 'q' or 'ESC' to quit the application

Running Face Recognition In Real Time

Running the program in real time to recognize faces:

python main.py

Or running with options (By default, scale_multiplier = 4):

python main.py [scale_multiplier=<full screensize divided by scale_multiplier>]

Say you want to run with 1/2 of the full sreen size, specify that scale_multiplier = 4:

python main.py 4

Top 12 Eigenfaces generated from the Extended Yale Database B

alt text

Top 12 Predictions

alt text

Prediction of User Face

alt text

Auther: Alex Chenxing Ouyang [email protected]

real-time3.6's People

Contributors

liuhuawei0719 avatar

Watchers

 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.