Checks mask shape against input image shape.

def _verify_shape_compatibility(self, img, img_type):
        """Checks mask shape against input image shape."""

        if self.input_image.shape[:-1] != img.shape:
            raise ValueError('Shape of the {} ({}) is not compatible '
                             'with input image shape: {} '
                             ''.format(img_type, img.shape, self.input_image.shape[:-1]))