labeller

menpo.landmark.labeller(landmarkable, group, label_func)[source]

Re-label an existing landmark group on a Landmarkable object with a new label set.

Parameters:
  • landmarkable (Landmarkable) – Landmarkable that will have it’s LandmarkManager augmented with a new LandmarkGroup
  • group (str) – The group label of the existing landmark group that should be re-labelled. A copy of this group will be attached to it’s landmark manager with new labels. The group label of this new group and the labels it will have is determined by label_func
  • label_func (func -> (str, LandmarkGroup)) – A labelling function taken from this module, Takes as input a LandmarkGroup and returns a tuple of (new group label, new LandmarkGroup with semantic labels applied).
Returns:

landmarkable (Landmarkable) – Augmented landmarkable (this is just for convenience, the object will actually be modified in place)