LandmarkManager

class menpo.landmark.base.LandmarkManager(target)[source]

Bases: Transformable, Viewable

Class for storing and manipulating Landmarks associated with an object. This involves managing the internal dictionary, as well as providing convenience functions for operations like viewing.

Parameters:

target : Landmarkable

The parent object that owns these landmarks

copy()[source]

An efficient copy of this landmark manager.

Note that the returned landmark manager will share the same target as self - the target will not be copied.

Returns:

manager : LandmarkManager

A manager with an identical set of annotations to this one.

update(landmark_manager)[source]

Update the manager with the groups from another manager. This performs a copy on the other landmark manager and resets it’s target.

Parameters:

landmark_manager : LandmarkManager

The landmark manager to copy from.

view(**kwargs)

View the object using the default rendering engine figure handling. For example, the default behaviour for Matplotlib is that all draw commands are applied to the same figure object.

Parameters:

kwargs : dict

Passed through to specific rendering engine.

Returns:

viewer : Renderer

The renderer instantiated.

view_new(**kwargs)

View the object on a new figure.

Parameters:

kwargs : dict

Passed through to specific rendering engine.

Returns:

viewer : Renderer

The renderer instantiated.

view_on(figure_id, **kwargs)

View the object on a a specific figure specified by the given id.

Parameters:

figure_id : object

A unique identifier for a figure.

kwargs : dict

Passed through to specific rendering engine.

Returns:

viewer : Renderer

The renderer instantiated.

group_labels[source]

All the labels for the landmark set.

Type:list of string
has_landmarks[source]

Whether the object has landmarks or not

Type:int
n_groups[source]

Total number of labels.

Type:int