src/transformers/pipelines/image_segmentation.py/ImageSegmentationPipeline/_sanitize_parameters
class ImageSegmentationPipeline:    def _sanitize_parameters(self, **kwargs):
        preprocessor_kwargs = {}
        postprocess_kwargs = {}
        if "subtask" in kwargs:
            postprocess_kwargs["subtask"] = kwargs["subtask"]
            preprocessor_kwargs["subtask"] = kwargs["subtask"]
        if "threshold" in kwargs:
            postprocess_kwargs["threshold"] = kwargs["threshold"]
        if "mask_threshold" in kwargs:
            postprocess_kwargs["mask_threshold"] = kwargs["mask_threshold"]
        if "overlap_mask_area_threshold" in kwargs:
            postprocess_kwargs["overlap_mask_area_threshold"] = kwargs["overlap_mask_area_threshold"]

        return preprocessor_kwargs, {}, postprocess_kwargs