Need help with clmtrackr?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

6.3K Stars 1.2K Forks MIT License 221 Commits 61 Opened issues


Javascript library for precise tracking of facial features via Constrained Local Models

Services available


Need anything else?

Contributors list


npm version

tracked face

clmtrackr is a javascript library for fitting facial models to faces in videos or images. It currently is an implementation of constrained local models fitted by regularized landmark mean-shift, as described in Jason M. Saragih's paper. clmtrackr tracks a face and outputs the coordinate positions of the face model as an array, following the numbering of the model below:


Reference - Overview

The library provides some generic face models that were trained on the MUCT database and some additional self-annotated images. Check out clmtools for building your own models.

For tracking in video, it is recommended to use a browser with WebGL support, though the library should work on any modern browser.

For some more information about Constrained Local Models, take a look at Xiaoguang Yan's excellent tutorial, which was of great help in implementing this library.



Download the minified library clmtrackr.js, and include it in your webpage.

/* clmtrackr libraries */

The following code initiates the clmtrackr with the default model (see the reference for some alternative models), and starts the tracker running on a video element.

You can now get the positions of the tracked facial features as an array via


You can also use the built in function

to draw the tracked facial model on a canvas :

See the complete example here.


First, install node.js with npm.

In the root directory of clmtrackr, run

npm install
then run
npm run build
. This will create

To test the examples locally, you need to run a local server. One easy way to do this is to install

, a small node.js utility:
npm install -g http-server
. Then run
in the root of clmtrackr and go to
in your browser.


clmtrackr is distributed under the MIT License

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.