This repository contains code that loads in the CELEBA dataset and trains a deep learning model to match the similar faces to a high accuracy. Furthermore after training the best model is validated.
There is a main.py file that performs the key steps in this project. To run that file create a local clone of the repository and follow the instructions below.
Prior to running the main script you will need to install the dependencies. The preferred python version is 3.12.
This project supports uv package manager and is recommeneded due to its fast package installation. However instructions for pip are provided.
- Ensure
uvis installed via the provided link e.g., to install on linux/macos run:curl -LsSf https://astral.sh/uv/install.sh | sh - To install deps run:
uv sync --locked
- Create a virtual env.
e.g., using conda run:
conda create -n env_name python=3.12 - Activate environment and install deps:
pip install .
NB: By default CPU version of pytorch will be installed, for GPU specific version install manually:
https://pytorch.org/get-started/locally/
Next to download and process the CELEBA dataset simply run the build script via this command:
python -m tools.build_celeba_dataset --out-dir dataset/celeba
NB: This may take a couple of minutes.