def image_predict_proba(self, X):
        """
        Predicts class probabilities for the entire image.

        Parameters:
        -----------

        X: array, shape = [n_samples, n_pixels_x, n_pixels_y, n_bands]
            Array of training images

        y: array, shape = [n_samples] or [n_samples, n_pixels_x, n_pixels_y, n_classes]
            Target probabilities
        """
        self._check_image(X)

        new_shape = (X.shape[0] * X.shape[1] * X.shape[2],)

        if len(X.shape) == 4:
            new_shape += (X.shape[3],)

        pixels = X.reshape(new_shape)

        probabilities = self.classifier.predict_proba(self._transform_input(pixels))

        return probabilities.reshape(X.shape[0], X.shape[1], X.shape[2],
                                     probabilities.shape[1])