Skip to content

johanneskeim/FaceRecognition_ML_TUMLab

 
 

Repository files navigation

Application Challenges MachineLearning TUM

Johannes Keim, Johannes H.,Dushyant D., Katarina G.

Setup

  • Create conda environment and install dependencies from environment.yml file: conda env create -f environment.yml
  • For the web-app, navigate to cd web-app and install dependencies with npm install

Adding dependencies

Training

To start a training run from the project root: python -m training.train

Note: Please commit any changes before starting, so that W&B can associate the correct repository state with the run.

Evaluation

To calculate evaluation scores run from the project root: python -m classifier.faiss_evaluate.

The evaluation depends on the dataset, a pre-computed FAISS index and a model checkpoint. Please check in the script if paths are set accordingly.

Prerequisites

Evaluation depends on a pre-calculated FAISS index, which in turn requires a set of pre-computed embeddings for it's creation.

  • To calculate embeddings from the dataset run python -m classifier.pre_compute_embeddings
  • To pre-compute the index see python classifier/faiss_create.py

Application

Starting the API Backend

From project root run: python -m api.main

Starting the Web-App

Navigate to web-app folder: cd web-app

With node and npm installed, start locally: npm run dev

For more information have a look at the readme.

Folder Structure

  • api: FastAPI backend service
  • checkpoints: Put model state checkpoints from W&B here
  • classifier: FAISS and L2 classifiers and scripts to pre-calculate embeddings, to create FAISS index, and for evaluation
  • data: Batch sampler, two face alignment variants, dataset, dataloader and script to create pre-aligned dataset.
  • datasets: The dataset folders, and pre-computed embeddings and FAISS indices go here.
  • faiss_pcc: FAISS python library compiled for IBM PPC,
  • models: PyTorch implementation of inception resnet V1
  • training: training script, depending on triplet generation and triplet loss function.
  • utils: Utils for visualization and embedding handling
  • web-app: Svelte app as interface for face recognition system and embeddings visualization

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.9%
  • Other 2.1%