FittingResult¶
- class menpo.fit.fittingresult.FittingResult(image, fitter, gt_shape=None, error_type='me_norm')[source]¶
Bases: Viewable
Object that holds the state of a Fitter object before, during and after it has fitted a particular image.
Parameters: image: :map:`MaskedImage` :
The fitted image.
fitter: :map:`Fitter` :
The Fitter object used to fitter the image.
error_type: ‘me_norm’, ‘me’ or ‘rmse’, optional. :
Specifies the way in which the error between the fitted and ground truth shapes is to be computed.
Default: ‘me_norm’
- plot_error(figure_id=None, new_figure=False, **kwargs)[source]¶
Plots the error evolution throughout the fitting.
- shapes(as_points=False)[source]¶
Generates a list containing the shapes obtained at each fitting iteration.
Parameters: as_points : boolean, optional
Whether the results is returned as a list of :map:`PointCloud`s or ndarrays.
Default: False
Returns: shapes : :map:`PointCloud`s or ndarray list
A list containing the shapes obtained at each fitting iteration.
- 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_final_fitting(figure_id=None, new_figure=False, **kwargs)[source]¶
Displays the final fitting result.
- view_ground_truth(figure_id=None, new_figure=False, **kwargs)[source]¶
Displays the ground truth annotation.
- view_initialization(figure_id=None, new_figure=False, **kwargs)[source]¶
Displays the initialization from which the fitting started.
- 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.