The project is a web application for detecting and recognizing faces in videos. Recognition is implemented using FaceNet, ensuring high accuracy with just one photo of the person of interest.
- Project Structure
- Dependencies
- Setup and Installation
- Site Description
- Features
- Example Usage
- Work Visualization
- License
/face_recognition_site
|-- examples/
| |-- example.png # Screenshot of the website in action
| |-- example_video.m4 # Detection Video
|
|-- templates/
| |-- index.html
|
|-- app.py # Flask app
|
|-- create_embeddings.py # Script for creating embeddings
|
|-- detection.py # Script for creating detection
Before running the project, install the following dependencies:
- Python 3.8+
- PyTorch
- OpenCV
- NumPy
- Facenet PyTorch
- Flask
- MoviePy
- Pandas
- Pillow
- Scikit-learn
- Werkzeug
Install the required libraries using the following command:
pip install -r requirements.txt- Clone or download the Sort repository.
- Clone or download this repository.
- Install the dependencies:
pip install -r requirements.txt
- Set the path to Sort in the
path_to_sortvariable.
The website enables face detection and recognition in videos. Users can upload photos of the people they want to recognize. If a matching face is detected in the video, it is labeled with the corresponding name.
- Face Detection: Automatically detects all faces in the frame.
- Photo Upload for Recognition: Users can upload photos of people they want to identify.
- Saving Unknown Faces: Faces not recognized among the uploaded photos are saved for later processing.
- Face Identification: Recognized faces are labeled with names in the video.
- Labeling Unknown Faces: Faces seen multiple times are labeled with a unique index.
- The user uploads photos of people. The photo filename should match the person’s name.
- The website processes the photo using FaceNet and generates a file with embeddings. Uploaded photos are displayed on the site.
- The user uploads a video.
- The processed video is displayed on the website with detected faces labeled by name.
This project is open-source and distributed under the MIT License.

