MenpoWidgets Documentation

MenpoWidgets is the Menpo Project’s Python package for fancy visualization within the Jupyter notebook using interactive widgets. In the Menpo Project we take an opinionated stance that visualization is a key part of generating research. Therefore, we have tried to make the mental overhead of visualizing objects as low as possible. MenpoWidgets makes tasks like data exploration, model observation and results demonstration as simple as possible.

We highly recommend that you render all matplotlib figures inline the Jupyter notebook for the best menpowidgets experience. This can be done by running
%matplotlib inline
in a cell. Note that you only have to run it once and not in every rendering cell.

Please refer to our detailed installation instructions in

User Guide
To get started, check out the user guide in for an explanation of some of the core concepts within MenpoWidgets.

API Documentation

In MenpoWidgets, we use legible docstrings, and therefore, all documentation should be easily accessible in any sensible IDE (or IPython) via tab completion. However, this section should make most of the core classes available for viewing online.

Main Widgets

Functions for visualizing the various Menpo and MenpoFit objects using interactive widgets.

Options Widgets

Independent widget objects that can be used as the main components for designing high-level widget functions.

Tools Widgets

Low-level widget objects that can be used as the main ingredients for creating more complex widgets.

Usage Example

A short example is often more illustrative than a verbose explanation. Let’s assume that you want to quickly explore a folder of numerous annotated images, without the overhead of waiting to load them and writing code to view them. The images can be easily loaded using the Menpo package and then visualized using an interactive widget as:

%matplotlib inline
import as mio
from menpowidgets import visualize_images

images = mio.import_images('/path/to/images/')

Similarly, we can load the pre-trained AAM from MenpoFit and visualize it as:

%matplotlib inline
from menpofit.aam import load_balanced_frontal_face_fitter

aam = load_balanced_frontal_face_fitter()

Finally, MenpoWidgets have a webcam widget that allows you to capture and return multiple snapshots.

from menpowidgets import webcam_widget
images = webcam_widget()