GithubHelp home page GithubHelp logo

mohamedhassan279 / face-recognition Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mostafagalal1/face-recognition

0.0 0.0 0.0 835 KB

Face Recognition Using several dimensionality reduction techniques along with KNN as a classification algorithm

Jupyter Notebook 100.00%
dimensionality-reduction face-recognition knn-classification linear-discriminant-analysis machine-learning principal-component-analysis quadratic-discriminant-analysis

face-recognition's Introduction

Face Recognition Assignment Readme

This repository contains the implementation of a face recognition assignment as part of a university course. The assignment involves using Principal Component Analysis (PCA) and Linear Discriminant Analysis (LDA) for classification on the ORL dataset, as well as exploring various aspects of classifier tuning and comparing results with non-face images.

Dataset

The ORL dataset, consisting of grayscale images of size 92x112, with 10 images per each of the 40 subjects, is utilized for this assignment. You can download the dataset from Kaggle.

Steps Implemented

  1. Generate Data Matrix and Label Vector

    • Convert images into vectors and stack them into a data matrix D. Generate the label vector y corresponding to subject IDs.
  2. Split Dataset into Training and Test Sets

    • Keep odd rows for training and even rows for testing, resulting in 5 instances per person for both training and testing.
  3. Classification using PCA

    • Compute the projection matrix U for different values of alpha.
    • Project the training and test sets using U.
    • Utilize the nearest neighbor classifier and report accuracy for each alpha.
    • Investigate the relation between alpha and classification accuracy.
  4. Classification using LDA

    • Modify LDA pseudocode for multiclass LDA.
    • Project training and test sets using the projection matrix U.
    • Utilize nearest neighbor classifier and report accuracy for multiclass LDA.
    • Compare results with PCA.
  5. Classifier Tuning

    • Explore different number of neighbors (K) for K-NN classifier.
    • Plot accuracy against K for both PCA and LDA.
  6. Comparison with Non-Face Images

    • Attempt classification of faces vs. non-faces using non-face images of the same size.
    • Analyze success and failure cases.
    • Determine the number of dominant eigenvectors for LDA.
    • Plot accuracy vs. number of non-face images.
    • Critique accuracy measure for large numbers of non-face images in the training data.
  7. Bonus

    • Implement different training and test splits, comparing results with the original split.
    • Utilize variations of PCA and LDA algorithms (QDA), comparing time complexity and accuracy.

Contributors

Report

The detailed report for this assignment can be found here.

For any inquiries or suggestions, feel free to contact us through GitHub.

face-recognition's People

Contributors

mostafagalal1 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.