def __call__(self, dataset_dict):
        """
        Args:
            dataset_dict (dict): Metadata of one image, in Detectron2 Dataset format.

        Returns:
            dict: a format that builtin models in detectron2 accept
        """
        dataset_dict = copy.deepcopy(dataset_dict)  # it will be modified by code below
        file_name = dataset_dict['file_name']
        image = Image.open(file_name).convert('RGB')

        dataset_dict['width'] = image.size[0]
        dataset_dict['height'] = image.size[1]

        if self.is_train == False:
            image = self.transform(image)
            image = torch.from_numpy(np.asarray(image).copy())
            image = image.permute(2,0,1)

        inst_name = dataset_dict['inst_name']
        instances_mask = cv2.imread(inst_name)
        instances_mask = cv2.cvtColor(instances_mask, cv2.COLOR_BGR2GRAY).astype(np.int32)

        objects_ids = dataset_dict['objects_ids']
        instances_mask_byid = [(instances_mask==idx).astype(np.int16) for idx in objects_ids]

        semseg_name = dataset_dict['semseg_name']
        semseg = self.encode_segmap(cv2.imread(semseg_name)[:,:,::-1])
        class_names = [PASCAL_CLASSES[np.unique(semseg[instances_mask_byid[i].astype(np.bool)])[0].astype(np.int32)-1] for i in range(len(instances_mask_byid))]

        _,h,w = image.shape
        masks = BitMasks(torch.stack([torch.from_numpy(
            cv2.resize(m.astype(np.float), (w,h), interpolation=cv2.INTER_CUBIC).astype(np.bool)
            ) for m in instances_mask_byid]))
        instances = Instances(image.shape[-2:])
        instances.gt_masks = masks
        instances.gt_boxes = masks.get_bounding_boxes()

        spatial_query_utils = self.shape_sampler(instances) # [n,c,h,w]

        for i in range(len(instances_mask_byid)):
            instances_mask_byid[i][instances_mask == self.ignore_id] = -1
        gt_masks_orisize = torch.stack([torch.from_numpy(m) for m in instances_mask_byid])

        dataset_dict['spatial_query'] = spatial_query_utils
        dataset_dict['instances'] = instances # gt_masks, gt_boxes
        dataset_dict['image'] = image # (3,h,w)
        dataset_dict['gt_masks_orisize'] = gt_masks_orisize # (nm,h,w)
        dataset_dict['classes'] = [prompt_engineering(x, topk=1, suffix='.') for x in class_names]
        return dataset_dict

        Args:
            dataset_dict (dict): Metadata of one image, in Detectron2 Dataset format.

        Returns:
            dict: a format that builtin models in detectron2 accept
        
datasets/dataset_mappers/pascalvoc_dataset_mapper_ix.py