GithubHelp home page GithubHelp logo

informaticacba / face-detection-and-recognition Goto Github PK

View Code? Open in Web Editor NEW

This project forked from linusmossberg/face-detection-and-recognition

1.0 0.0 0.0 260.38 MB

Face detection and recognition using Fisherfaces and Eigenfaces.

License: MIT License

MATLAB 100.00%

face-detection-and-recognition's Introduction

Face Detection and Recognition

Face detection and recognition program developed in Matlab for the course Advanced Image Processing (TNM034) at Linköpings Universitet. Both Eigenfaces and Fisherfaces recognition models are implemented. The program uses the Caltech Faces 1999 dataset which contains 450 images of 27 people with various facial expressions, taken in different environments and under various lighting conditions.

The models are trained with 72 images of 16 people that have been assigned different ID-numbers. The remaining people are unknown, and the program should recognize them as such and return an ID of 0. The number of training images is limited to 72 to leave a sufficient amount of images to test the program with. The test images have never been seen by the program prior to testing and no weight information about them are stored.

Accuracy

Of the remaining 378 images that the program hasn't seen before, the program is able to correctly detect and recognize 98.68% of the faces using the fisherfaces model, either with the ID corresponding to the person or 0 if the person is unknown. This could be increased to about 99.2% with more training images, but no more since the detection fails in three extremely underexposed images. The eigenfaces model only correctly recognizes 91.53% of the faces, despite using more principal components than the fisherfaces model.

Model Accuracy FRR FAR
Fisherfaces 98.68% 1.32% 0.00%
Eigenfaces 91.53% 7.67% 0.79%

The training images are not included in these numbers as these are guaranteed to be recognized correctly. False rejection rate (FRR) refers occurrences where the program doesn't recognize a known face, while false acceptance rate (FAR) refers to occurrences where the program thinks that it recognizes face that in reality is either unknown or belongs to a different known person. Both of the models have distance thresholds set to optimally reduce the sum of false acceptance and rejection rates.

Usage

To use the program, set the MATLAB working directory to the source directory and run:

[id, distance] = tnm034(image, type);

The image input argument is the image of the face that should be recognized, which can be either an RGB-image or an image-number from the database (1 to 450). The type input argument specifies which recognition method to use and can be either 'fisher' or 'eigen'.

The id output argument is the id-number of the person recognized in the input image (defined in getId.m), and distance is the face-space distance between the face in the input image and the matched face in the training database.

Report

A report describing this work in more detail is available here. It was written in a short time and the structure and formulations are often lacking because of it, but it may still be informative. Much of the code contains more implementation-specific commented explanations.

Requirements

The following products are required to run the program:

Name Version
Matlab R2019b (9.7)
Image Processing Toolbox 11.0
Statistics and Machine Learning Toolbox 11.6

Visualizations

The following are a few visualizations of parts of the detection and recognition pipeline created for the report.


Skin Model


Evaluation and Otsu Thresholding


Face Mask Detection


Face Triangle Detection and Normalization


Recognition Model

face-detection-and-recognition's People

Contributors

linusmossberg avatar

Stargazers

 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.