# ProjectOutForwardCompositional¶

class menpofit.aam.ProjectOutForwardCompositional(aam_interface, eps=1e-05)[source]

Bases: ProjectOut

Project-out Forward Compositional (POFC) Gauss-Newton algorithm.

project_out(J)

Projects-out the appearance subspace from a given vector or matrix.

Type

ndarray

run(image, initial_shape, gt_shape=None, max_iters=20, return_costs=False, map_inference=False)

Execute the optimization algorithm.

Parameters
• image (menpo.image.Image) – The input test image.

• initial_shape (menpo.shape.PointCloud) – The initial shape from which the optimization will start.

• gt_shape (menpo.shape.PointCloud or None, optional) – The ground truth shape of the image. It is only needed in order to get passed in the optimization result object, which has the ability to compute the fitting error.

• max_iters (int, optional) – The maximum number of iterations. Note that the algorithm may converge, and thus stop, earlier.

• return_costs (bool, optional) – If True, then the cost function values will be computed during the fitting procedure. Then these cost values will be assigned to the returned fitting_result. Note that the costs computation increases the computational cost of the fitting. The additional computation cost depends on the fitting method. Only use this option for research purposes.

• map_inference (bool, optional) – If True, then the solution will be given after performing MAP inference.

Returns

fitting_result (AAMAlgorithmResult) – The parametric iterative fitting result.

property appearance_model

Returns the appearance model of the AAM.

Type

menpo.model.PCAModel

property template

Returns the template of the AAM (usually the mean of the appearance model).

Type

menpo.image.Image or subclass

property transform

Returns the model driven differential transform object of the AAM, e.g. DifferentiablePiecewiseAffine or DifferentiableThinPlateSplines.

Type

subclass of DL and DX