• This repository has been archived on 25/Jul/2020
  • Stars
    star
    996
  • Rank 45,688 (Top 1.0 %)
  • Language
    C++
  • License
    MIT License
  • Created almost 12 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Real time deformable face tracking in C++ with OpenCV 3.

FaceTracker

This repository is no longer maintained, due to challenges of upgrading to OpenCV 4.

FaceTracker is a library for deformable face tracking written in C++ using OpenCV 2, authored by Jason Saragih and maintained by Kyle McDonald.

Any publications arising from the use of this software, including but not limited to academic journal and conference publications, technical reports and manuals, should cite the following work: J. M. Saragih, S. Lucey, and J. F. Cohn. Face Alignment through Subspace Constrained Mean-Shifts. International Conference of Computer Vision (ICCV), September, 2009.

FAQ

  1. "I successfully compiled the code, so why is my app is crashing?" Make sure that your model files are in the right location. If you see the error Assertion failed: s.is_open() when running your app, that means you forgot to put the model files in the right directory.
  2. "Is there an example of using FaceTracker on a mobile device?" There is no official example. But there is an example of using ofxFaceTracker on iOS here and a native Android example here.
  3. "Why is the tracking is slow, and why is there high CPU usage?" The face detection step (finding the general location of the face) can be slow. If this is causing an issue, you might want to put the tracking in a separate thread. If the detection is very slow you might try using a face detector that is native to your platform, and initializing FaceTracker with that rectangle.
  4. Can I use this for my commercial project/product? Yes. FaceTracker was re-licensed under the MIT license on April 8, 2020. Previously it was available under a custom non-commercial use license, with a separate license for commercial use available for purchase.

Wrappers are available for:

Installation

These instructions are for compiling the code on OS X and Ubuntu, but it should be possible to compile on other platforms.

