This project involves the usage of flask to serve the UI and the insightface library in order to recognize faces and calculate similarity. Additionally it incorporates the usage of a family classifier to calculate the probability for two provided faces to be of relatives.
Before you begin, ensure you have the following installed:
Python 3.x , 3.10-3.12 recommended
Pip (Python package installer)
Virtualenv (optional but recommended)
you may need additional dependencies such as:
First, you'll need to install some Prerequisites
pip install gdown gitpython
Run as administrator if using powershell on windows you can use the script in here to automatically clone both frontend and server repositories, setup all requirements with virtual enviornments and download the onnx models
git clone https://github.com/ofekhta1/Face-Server.git
cd Face-Server
Setting up a virtual environment is recommended to keep your dependencies isolated.
# Create a virtual environment
python3 -m venv venv
# Activate the virtual environment
# On Windows, use: venv\Scripts\activate
# On macOS and Linux, use: source venv/bin/activate
pip install -r requirements.txt
# Set the FLASK_APP environment variable
# On Windows, use: set FLASK_APP=app.py
# On macOS and Linux, use: export FLASK_APP=app.py
# Enable debug mode (optional, recommended for development)
# On Windows, use: set FLASK_ENV=development
# On macOS and Linux, use: export FLASK_ENV=development
python3 app.py
Visit http://localhost:5057
in your web browser to access the application.
Coming soon!