Stasm: locating facial features with Active Shape Models

after-stasm-small.jpg before-stasm-small.jpg Stasm is a C++ software library for finding features in faces. You give it an image of a face and it returns the positions of the facial features. It also allows you to build your own Active Shape Models. Source code is provided under GPL2.

Stasm is designed to work on "passport style" photographs i.e. on front views of upright faces with neutral expressions. It doesn't work well on faces at an angle. Like all automatic techniques at the current time (Oct 2007) it is not as accurate as a human landmarker and will sometimes make quiet bad location errors.

Back to Stephen Milborrow Homepage

New release

The beta version of the new release is available in the downloads section below.

The Technology

Stasm extends the Active Shape Model of Tim Cootes and his colleagues with the following techniques: stasm-summary.png

Before searching for facial features begins, Stasm uses the Rowley or the Viola Jones face detector to locate the overall position of the face.

On frontal upright faces with neutral expressions, Stasm is shown in my master's thesis to compare favorably with previously published methods. See the graph to the right.

How reliable are manual landmarks?

To get an idea of the reliability of manual landmarks, we did a small experiment.

Just browsing?

Look at this to save yourself a download minimal.cpp

Download

wasm-zama.png If you just want to try out Stasm on a Windows system, download the Wasm self-installing Windows utility for locating facial landmarks (shown on the right). This is easy to install and uninstall.

The files below were last updated on 3 January 2008. They give results that are a little better than those in my master's thesis.

If you want to build and perhaps modify Stasm, download the source code (about 6 MBytes) for gcc under mingw and for the Microsoft C++ 6.0 and 9.0 (2008) compilers.

If you want to train new models and are prepared to deal with research code, download my research source code (about 9 MBytes). Once again, this download is research software and you will sees lots of nasty code. The download includes data giving the positions of manual landmarks but does not include the face images --- see the database links below to get those.

The above research code also includes an ASCII shape file 84.shape which has extra eye landmarks for XM2VTS images, and "tags" for XM2VTS, BioID, and AR images. Tags specify if the face is wearing glasses, is bearded, and so on 84.shape (truncated web version).

The algorithms used by Stasm are described in my master's thesis "Locating Facial Features with Active Shape Models" (about 2.5 MBytes).

Beta release [26 August 2008] will become version 2.0:

Current versions (same as the links in the text above):

Previous versions

stasm-win32exe-1.2.tar.gz
stasm-src-1.4.tar.gz | stasm-src-1.3.tar.gz | stasm-src-1.2.tar.gz
masm-src-1.4.tar.gz | masm-src-1.3.tar.gz | masm-src-0.2.tar.gz

Image databases

The training and testing image databases used by Stasm are (these are all links to 3rd party sites): The manual landmarking data for these sets is also included in my research source code mentioned above.

Related software

Unlike Stasm, the software below does not include trained models --- you will have to do your own training.

Licensing

Stasm is licensed under the GPL.

Citing Stasm

Please cite the following or equivalent reference in any publicly available text that uses Stasm:
@book{milborrow2007,
  author={S. Milborrow},
  title={{Locating Facial Features with Active Shape Models}},
  publisher={Master's thesis. University of Cape Town (Department of Image Processing)},
  year={2007},
  note={\url{http://www.milbo.users.sonic.net/stasm}}
}

Acknowledgments

I would like to thank the following people who provided ideas, code, data, and techniques used in Stasm:

Thanks guys!


Back to Stephen Milborrow Homepage