# PyStasm Python wrapper for finding features in faces.
Stasm is a C++ software library for finding features in faces. PyStasm is a library wrapper with simplified Pythonic syntax using the Python C API built on top of OpenCV and NumPy. For example, to get a list of facial landmarks from an image:
import cv2, stasm
img = cv2.imread(imgpath, cv2.IMREAD_GRAYSCALE)
landmarks = stasm.search_single(img)
A full Python version of the minimal Stasm C++ example is located in the documentation.
The recommended way to install PyStasm is through PyPI:
$ pip install PyStasm
To build from source, make sure you have the OpenCV headers and libraries in your include/library paths and then run:
$ python setup.py install
For information specific to this wrapper, take a look at the PyStasm API reference. For further information about Stasm consult the user manual. To build the PyStasm docs:
$ pip install Sphinx
$ python setup.py build_ext --inplace
$ cd doc
$ make html
Questions? Comments? Contributions? Make a pull request or send me an email at mjszczep@buffalo.edu.
Both this software and Stephen Milborrow's original Stasm library are subject to the terms of the BSD-style Stasm License Agreement, available in LICENSE.txt
.