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.Installation
Please refer to our detailed installation instructions in menpo.org.
To get started, check out the user guide in
menpo.orgfor an explanation of some of the core concepts within MenpoWidgets.
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.
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 menpo.io as mio from menpowidgets import visualize_images images = mio.import_images('/path/to/images/') visualize_images(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() aam.wrapped_fitter.aam.view_aam_widget()
Finally, MenpoWidgets have a webcam widget that allows you to capture and return multiple snapshots.
from menpowidgets import webcam_widget images = webcam_widget()