Esempio n. 1
0
 def __init__(self, model, transform_cls, source=None):
     # Check the provided model
     check_model(model, PDM)
     # Assign attributes
     self.pdm = model
     self._cached_points, self.dW_dl = None, None
     self.transform = transform_cls(source, self.target)
Esempio n. 2
0
    def __init__(self, aam_interface, expert_ensemble, patch_shape,
                 response_covariance, eps=10**-5, **kwargs):

        # AAM part ------------------------------------------------------------
        self.interface = aam_interface
        self.appearance_model = self.interface.appearance_model
        self.template = self.appearance_model.mean()
        self.transform = self.interface.transform
        check_model(self.transform.pdm, OrthoPDM)

        # CLM part ------------------------------------------------------------
        self.expert_ensemble = expert_ensemble
        self.patch_shape = patch_shape
        self.response_covariance = response_covariance
        self.pdm = self.transform.pdm

        # Unified part --------------------------------------------------------
        self.eps = eps
        self._precompute()
Esempio n. 3
0
 def __init__(self, model, transform_cls, source=None):
     # Check the provided model
     check_model(model, OrthoPDM)
     # Assign attributes
     super(OrthoMDTransform, self).__init__(model, transform_cls,
                                            source=source)