src/transformers/models/maskformer/convert_maskformer_original_pytorch_checkpoint_to_pytorch.py/OriginalMaskFormerCheckpointToOursConverter/convert_instance_segmentation
class OriginalMaskFormerCheckpointToOursConverter:    def convert_instance_segmentation(
        self, mask_former: MaskFormerForInstanceSegmentation
    ) -> MaskFormerForInstanceSegmentation:
        dst_state_dict = TrackedStateDict(mask_former.state_dict())
        src_state_dict = self.original_model.state_dict()

        self.replace_instance_segmentation_module(dst_state_dict, src_state_dict)

        mask_former.load_state_dict(dst_state_dict)

        return mask_former