particalchen / ofxFaceTracker2

Landmark detection addon for openFrameworks using DLIB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ofxFaceTracker2

This addon for openFrameworks is implementing the face detection and face landmark detection algorithm from dlib. The structure of this addon is heavily inspired by ofxFaceTracker. But, it does have some significant changes so it's not directly compatible with it.

Features

  • Face detection - supports multiple faces. This runs on a background thread, by default.
  • Face landmark detection - runs very fast, and can easily run on high resolution video in realtime. Returns a list of 68 points describing different parts of the face.
  • Pose estimation - estimates the 3d position and orientation of the head. Allows you to easily draw in a 3d space relative to a head's position and orientation, and estimate the direction a head is facing.

Platforms

Currently ofxFaceTracker2 is built and tested on OSX and Android, but dlib is crossplatform, so it should be possible to build for all other major platforms. The current builds are done with Apothecary

Comparison to ofxFaceTracker

The algorithms doing the tracking are very different. In the old ofxFaceTracker addon based on Jason Saragih's FaceTracker library, the face detection and landmark detection happens in the same algorithm.

In ofxFaceTracker2, the two stages happen seperately. The face detection in ofxFT2 is considerably slower then ofxFT, but it can easily run on a background thread. The landmark detection (finding the actual details on the face) is faster and more robust. Running ofxFT2 in multithreaded mode (default mode) will give you a better performance and better accuracy in comparison to ofxFT.

Another big difference is this addon supports multiple faces, whereas the old addon only supports one face at the time.

Installation

  • The addon depends on ofxCv addon.
  • All apps need a landsmarks training data file. It can either be downloaded using the command sh download-model.sh, or manually be downloaded here shape_predictor_68_face_landmarks.dat, and should be put unzipped in model for the examples to work, or in bin/data folder of your app.

About

Landmark detection addon for openFrameworks using DLIB

License:Other


Languages

Language:C++ 99.4%Language:C 0.3%Language:CMake 0.2%Language:Makefile 0.1%Language:Shell 0.0%Language:MATLAB 0.0%