All Projects → markson14 → Face Recognition Cpp

markson14 / Face Recognition Cpp

Real Time Face Recognition Detector. Over 30FPS on CPU!

Programming Languages

cpp
1120 projects

Projects that are alternatives of or similar to Face Recognition Cpp

FaceRecognitionCpp
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
Stars: ✭ 40 (-41.18%)
Mutual labels:  lightweight, face-recognition, face-detection, mtcnn
Facenet
Face recognition using Tensorflow
Stars: ✭ 12,189 (+17825%)
Mutual labels:  face-detection, face-recognition, mtcnn
Awesome Face Detection
Compare with various detectors - s3fd, dlib, ocv, ocv-dnn, mtcnn-pytorch, face_recognition
Stars: ✭ 106 (+55.88%)
Mutual labels:  face-detection, face-recognition, mtcnn
Facerecognition
This is an implematation project of face detection and recognition. The face detection using MTCNN algorithm, and recognition using LightenenCNN algorithm.
Stars: ✭ 137 (+101.47%)
Mutual labels:  face-detection, face-recognition, mtcnn
Facenet Pytorch
Pretrained Pytorch face detection (MTCNN) and facial recognition (InceptionResnet) models
Stars: ✭ 2,564 (+3670.59%)
Mutual labels:  face-detection, face-recognition, mtcnn
FaceIDLight
A lightweight face-recognition toolbox and pipeline based on tensorflow-lite
Stars: ✭ 17 (-75%)
Mutual labels:  face-recognition, face-detection, mtcnn
Face-Recognition-Jetson-Nano
Recognize 2000+ faces on your Jetson Nano with database auto-fill and anti-spoofing
Stars: ✭ 63 (-7.35%)
Mutual labels:  face-recognition, face-detection, mtcnn
Facecropper
✂️ Crop faces, inside of your image, with iOS 11 Vision api.
Stars: ✭ 479 (+604.41%)
Mutual labels:  face-detection, face-recognition
Php Opencv
PHP extensions for OpenCV
Stars: ✭ 524 (+670.59%)
Mutual labels:  face-detection, face-recognition
Facerecognitiondotnet
The world's simplest facial recognition api for .NET on Windows, MacOS and Linux
Stars: ✭ 672 (+888.24%)
Mutual labels:  face-detection, face-recognition
Human Detection And Tracking
Human-detection-and-Tracking
Stars: ✭ 753 (+1007.35%)
Mutual labels:  face-detection, face-recognition
Deepface
Deep Learning Models for Face Detection/Recognition/Alignments, implemented in Tensorflow
Stars: ✭ 409 (+501.47%)
Mutual labels:  face-detection, face-recognition
Curated List Of Awesome 3d Morphable Model Software And Data
The idea of this list is to collect shared data and algorithms around 3D Morphable Models. You are invited to contribute to this list by adding a pull request. The original list arised from the Dagstuhl seminar on 3D Morphable Models https://www.dagstuhl.de/19102 in March 2019.
Stars: ✭ 375 (+451.47%)
Mutual labels:  face-detection, face-recognition
Mobileface
A face recognition solution on mobile device.
Stars: ✭ 669 (+883.82%)
Mutual labels:  face-detection, face-recognition
Libfaceid
libfaceid is a research framework for prototyping of face recognition solutions. It seamlessly integrates multiple detection, recognition and liveness models w/ speech synthesis and speech recognition.
Stars: ✭ 354 (+420.59%)
Mutual labels:  face-detection, face-recognition
Getting Things Done With Pytorch
Jupyter Notebook tutorials on solving real-world problems with Machine Learning & Deep Learning using PyTorch. Topics: Face detection with Detectron 2, Time Series anomaly detection with LSTM Autoencoders, Object Detection with YOLO v5, Build your first Neural Network, Time Series forecasting for Coronavirus daily cases, Sentiment Analysis with BERT.
Stars: ✭ 738 (+985.29%)
Mutual labels:  face-detection, face-recognition
Mtcnn
全平台实时人脸检测和姿态估计,提供无需任何框架实现Realtime Face Detection and Head pose estimation on Windows、Ubuntu、Mac、Android and iOS
Stars: ✭ 351 (+416.18%)
Mutual labels:  face-detection, mtcnn
Awesome Face
😎 face releated algorithm, dataset and paper
Stars: ✭ 739 (+986.76%)
Mutual labels:  face-detection, face-recognition
Face Recognition
A framework for creating and using a Face Recognition system.
Stars: ✭ 60 (-11.76%)
Mutual labels:  face-recognition, mtcnn
Opencv Mtcnn
An implementation of MTCNN Face detector using OpenCV's DNN module
Stars: ✭ 59 (-13.24%)
Mutual labels:  face-detection, mtcnn

Face-Recognition-Cpp

🔥 Updates:

2019.10.31

  • Add RetinaFace TVM module as face detector, the bboxes and pts are much stabler than MTCNNs'
  • Ablation Experiment
Backbone Size FPS Average Cosine Simi
MTCNN 640x480 31.7331 80.8787%
RetinaFace-TVM 640x480 20.9007 87.8968%

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

Dependency:

  • OpenCV >= 3.4.1
  • TVM

Set up:

  • OpenCV
brew install opencv
brew link opencv
brew install pkg-config
pkg-config --cflags --libs /usr/local/Cellar/opencv/<version_number>/lib/pkgconfig/opencv.pc
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

#TODO

  • [ ] Quantize ArcFace
  • [ ] Quantize RetinaFace

Citation:

@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].