-
Create a new conda environment:
conda create -n face_recognition python=3.9
-
Activate the environment:
conda activate face_recognition
-
Install the required packages:
pip install -r requirements.txt
-
Test Detection
pytest --capture=no tests/test_detect_image.py
-
Test Tracking
pytest --capture=no tests/test_tracking.py
-
Test Recognition
pytest --capture=no tests/test_recognize_image.py
-
Create a Folder for Each Person
- Create a folder with the folder name being the name of the person:
datasets/ ├── backup ├── data ├── face_features └── new_persons ├── name-person1 └── name-person2
- Create a folder with the folder name being the name of the person:
-
Add the Person's Photos to the Folder
- Add the person's photo in the corresponding folder:
datasets/ ├── backup ├── data ├── face_features └── new_persons ├── name-person1 │ └── image1.jpg │ └── image2.jpg └── name-person2 └── image1.jpg └── image2.jpg
- Add the person's photo in the corresponding folder:
-
Run Triton Server, Redis, and Qdrant
docker compose up
-
Train New Persons
python train.py
-
Run Recognition App
python recognize.py
-
Run Tracking App
python tracking.py
-
Build the Docker Image
docker compose --profile=prod build
-
Run the Application
docker compose --profile=prod up
- SCRFD (Single-Shot Scale-Aware Face Detector): Designed for real-time face detection across various scales, effective in detecting faces at different resolutions within the same image. SCRFD models require input image shapes divisible by 32, such as 640x640 or 1024x768.
-
ArcFace: A state-of-the-art face recognition algorithm that focuses on learning highly discriminative features for face verification and identification. It is robust to variations in lighting, pose, and facial expressions.
-
Triton Inference Server: An open-source software platform designed for deploying and managing AI models at scale. It supports various deep learning and machine learning frameworks, including TensorFlow, PyTorch, ONNX, and OpenVINO. Triton can be deployed on various hardware platforms, including CPUs, GPUs, and FPGAs.
-
Qdrant: A vector similarity search engine and database offering a production-ready service with a user-friendly API for storing, searching, and managing vectors along with additional payload data. Qdrant supports extended filtering and is suitable for various applications such as neural-network or semantic-based matching and faceted search. It is written in Rust for speed and reliability under high loads.




