Code Monkey home page Code Monkey logo

humanexai-masked-face-recognition's Introduction

HumanexAI Masked Face Recognition

This repository contains the source code for a Face Recognition System using MTCNN for face detection, Facenet for feature extraction, and SVM for classification. The system is capable of recognizing the identity of a person even when they are wearing a mask, The project powered by HumanexAI and implemented by Ahmad Jawabreh.

Introduction

The Face Recognition System is designed to recognize the identity of a person even when they are wearing a mask. The system uses the MTCNN (Multi-task Cascaded Convolutional Networks) algorithm for face detection, which is capable of detecting faces even when they are partially covered by a mask. The Facenet algorithm is used for feature extraction, which extracts a unique set of features from each face that can be used for recognition. Finally, the SVM (Support Vector Machine) algorithm is used for classification, which classifies each face based on the extracted features.

HumanexAI Masked Face Recognition System Pipeline

In normal face recognition tasks, a small dataset for training is usually sufficient to achieve reasonably good results. However, for masked face recognition, a dataset containing thousands of training samples for each person is required. To address this issue, we asked users for three face scans. Then, using the Divide_Video.py algorithm, we divided each video scan into 1000 images, resulting in a total of 3000 training samples for each person. With this approach, we can guarantee high accuracy in our masked face recognition system.

In our pipeline, after preparing the training and testing data, we start with the face detection algorithm. It takes the training dataset as input and outputs a .npz file. We use this .npz file as input to the feature extraction algorithm, which also outputs a .npz file. Then, we give an input image as a test sample to our SVM classifier. It detects the face, extracts its features, and compares the features of the input image face with the trained features. The below figure illustrating the data preparation process, the training process, and the testing process.

Alt Text

Use Case

  • Survillance Systems
  • Perpetrators Identification
  • Biometric Passport
  • Biometric Door Lock Systems

Dependencies / Requirements

  • Python 3.7.x
  • Pillow
  • matplotlib
  • Tensorflow 2.0 or higher
  • Scikit-learn 0.22 or higher
  • MTCNN 0.1.0 or higher
  • Facenet 2.0 or higher
  • keras
  • keras.models

Installation

  1. Clone this repository:
git clone https://github.com/username/repo-name.git
  1. Install the required libraries::
pip install -r requirements.txt
  1. Prepare your own training dataset

  2. Prepare your own testing dataset

  3. Run the masked face training algorithm

python RandomTrain.py
  1. Run the masked face testing algorithm:
python RandomTest.py

Contributing

Contributions are welcome! If you find any issues or bugs, or if you have any suggestions for improving the system, please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

humanexai-masked-face-recognition's People

Stargazers

黃龍 Nigel Phillips avatar

Watchers

 avatar Ahmad Jawabreh avatar

humanexai-masked-face-recognition's Issues

High unknown face rate

The algorithm updated to optimize the threshold, it's giving a high confidence rate but still giving a very high unknown face rate

random-test confidence rate

The random-test supposed to give same confidence rate of the test.py algorithm, both are using MTCNN for face detection, FaceNet for feature extraction and SVM for classification and identification. But in somehow random-test.py and test.py are giving different confidence rate

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.