src/transformers/models/maskformer/image_processing_maskformer.py/MaskFormerImageProcessor/_preprocess
class MaskFormerImageProcessor:    def _preprocess(
        self,
        image: ImageInput,
        do_resize: bool = None,
        size: Dict[str, int] = None,
        size_divisor: int = None,
        resample: PILImageResampling = None,
        do_rescale: bool = None,
        rescale_factor: float = None,
        do_normalize: bool = None,
        image_mean: Optional[Union[float, List[float]]] = None,
        image_std: Optional[Union[float, List[float]]] = None,
    ):
        if do_resize:
            image = self.resize(image, size=size, size_divisor=size_divisor, resample=resample)
        if do_rescale:
            image = self.rescale(image, rescale_factor=rescale_factor)
        if do_normalize:
            image = self.normalize(image, mean=image_mean, std=image_std)
        return image