(self, index)
return image, target
Args:
            index (int): Index
        Returns:
            tuple: (image, target) where target is a tuple of all target types if target_type is a list with more
            than one item. Otherwise target is a json object if target_type="polygon", else the image segmentation.
Args:
            index (int): Index
        Returns:
            tuple: (image, target) where target is a tuple of all target types if target_type is a list with more
            than one item. Otherwise target is a json object if target_type="polygon", else the image segmentation.
Args : index ( int ) : Index Returns : tuple : ( image target ) where target is a tuple of all target types if target_type is a list with more than one item . Otherwise target is a json object if target_type = polygon else the image segmentation .
def __getitem__(self, index):
        """
        Args:
            index (int): Index
        Returns:
            tuple: (image, target) where target is a tuple of all target types if target_type is a list with more
            than one item. Otherwise target is a json object if target_type="polygon", else the image segmentation.
        """
        image = Image.open(self.images[index]).convert('RGB')
        target = Image.open(self.targets[index])
        if self.transform:
            image, target = self.transform(image, target)
        target = self.encode_target(target)
        return image, target
def __getitem__ ( self , index ) : image = Image . open ( self . images [ index ] ) . convert ( 'RGB' ) target = Image . open ( self . targets [ index ] ) if self . transform : image , target = self . transform ( image , target ) target = self . encode_target ( target ) return image , target