Yes!
Here’s my code
class AffWild2Dataset(Dataset):
    def __init__(self, flag, transform = None):
        self.flag = flag
        
        if flag == 'train':
            csv_path = '/Volumes/Orsetto/TESI Sentiment Analysis/code/pre_processing_AffWild2/Aff-Wild2/Aff-Wild2_ready/faces_detected_OK/train_set/train_set.csv'
        else:
            csv_path = '/Volumes/Orsetto/TESI Sentiment Analysis/code/pre_processing_AffWild2/Aff-Wild2/Aff-Wild2_ready/faces_detected_OK/validation_set/validation_set.csv'
        
        self.emotion_frame = pd.read_csv(csv_path, sep=";",encoding='utf8')
        self.transform = transform
   

    def __len__(self):
        return len(self.emotion_frame)
    
    def __getitem__(self, index):
        if self.flag == 'train':
            img_path = self.emotion_frame.iloc[index, 0]           
            fp = os.path.join('/Volumes/Orsetto/TESI Sentiment Analysis/code/pre_processing_AffWild2/Aff-Wild2/Aff-Wild2_ready/faces_detected_OK/train_set%s' %img_path)
        else:
            img_path = self.emotion_frame.iloc[index, 0]
            fp = os.path.join('/Volumes/Orsetto/TESI Sentiment Analysis/code/pre_processing_AffWild2/Aff-Wild2/Aff-Wild2_ready/faces_detected_OK/validation_set%s' %img_path)
        
        img_array = imageio.imread(fp).astype(float)
        img_array /= 255
        
        y_label = self.emotion_frame['label'].values[index]
        y_label = torch.tensor(y_label)
        
        sample = {'face': img_array, 'label': y_label}
        
        if self.transform:
            sample = self.transform(sample)
        
        return sample