Skip to content

An advanced facial recognition system designed for real-time identification using deep learning models and optimized vector search. Features include face detection, embedding generation, and scalable deployment options.

License

Notifications You must be signed in to change notification settings

Devasy23/FaceRec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Face Recognition Project

FaceRec is an innovative face recognition project utilizing Flask, FastAPI, DeepFace, and MongoDB to create a Face recognition system. This application empowers users to register faces along with associated metadata, update their information, and delete their data, creating a comprehensive face recognition system.

Python application CodeQL codecov Quality Gate Status Bugs Code Smells Duplicated Lines (%) Lines of Code Security Rating Sqale Rating Sqale Index Reliability Rating Vulnerabilities

πŸš€ Features

  • Real-Time Face Recognition: Detect and recognize faces seamlessly in real-time.
  • User-Friendly Interface: Easy to use with a clean design for enhanced user experience.
  • Metadata Management: Register, update, and delete face entries with ease.
  • Scalable Architecture: Built to handle multiple users and extensive datasets.

πŸ“¦ Getting Started

These instructions will guide you through setting up the project on your local machine for development.

Prerequisites

Make sure you have Python 3.10 or later installed.

Installation Steps

  1. Clone the Repository:

    git clone https://github.com/Devasy23/FaceRec.git
  2. Navigate to the Project Directory:

    cd FaceRec
  3. Install the Required Packages:

    pip install -r requirements.txt

Running the Server

To start the Flask and FastAPI applications, run the following command:

python main.py

Your application will be available at http://localhost:5000.

Project Structure
  • requirements.txt: Contains the Python dependencies for the project.
  • API/: Contains the code for the FastAPI application.
  • FaceRec/: Contains all files related to the HTML, CSS, and Flask application.
  • Model-Training/: Contains scripts for training models.
  • docs/: Contains documentation files.
  • test-faces/: Contains test data for face recognition.
  • main.py: Contains code to start both FastAPI and Flask applications.

Function Flow

  1. create_new_faceEntry(): Receives a POST request with an image and metadata. It extracts the face, calculates the embeddings, and stores the data in the database.
  2. Data(): Sends a GET request to the /data endpoint of the FastAPI app to get the list of Face Entries from MongoDB.
  3. update(): Updates the details of the face entry in the database.
  4. read(): Sends a GET request with a specific Employeecode to read the related information.
  5. delete(): Deletes the specific employee data.

Sequence Diagram

image.png

πŸ—„οΈ Database Schema

  1. Create a New Connection in MongoDB using the following URL:

    mongodb://localhost:27017/8000
    
  2. Create a Database:

    • Database Name: DatabaseName
    • Collection Name: CollectionName
  3. Import Data by Using a JSON File:

    • From the database.mongo folder -> {DatabaseName}.{CollectionName}.json

The faceEntries Collection Schema:

  • id: A unique identifier for the face entry.
  • Employeecode: A unique employee ID associated with the image.
  • Name: The name of the person in the image.
  • gender: The gender of the person.
  • Department: The department of the person.
  • time: The timestamp of when the face entry was created.
  • embeddings: The embeddings of the face image.
  • Image: Base64 encoded image file.

πŸ”„ Function Flow

  1. create_new_faceEntry(): Receives a POST request with an image and metadata. It extracts the face from the image, calculates the embeddings, and stores the data in the database.

  2. Data(): Sends a GET request to the /data endpoint of the FastAPI app to retrieve the list of face entries from MongoDB.

  3. update(): Updates the details of a face entry in the database.

  4. read(): Sends a GET request with a specific Employeecode to retrieve related information.

  5. delete(): Deletes a specific employee's data from the database.

πŸ§ͺ Testing

To run the tests for this project, use the following command:

pytest

πŸ‘₯ Our Valuable Contributors ❀️✨

Thanks to all the amazing people who have contributed to FaceRec! πŸ’–

Contributors

πŸ“„ Documentation

For detailed API documentation, please refer to the API Documentation file.

πŸ“„ License

This project is licensed under the APACHE License - see the LICENSE file for details.

About

An advanced facial recognition system designed for real-time identification using deep learning models and optimized vector search. Features include face detection, embedding generation, and scalable deployment options.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Languages