DeformableModelBuilder¶
- class menpo.fitmultilevel.builder.DeformableModelBuilder[source]¶
Bases: object
Abstract class with a set of functions useful to build a Deformable Model.
- classmethod check_boundary(boundary)[source]¶
Checks the boundary added around the reference shape that must be int >= 0.
- classmethod check_downscale(downscale)[source]¶
Checks the downscale factor of the pyramid that must be >= 1.
- classmethod check_feature_type(feature_type, n_levels, pyramid_on_features)[source]¶
Checks the feature type per level. If pyramid_on_features is False, it must be a string or a function/closure or a list of those containing 1 or {n_levels} elements. If pyramid_on_features is True, it must be a string or a function/closure or a list of 1 of those.
Parameters: n_levels: int :
The number of pyramid levels.
pyramid_on_features: boolean :
If True, the pyramid will be applied to the feature image, so the user needs to define a single feature_type. If False, the pyramid will be applied to the intensities image and features will be extracted at each level, so the user can define a feature_type per level.
Returns: feature_type_list: list :
A list of feature types. If pyramid_on_features is True, the list will have length 1. If pyramid_on_features is False, the list will have length {n_levels}.
- classmethod check_max_components(max_components, n_levels, var_name)[source]¶
Checks the maximum number of components per level either of the shape or the appearance model. It must be None or int or float or a list of those containing 1 or {n_levels} elements.