Landmarkable

class menpo.landmark.Landmarkable[source]

Bases: Copyable

Abstract interface for object that can have landmarks attached to them. Landmarkable objects have a public dictionary of landmarks which are managed by a LandmarkManager. This means that different sets of landmarks can be attached to the same object. Landmarks can be N-dimensional and are expected to be some subclass of PointCloud. These landmarks are wrapped inside a LandmarkGroup object that performs useful tasks like label filtering and viewing.

copy()

Generate an efficient copy of this object.

Note that Numpy arrays and other Copyable objects on self will be deeply copied. Dictionaries and sets will be shallow copied, and everything else will be assigned (no copy will be made).

Classes that store state other than numpy arrays and immutable types should overwrite this method to ensure all state is copied.

Returns:type(self) – A copy of this object
n_dims()[source]

The total number of dimensions.

Type:int
has_landmarks

Whether the object has landmarks.

Type:bool
landmarks

The landmarks object.

Type:LandmarkManager
n_landmark_groups

The number of landmark groups on this object.

Type:int