def __getitem__(self, index: int) -> Tuple[Any, Any]:
        """
        Args:
            index (int): Index

        Returns:
            tuple: (image, target) where the type of target specified by target_type.
        """
        import scipy.io

        img = Image.open(
            os.path.join(
                self.root,
                '101_ObjectCategories',
                self.categories[self.y[index]],
                f'image_{self.index[index]:04d}.jpg',
            )
        )

        target: Any = []
        for t in self.target_type:
            if t == 'category':
                target.append(self.y[index])
            elif t == 'annotation':
                data = scipy.io.loadmat(
                    os.path.join(
                        self.root,
                        'Annotations',
                        self.annotation_categories[self.y[index]],
                        f'annotation_{self.index[index]:04d}.mat',
                    )
                )
                target.append(data['obj_contour'])
        target = tuple(target) if len(target) > 1 else target[0]

        if self.transform is not None:
            img = self.transform(img)

        if self.target_transform is not None:
            target = self.target_transform(target)

        return img, target

        Args:
            index (int): Index

        Returns:
            tuple: (image, target) where the type of target specified by target_type.
        
clip_benchmark/clip_benchmark/datasets/caltech101.py