Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.
/ face-recognition Public archive

EE5907/EE5027 Pattern Recognition Programming Assignment CA2

License

Notifications You must be signed in to change notification settings

SS47816/face-recognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

face-recognition

EE5907/EE5027 Pattern Recognition Programming Assignment CA2

SS47816

Pre-requisites

The packages I used here are very simple:

  • python >= 3.6
  • scipy
  • numpy
  • sklearn
  • opencv
  • troch
  • torchvision
  • matplotlib
  • pathlib

Installation

I am using conda environment so you can directly install the environment from file:

conda create --name pr --file requirements.txt

or

pip install -r requirements.txt

Usage

All the training data are stored in data/

CNN model .pth files are stored in model/

Resulted Figures are saved in pics/

TensorBoard logs are saved in runs/

Source codes are all stored in src/

  • cnn.py: run this file to train and test the CNN models
  • conventional.py: run this file to test all the conventional methods
  • create_dataset.py: helper functions to split the train/test datasets (you probably won't need this)

To run the code:

# Aactivate the conda environment you just created
conda activate pr

# Run the first 4 algorithms
python3 src/conventional.py

# Run the CNN model (training and testing)
python3 src/cnn.py

Results

Q1. PCA for Feature Extraction, Visualization and Classification

Q1 Q1 Q1 Q1

Q2. LDA for Feature Extraction and Classification

Q2 Q2

Q3. GMM for Clustering

Q3 Q3

Q4. SVN for Classification

Q4

Q5. Neural Networks for Classification

Q5 Q5 Q5

About

EE5907/EE5027 Pattern Recognition Programming Assignment CA2

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages