GithubHelp home page GithubHelp logo

vectornguyen76 / face-recognition Goto Github PK

View Code? Open in Web Editor NEW
73.0 2.0 16.0 129.26 MB

Real-Time Face Recognition use SCRFD, ArcFace, ByteTrack, Similarity Measure

License: MIT License

Python 100.00%
face-detection face-recognition yolov5-face insightface cosine-similarity multithreading real-time arcface bytetrack face-alignment

face-recognition's Introduction

Real-Time Face Recognition

Face Recognition
Face Recognition

Table of Contents

Architecture

Sequence Diagram
Sequence Diagram

How to use

Create Environment and Install Packages

conda create -n face-dev python=3.9
conda activate face-dev
pip install torch==1.9.1+cpu torchvision==0.10.1+cpu torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
pip install -r requirements.txt

Add new persons to datasets

  1. Create a folder with the folder name being the name of the person

    datasets/
    ├── backup
    ├── data
    ├── face_features
    └── new_persons
        ├── name-person1
        └── name-person2
    
  2. Add the person's photo in the folder

    datasets/
    ├── backup
    ├── data
    ├── face_features
    └── new_persons
        ├── name-person1
        │   └── image1.jpg
        │   └── image2.jpg
        └── name-person2
            └── image1.jpg
            └── image2.jpg
    
  3. Run to add new persons

    python add_persons.py
  4. Run to recognize

    python recognize.py

Technology

Face Detection

  1. Retinaface

    • Retinaface is a powerful face detection algorithm known for its accuracy and speed. It utilizes a single deep convolutional network to detect faces in an image with high precision.
  2. Yolov5-face

    • Yolov5-face is based on the YOLO (You Only Look Once) architecture, specializing in face detection. It provides real-time face detection with a focus on efficiency and accuracy.
  3. SCRFD

    • SCRFD (Single-Shot Scale-Aware Face Detector) is designed for real-time face detection across various scales. It is particularly effective in detecting faces at different resolutions within the same image.

Face Recognition

  1. ArcFace

    • ArcFace is a state-of-the-art face recognition algorithm that focuses on learning highly discriminative features for face verification and identification. It is known for its robustness to variations in lighting, pose, and facial expressions.

    ArcFace
    ArcFace

Face Tracking

  1. ByteTrack

    ByteTrack
    ByteTrack is a simple, fast and strong multi-object tracker.

Matching Algorithm

  1. Cosine Similarity Algorithm

    • The Cosine Similarity Algorithm is employed for matching faces based on the cosine of the angle between their feature vectors. It measures the similarity between two faces' feature representations, providing an effective approach for face recognition.

    Cosine Similarity Algorithm
    Cosine Similarity Algorithm

Reference

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.