MultilevelFittingResult¶
- class menpo.fitmultilevel.fittingresult.MultilevelFittingResult(image, multiple_fitter, fitting_results, affine_correction, gt_shape=None, error_type='me_norm')[source]¶
Bases: FittingResult
Object that holds the state of a MultipleFitter object (to which it is linked) after it has fitted a particular image.
Parameters: image: :class:`menpo.image.masked.MaskedImage` :
The fitted image.
multiple_fitter: :class:`menpo.fitter.base.Fitter` :
The fitter object used to fitter the image.
fitting_results: :class:`menpo.fitter.fittingresult.FittingResult` list :
A list of basic fitting objects.
affine_correction: :class: `menpo.transforms.affine.Affine` :
An affine transform that maps the result of the top resolution fitting level to the space scale of the original image.
gt_shape: class:`menpo.shape.PointCloud`, optional :
The ground truth shape associated to the image.
Default: None
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 PointClouds or ndarrays.
Default: False
Returns: shapes: :class:`menpo.shape.PointCoulds 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)¶
Displays the final fitting result.
- view_ground_truth(figure_id=None, new_figure=False, **kwargs)¶
Displays the ground truth annotation.
- view_initialization(figure_id=None, new_figure=False, **kwargs)¶
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.
- algorithm¶
Returns the name of the algorithm used by the Fitter.
- errors¶
Returns a list containing the error at each fitting iteration.
- final_error¶
Returns the final fitting error.
Type: float
- initial_error¶
Returns the initial fitting error.
Type: float