First, install OpenCV3 (if you're using OpenCV2, use the opencv2 branch of this repo). On OSX you can use homebrew:

$ brew tap homebrew/science
$ brew install opencv3

And on Ubuntu use:

$ sudo apt-get install libcv-dev libopencv-dev

Alternatively, you can download OpenCV from the GitHub and compile it manually.

After installing OpenCV, clone this repository with git clone git://github.com/kylemcdonald/FaceTracker.git. This repository contains a few subdirectories within the root directory:

  • src (contains all source code)
  • model (contains a pre-trained tracking model)
  • bin (will contain the executable after building)

Next, make sure that your copy of OpenCV is located in /usr/local (this should be the case if you used apt-get). If it isn't located there, modify the OPENCV_PATH in the Makefile. If you installed with Homebrew, it should be set to /usr/local/opt/opencv3.

Optionally, you can also add -fopenmp to the CFLAGS and -lgomp to the LIBRARIES variable to compile with OpenMP support.

From the root FaceTracker directory, build the library and example by running make.

To test the demo, cd bin and ./face_tracker. Because many webcams are 1280x720, try running ./face_tracker -s .25 to rescale the image before processing for a smoother framerate.

face_tracker Usage

Usage: face_tracker [options]
Options:
-m <string> : Tracker model (default: ../model/face2.tracker)
-c <string> : Connectivity (default: ../model/face.con)
-t <string> : Triangulation (default: ../model/face.tri)
-s <double> : Image scaling (default: 1)
-d <int>    : Frames/detections (default: -1)
--check     : Check for failure 
--help      : Print help
-?          : Print help

More Repositories

1

FreeWifi

How to get free wifi.
Python
2,870
star
2

ofxFaceTracker

CLM face tracking addon for openFrameworks based on Jason Saragih's FaceTracker.
C++
1,383
star
3

ofxCv

Alternative approach to interfacing with OpenCv from openFrameworks.
C++
655
star
4

AudioNotebooks

Collection of notebooks and scripts related to audio processing and machine learning.
Jupyter Notebook
422
star
5

Parametric-t-SNE

Running parametric t-SNE by Laurens Van Der Maaten with Octave and oct2py.
Jupyter Notebook
264
star
6

AppropriatingNewTechnologies

A half-semester class at ITP.
C++
252
star
7

cv-examples

A collection of computer vision examples in JavaScript for the browser.
JavaScript
237
star
8

Coloring-t-SNE

Exploration of methods for coloring t-SNE.
Jupyter Notebook
220
star
9

ethereum-nft-activity

Estimate the total emissions for popular CryptoArt platforms.
Jupyter Notebook
183
star
10

ml-notebook

Dockerfile for multiple machine learning tools.
Shell
162
star
11

ofxFft

FFT addon for openFrameworks that wrapps FFTW and KissFFT.
C++
139
star
12

SmileCNN

Smile detection with a deep convolutional neural net, with Keras.
Jupyter Notebook
138
star
13

ofxCcv

libccv addon for openFrameworks
C
123
star
14

ofxEdsdk

Interfacing with Canon cameras from openFrameworks for OSX. An alternative to ofxCanon and CanonCameraWrapper.
C++
111
star
15

nvidia-co2

Adds gCO2eq emissions to nvidia-smi.
Python
110
star
16

OpenFit

Open source jeans.
Processing
109
star
17

ml-examples

Examples of machine learning, with an emphasis on deep learning.
Jupyter Notebook
109
star
18

CloudToGrid

Example of converting a 2d point cloud to a 2d grid via the assignment problem.
Jupyter Notebook
96
star
19

python-utils

Disorganized collection of useful functions for working with audio and images, especially in the context of machine learning.
Python
93
star
20

LightLeaks

An immersive installation built from a pile of mirror balls and a few projectors.
Jupyter Notebook
92
star
21

openFrameworksDemos

Collection of assorted demos and examples for openFrameworks that don't fit anywhere else.
C++
92
star
22

Makerbot

Experiments and projects while in residence at Makerbot Industries.
C++
91
star
23

gpt-2-poetry

Generating poetry with GPT-2.
Jupyter Notebook
89
star
24

ofxDmx

DMX Pro wrapper for openFrameworks
C++
83
star
25

ofxBlackmagic

Simplified and optimized Black Magic DeckLink SDK grabber.
C++
79
star
26

ethereum-emissions

Estimating the daily energy usage for Ethereum.
Jupyter Notebook
75
star
27

ofxBlur

A very fast, configurable GPU blur addon that can also simulate bloom and different kernel shapes.
C++
64
star
28

ofxAssignment

A tool for matching point clouds or other kinds of data. Useful for making grids from point clouds.
C++
62
star
29

ExhaustingACrowd

JavaScript
53
star
30

SharingFaces

C++
48
star
31

COVIDPause

Chrome extension for pausing all mentions of COVID-19.
JavaScript
45
star
32

SharingInterviews

A collection of interviews about creators sharing work, with an emphasis on open source, media art, and digital communities.
44
star
33

i2i-realtime

Python
44
star
34

ofxFaceShift

Network-based addon for interfacing with FaceShift Studio from openFrameworks.
C++
39
star
35

KernelizedSorting

Mirror of Kernelized Sorting code by Novi Quadrianto.
Python
39
star
36

BlindSelfPortrait

An interactive installation that guides your hand to draw a self portrait.
Jupyter Notebook
38
star
37

ImageRearranger

Rearrange mosaics by similarity.
Jupyter Notebook
37
star
38

ofxCameraFilter

A one-shot effect for simulating: vignetting, lens distortion, chromatic aberration, blur/bloom, and noise grain.
C++
36
star
39

ofxTesseract

tesseract-ocr wrapper for openFrameworks
C++
33
star
40

arxiv-visual-summary

Tool for extracting a visual summary of new papers uploaded to ArXiv.
HTML
33
star
41

EmbeddingScripts

Collection of scripts for visualizing high dimensional data with scikit-learn and bh_tsne
Python
32
star
42

ofxFaceTracker-iOS

Example of using ofxFaceTracker on iOS.
Objective-C++
31
star
43

ofxTiming

Timing utilities for handling recurring events, fading, framerate counting.
C++
31
star
44

ofxLibdc

Open Frameworks wrapper for libdc1394.
C
30
star
45

ofxVirtualKinect

Creates a virtual kinect depth image from an arbitrary position and orientation, using ofxKinect.
C++
30
star
46

mueller-unredacter

Generating text completions based on the Mueller report
HTML
28
star
47

whopaysartists

EJS
27
star
48

ofxAudioDecoder

An openFrameworks addon for m4a/aac, mp3, wav, and other file loading.
C++
27
star
49

ofxAutostereogram

Small library for producing autostereograms, as popularized by the "Magic Eye" book series.
C++
27
star
50

covid-mobility-data

Simple script for digitizing the plots in .pdf files from Google's "Community Mobile Reports".
Python
27
star
51

3dsav

Code for 3d Sensing and Visualization class.
C++
25
star
52

ofxZxing

openFrameworks wrapper of ZXing for detecting and decoding QR Codes in real time.
C++
23
star
53

structured-light

Automatically exported from code.google.com/p/structured-light
C++
21
star
54

Messages

Endless Bytebeat synthesis. Generative shader code for audio and visuals.
C++
21
star
55

Eyeshine

C
21
star
56

SoundParts

Collection of classes for working with sound in C++.
C++
21
star
57

ofxLaunchpad

Interface for Novation Launchpad MIDI controller.
C++
19
star
58

MultiscaleTuring

An implementation of multiscale turing patterns with openFrameworks and OpenCV.
C++
18
star
59

reverse-tunnel

Make a reverse tunnel from OSX to a Linux machine.
Python
18
star
60

facepp

Face tracking and augmentation: a collaboration between Zach Lieberman, Daito Manabe, and Kyle McDonald.
C++
18
star
61

ofxPathfinder

Small and efficient A* pathfinding addon for openFrameworks, supporting variable terrain costs.
C++
17
star
62

prnetjs

Port of PRNet face analysis tool to JavaScript using TensorFlow.js
HTML
17
star
63

socialroulette.net

PHP
16
star
64

ofxMetaballs

Metaballs implementations for openFrameworks using marching cubes and marching tetrahedrons.
C++
16
star
65

sakoku-explorer

Explore your data from Facebook and Google.
Svelte
16
star
66

FisheyeToEquirectangular

Scripts for converting pairs of Hikvision fisheye videos to equirectangular videos.
Python
15
star
67

ofxHeadPoseEstimator

openFrameworks example using ofxKinect to demonstrate research from Gabriele Fanelli.
C++
15
star
68

Transcranial

Interactive dance performance with Klaus Obermaier and Daito Manabe.
Max
14
star
69

ScreenLab

ScreenLab 0x02 residency with Joanie Lemercier.
C++
14
star
70

ableton-web-sync

JavaScript
14
star
71

prores-raw-export

Objective-C
13
star
72

ofxBvh

openFrameworks addon for parsing, rendering, manipulating and saving BVH files.
C++
13
star
73

ofxConnexion

Wraps 3dConnexionClient for openFrameworks on OSX
C++
13
star
74

ofxCurvesTool

An interface for controlling a 1D cubic spline, continuously evaluated and stored in a lookup table.
C++
13
star
75

DohaInstallation

Multi-monitor interactive installation for Wafaa Bilal's 3rdi.
C++
12
star
76

DigitalInteraction

Code related to the FITC 2013 "Digital Interaction" workshop with Daito Manabe.
C++
11
star
77

Barneys

Work on a custom 4m sculpture designed to scatter light in every direction.
JavaScript
11
star
78

BaristaBot

BaristaBot draws your portrait in your latte.
C++
11
star
79

UVCExample

Example of using libuvc with openFrameworks on Mac.
C
10
star
80

HowWeActTogether-Tracking

Facetracking for How We Act Together.
JavaScript
10
star
81

t-SNEPreprocessingComparison

Comparison of two techniques for pre-processing data for t-SNE (PCA and convolutional autoencoder).
Jupyter Notebook
10
star
82

tSNESearch

Example of loading t-SNE organized sounds into openFrameworks.
C++
9
star
83

Serendipity

A visualization: every second a few people hit "play" on the same Spotify track.
JavaScript
9
star
84

Roseheading

Endless glitch facets of a "fractured, frozen" mosaic, our data in the cloud.
Java
9
star
85

TheJanusMachine

C++
8
star
86

PhotoMosaic

PhotoMosaic app that loads from a folder of images and regularly transitions.
C++
8
star
87

3dCalibration

Tools for calibrating 3d cameras to 2d cameras using openFrameworks.
C++
8
star
88

AndyWarholMachine

Interactive installation for "Andy Warhol: Manufactured" at the Anchorage Museum.
C++
8
star
89

ofxVCGLib

VCG for OF: based on work from Akira-Hayasaka, wrapping the VCG library for OF friendliness
C
8
star
90

ofxVicon

Wrapper for interfacing to the Vicon motion capture system with openFrameworks.
C++
8
star
91

AppleStore

PHP
7
star
92

GoingPublic

Tweets anything sent via direct message that is prefixed with a ~ (tilde).
PHP
7
star
93

Highsight

Cam on wire.
C++
7
star
94

CameraHacking

Processing sketches for an analog+digital camera hacking workshop with Chris Woebken.
Java
7
star
95

facework

Facework
TypeScript
6
star
96

express-photobooth

Example of a basic photobooth with Express, getUserMedia, and canvas-to-blob.
JavaScript
6
star
97

SubdivisionOfRoam

Installation for Chris Milk, in collaboration with Golan Levin and Emily Gobeille.
C++
6
star
98

HappyThings

A background app that automatically posts a screenshot every time you smile.
PHP
6
star
99

kylemcdonald.net

Repository for my website: things that can't be hosted elsewhere.
HTML
6
star
100

everyautocomplete

Get every autocomplete result.
HTML
6
star