All Projects → markson14 → FaceRecognitionCpp

markson14 / FaceRecognitionCpp

Licence: other
Large input size REAL-TIME Face Detector on Cpp. It can also support face verification using MobileFaceNet+Arcface with real-time inference. 480P Over 30FPS on CPU

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to FaceRecognitionCpp

InsightFace-REST
InsightFace REST API for easy deployment of face recognition services with TensorRT in Docker.
Stars: ✭ 308 (+670%)
Mutual labels:  face-recognition, face-detection, arcface, insightface, retinaface
retinaface
RetinaFace: Deep Face Detection Library for Python
Stars: ✭ 242 (+505%)
Mutual labels:  face-recognition, face-detection, insightface, retinaface, retinaface-detector
Face-Recognition-Jetson-Nano
Recognize 2000+ faces on your Jetson Nano with database auto-fill and anti-spoofing
Stars: ✭ 63 (+57.5%)
Mutual labels:  face-recognition, face-detection, mtcnn, arcface, retinaface
Face Recognition Cpp
Real Time Face Recognition Detector. Over 30FPS on CPU!
Stars: ✭ 68 (+70%)
Mutual labels:  lightweight, face-recognition, face-detection, mtcnn
Face-Recognition-Raspberry-Pi-64-bits
Recognize 2000+ faces on your Raspberry Pi 4 with database auto-fill and anti-spoofing
Stars: ✭ 48 (+20%)
Mutual labels:  face-recognition, face-detection, arcface, retinaface
Insightface
State-of-the-art 2D and 3D Face Analysis Project
Stars: ✭ 10,886 (+27115%)
Mutual labels:  face-recognition, face-detection, arcface, retinaface
lite.ai.toolkit
🛠 A lite C++ toolkit of awesome AI models with ONNXRuntime, NCNN, MNN and TNN. YOLOX, YOLOP, MODNet, YOLOR, NanoDet, YOLOX, SCRFD, YOLOX . MNN, NCNN, TNN, ONNXRuntime, CPU/GPU.
Stars: ✭ 1,354 (+3285%)
Mutual labels:  face-recognition, face-detection, retinaface
compreface-javascript-sdk
JavaScript SDK for CompreFace - free and open-source face recognition system from Exadel
Stars: ✭ 19 (-52.5%)
Mutual labels:  face-recognition, face-detection, insightface
Awesome Face Detection
Compare with various detectors - s3fd, dlib, ocv, ocv-dnn, mtcnn-pytorch, face_recognition
Stars: ✭ 106 (+165%)
Mutual labels:  face-recognition, face-detection, mtcnn
insightface
implementation of insightface by using Tensorflow
Stars: ✭ 97 (+142.5%)
Mutual labels:  arcface, insightface, retinaface
Facerecognition
This is an implematation project of face detection and recognition. The face detection using MTCNN algorithm, and recognition using LightenenCNN algorithm.
Stars: ✭ 137 (+242.5%)
Mutual labels:  face-recognition, face-detection, mtcnn
Facenet Pytorch
Pretrained Pytorch face detection (MTCNN) and facial recognition (InceptionResnet) models
Stars: ✭ 2,564 (+6310%)
Mutual labels:  face-recognition, face-detection, mtcnn
Facenet
Face recognition using Tensorflow
Stars: ✭ 12,189 (+30372.5%)
Mutual labels:  face-recognition, face-detection, mtcnn
FaceIDLight
A lightweight face-recognition toolbox and pipeline based on tensorflow-lite
Stars: ✭ 17 (-57.5%)
Mutual labels:  face-recognition, face-detection, mtcnn
Awesome Face recognition
papers about Face Detection; Face Alignment; Face Recognition && Face Identification && Face Verification && Face Representation; Face Reconstruction; Face Tracking; Face Super-Resolution && Face Deblurring; Face Generation && Face Synthesis; Face Transfer; Face Anti-Spoofing; Face Retrieval;
Stars: ✭ 3,220 (+7950%)
Mutual labels:  face-recognition, face-detection
jeelizGlanceTracker
JavaScript/WebGL lib: detect if the user is looking at the screen or not from the webcam video feed. Lightweight and robust to all lighting conditions. Great for play/pause videos if the user is looking or not, or for person detection. Link to live demo.
Stars: ✭ 68 (+70%)
Mutual labels:  lightweight, face-detection
Extd pytorch
Official EXTD Pytorch code
Stars: ✭ 177 (+342.5%)
Mutual labels:  lightweight, face-detection
Facepapercollection
A collection of face related papers
Stars: ✭ 241 (+502.5%)
Mutual labels:  face-recognition, face-detection
Jeelizfacefilter
Javascript/WebGL lightweight face tracking library designed for augmented reality webcam filters. Features : multiple faces detection, rotation, mouth opening. Various integration examples are provided (Three.js, Babylon.js, FaceSwap, Canvas2D, CSS3D...).
Stars: ✭ 2,042 (+5005%)
Mutual labels:  lightweight, face-detection
Deepstream Project
This is a highly separated deployment project based on Deepstream , including the full range of Yolo and continuously expanding deployment projects such as Ocr.
Stars: ✭ 120 (+200%)
Mutual labels:  face-recognition, arcface

