コード例 #1
0
    def predict_response(self, image, shape):
        r"""
        Method for predicting the response of the experts on a given image. Note
        that the provided shape must have the same number of points as the
        number of experts.

        Parameters
        ----------
        image : `menpo.image.Image` or `subclass`
            The test image.
        shape : `menpo.shape.PointCloud`
            The shape that corresponds to the image from which the patches
            will be extracted.

        Returns
        -------
        response : ``(n_experts, 1, height, width)`` `ndarray`
            The response of each expert.
        """
        # Extract patches
        patches = self._extract_patches(image, shape)
        # Predict responses
        return fft_convolve2d_sum(patches,
                                  self.fft_padded_filters,
                                  fft_filter=True,
                                  axis=1)
コード例 #2
0
ファイル: ensemble.py プロジェクト: HaoyangWang/menpofit
 def predict_response(self, image, shape):
     r"""
     """
     # Extract patches
     patches = self._extract_patches(image, shape)
     # Predict responses
     return fft_convolve2d_sum(patches, self.fft_padded_filters,
                               fft_filter=True, axis=1)
コード例 #3
0
ファイル: ensemble.py プロジェクト: lydonchandra/menpofit
 def predict_response(self, image, shape):
     r"""
     """
     # Extract patches
     patches = self._extract_patches(image, shape)
     # Predict responses
     return fft_convolve2d_sum(patches,
                               self.fft_padded_filters,
                               fft_filter=True,
                               axis=1)
コード例 #4
0
ファイル: ensemble.py プロジェクト: jabooth/menpofit
    def predict_response(self, image, shape):
        r"""
        Method for predicting the response of the experts on a given image. Note
        that the provided shape must have the same number of points as the
        number of experts.

        Parameters
        ----------
        image : `menpo.image.Image` or `subclass`
            The test image.
        shape : `menpo.shape.PointCloud`
            The shape that corresponds to the image from which the patches
            will be extracted.

        Returns
        -------
        response : ``(n_experts, 1, height, width)`` `ndarray`
            The response of each expert.
        """
        # Extract patches
        patches = self._extract_patches(image, shape)
        # Predict responses
        return fft_convolve2d_sum(patches, self.fft_padded_filters,
                                  fft_filter=True, axis=1)