AlternatingRegularisedLandmarkMeanShift¶
-
class
menpofit.unified_aam_clm.
AlternatingRegularisedLandmarkMeanShift
(aam_interface, expert_ensemble, patch_shape, response_covariance, eps=1e-05, **kwargs)[source]¶ Bases:
UnifiedAlgorithm
Alternating Inverse Compositional + Regularized Landmark Mean Shift
-
run
(image, initial_shape, gt_shape=None, max_iters=20, return_costs=False, prior=False, a=0.5)[source]¶ 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.prior (bool, optional) – If
True
, use a Gaussian priors over the latent shape and appearance spaces. see the reference [1] section 3.1.1 for details.a (float, optional) – Ratio of the image noise variance and the shape noise variance. See [1] section 5 equations (25) & (26) and footnote 6.
- Returns
fitting_result (
UnifiedAAMCLMAlgorithmResult
) – The parametric iterative fitting result.
References
- 1
J. Alabort-i-Medina, and S. Zafeiriou. “Unifying holistic and parts-based deformable model fitting.” Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2015.
-