Face-Recognition-Cpp

Introduction

This project is using Fast-MTCNN for face detection and TVM inference model for face recognition. At the face detection stage, the the module will output the x,y,w,h coordinations as well as 5 facial landmarks for further alignment. At the face recognition stage, the 112x112 image crop by the first stage output will be the second stage input. The output will be an 1x128 feature vector for cosine similarity measuring. The recognition pipeline can run 50FPS on CPU (2.8 GHz Quad-Core Intel Core i7).

output

PerformanceÏ

Backbone Size FPS Average Cosine Simi
MTCNN 640x480 31.7331 80.8787%
RetinaFace-TVM 640x480 20.9007 87.8968%

Dependency:

  • OpenCV >= 3.4.1
  • TVM

Set up:

  • OpenCV
# macos
brew install opencv
brew link opencv
brew install pkg-config
pkg-config --cflags --libs /[path-to-your-opencv]/lib/pkgconfig/opencv.pc

# ========================================================================
#linux
# Install minimal prerequisites (Ubuntu 18.04 as reference)
sudo apt update && sudo apt install -y cmake g++ wget unzip
# Download and unpack sources
wget -O opencv.zip https://github.com/opencv/opencv/archive/master.zip
wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/master.zip
unzip opencv.zip
unzip opencv_contrib.zip
# Create build directory and switch into it
mkdir -p build && cd build
# Configure
cmake -DOPENCV_EXTRA_MODULES_PATH=../opencv_contrib-master/modules ../opencv-master
# Build
cmake --build .
git clone --recursive https://github.com/dmlc/tvm

mkdir build
cp cmake/config.cmake build
cd build
cmake ..
make -j4
  • tvm_complier

    Now you are able create your own .so file by using pretrained MXNet models on your own environment. Here I am using mobilefacenet-arcface model as face recognition backbone.

  • CMakeList.txt

    modify the TVM path into your own

  • Prefix: set the prefix model path to your own.

  • Recording ground truth:mkdir img and set record to 1 to record ground truth image for face recognition.


Run:

Run the project may activate your camera to capture images.

mkdir build
cd build
cmake ..
make -j4
./FaceRecognitionCpp

Tun-able Parameters:

  1. minSize: set the minimum size of faces for MTCNN detector. Larger size can ensure quick inference time.
  2. factor: set the step factor for pyramid of image. Larger factor will get fewer images after doing pyramid.
  3. Frame size: set the camera or streaming capturing frame size.
  4. Stage: set how many stage for MTCNN to implement.
  5. Average Faces: default 1

Reference

@inproceedings{imistyrain2018MTCNN,
title={Fast-MTCNN https://github.com/imistyrain/MTCNN/tree/master/Fast-MTCNN},
author={Jack Yu},
}

@inproceedings{RetinaFace-TVM,
title={RetinaFace-TVM https://github.com/Howave/RetinaFace-TVM},
author={Howave},
}

@inproceedings{deng2019retinaface,
title={RetinaFace: Single-stage Dense Face Localisation in the Wild},
author={Deng, Jiankang and Guo, Jia and Yuxiang, Zhou and Jinke Yu and Irene Kotsia and Zafeiriou, Stefanos},
booktitle={arxiv},
year={2019}
}

@inproceedings{guo2018stacked,
  title={Stacked Dense U-Nets with Dual Transformers for Robust Face Alignment},
  author={Guo, Jia and Deng, Jiankang and Xue, Niannan and Zafeiriou, Stefanos},
  booktitle={BMVC},
  year={2018}
}

@article{deng2018menpo,
  title={The Menpo benchmark for multi-pose 2D and 3D facial landmark localisation and tracking},
  author={Deng, Jiankang and Roussos, Anastasios and Chrysos, Grigorios and Ververas, Evangelos and Kotsia, Irene and Shen, Jie and Zafeiriou, Stefanos},
  journal={IJCV},
  year={2018}
}

@inproceedings{deng2018arcface,
title={ArcFace: Additive Angular Margin Loss for Deep Face Recognition},
author={Deng, Jiankang and Guo, Jia and Niannan, Xue and Zafeiriou, Stefanos},
booktitle={CVPR},
year={2019}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].