All Projects → TomaszRewak → Face-Landmarking

TomaszRewak / Face-Landmarking

Licence: MIT license
Real time face landmarking using decision trees and NN autoencoders

Programming Languages

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

Projects that are alternatives of or similar to Face-Landmarking

Encoder-Forest
eForest: Reversible mapping between high-dimensional data and path rule identifiers using trees embedding
Stars: ✭ 22 (-69.86%)
Mutual labels:  autoencoder, decision-trees
gaze-estimation-with-laser-sparking
Deep learning based gaze estimation demo with a fun feature :-)
Stars: ✭ 32 (-56.16%)
Mutual labels:  face-detection, face-landmarking
udacity-cvnd-projects
My solutions to the projects assigned for the Udacity Computer Vision Nanodegree
Stars: ✭ 36 (-50.68%)
Mutual labels:  face-detection
TD-OpenCV3TOP
Touchdesigner OpenCV3 C++ TOP for FaceDetect
Stars: ✭ 90 (+23.29%)
Mutual labels:  face-detection
Voice4Rural
A complete one stop solution for all the problems of Rural area people. 👩🏻‍🌾
Stars: ✭ 12 (-83.56%)
Mutual labels:  decision-trees
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 (-45.21%)
Mutual labels:  face-detection
Face-Recognition-Jetson-Nano
Recognize 2000+ faces on your Jetson Nano with database auto-fill and anti-spoofing
Stars: ✭ 63 (-13.7%)
Mutual labels:  face-detection
Image-Retrieval
Image retrieval program made in Tensorflow supporting VGG16, VGG19, InceptionV3 and InceptionV4 pretrained networks and own trained Convolutional autoencoder.
Stars: ✭ 56 (-23.29%)
Mutual labels:  autoencoder
facenet
Face recognition using Tensorflow
Stars: ✭ 17 (-76.71%)
Mutual labels:  face-detection
OpenCV-android
【开发中】OpenCV Android 实现人脸识别、图片处理、图片相似度检测、物体识别功能。(基于OpenCV Library v3.2.0)
Stars: ✭ 43 (-41.1%)
Mutual labels:  face-detection
PaddlePaddle-MTCNN
基于PaddlePaddle复现的MTCNN人脸检测模型
Stars: ✭ 23 (-68.49%)
Mutual labels:  face-detection
Face Recognition
<NOT ACTIVELY MAINTAINED>A light weight face recognition implementation using a pre-trained facenet model
Stars: ✭ 106 (+45.21%)
Mutual labels:  face-detection
ViewFaceCore
C# 超简单的离线人脸识别库。( 基于 SeetaFace6 )
Stars: ✭ 345 (+372.6%)
Mutual labels:  face-detection
dltf
Hands-on in-person workshop for Deep Learning with TensorFlow
Stars: ✭ 14 (-80.82%)
Mutual labels:  autoencoder
FaceRecog
Realtime Facial recognition system using Siamese neural network
Stars: ✭ 47 (-35.62%)
Mutual labels:  face-detection
GenderRecognizer
Plain Face Detector & Gender Recognizer
Stars: ✭ 57 (-21.92%)
Mutual labels:  face-detection
java.math.expression.parser
java math expression parser is faster than JEP
Stars: ✭ 25 (-65.75%)
Mutual labels:  decision-trees
stackgbm
🌳 Stacked Gradient Boosting Machines
Stars: ✭ 24 (-67.12%)
Mutual labels:  decision-trees
FXFaceDetection
Real-Time Face Detection App using Computer Vision & JavaFX
Stars: ✭ 50 (-31.51%)
Mutual labels:  face-detection
goscore
Go Scoring API for PMML
Stars: ✭ 85 (+16.44%)
Mutual labels:  decision-trees

FaceLandmarking

Real time face landmarking using decision trees and NN autoencoders.

The approach to the face landmarking problem used in this project is briefly described on my blog: https://blog.tomasz-rewak.com/face-landmarking/. The blog post contains also some information on how I’ve achieved the real time performance.

About

This software is written (mostly) in C++ (with some ML parts written in Python). For video capturing and processing it uses OpenCV (OpenCV is also used for initial face detection).

In this project, the face landmarking is an iterative process which updates positions of key face points each frame using simple filters and decision trees. At the same time NN autoencoders ensure that the overall shape of the face stays correct.

The algorithm maps 194 points on all of the detected faces each frame. The ML models have been thought using the HELEN dataset: http://www.ifp.illinois.edu/~vuongle2/helen/

It's just a pet project of mine, so it still requires some work. In particular I didn't have that much time (nor will :D) to conduct extended experiments. Most of the parameters (like shape and number of filters, size of NN etc.) are just mine educated guesses.

Setup

This repo contains all the code required to extract features from the dataset, generate ML models and use the face landmarker. Things that are missing are: dependencies (like OpenCV which has to be installed separately) and learning data.

First: in the main directory of the cloned repo create a Data directory with following subdirectories: annotation, images, haar, mask, autoencoder, features and regressors.

The dataset can be downloaded from the HELEN project website: http://www.ifp.illinois.edu/~vuongle2/helen/

All of the annotation files (1.txt to 2330.txt) have to be extracted into the annotation directory and all of the images (232194_1.jpg to 3266693323_1.jpg) into the images dir.

Also, as the software uses pretrained haar filters for initial face detection (at the first frame only), all of the .xml files from https://github.com/opencv/opencv/tree/master/data/haarcascades have to be copied into the previously created haar directory.

Feature extraction

To extract features from the dataset the compiled program has to be ran with a -type features flag. This process will create files with learning examples in two directories: autoencoder and features. Also a maks/avg-face.mask file, that contains an average face shape computed based on the entire dataset, will be generated.

Make sure that when you perform this step (or any other of the following steps) the ./../Data dir is visible to the program. This is the default configuration of the VS project.

The process might take some time.

Learning process

To generate decision trees and the NN autoencoder, the autoencoder.py and the regressor.py scripts from the FaceLandmarking.LearningProcess dir have to be run.

This process populates the regressors dir.

Usage

If all of the previous steps finished successfully, the software should be ready to use.

The best way to test it is to run the program with a -type example flag. It will load examples (one by one) from the dataset and display them. On each spacebar hit the program will perform one step of mask adjustment. Any other key stroke will change the image to the next one.

Finally, a -type video flag can be used to load a video for a file (provided with a -video [path] flag). Unfortunately I didn't have time to play with video settings, so the program doesn't read information about the orientation of the video. It (as well as the size of the video) might have to be adjusted manually (using -transform, -transform-rotate, -transform-width and -transform-height flags - see main.cpp for their default values). To initialize face landmarking process simply hit space – it will run haar filters on given frame to detect the initial position of the face.

More

If you have any questions fell free to contact me.

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