def prepare_train_frames(self, idx):
        """Prepare the frames for training given the index."""
        results = copy.deepcopy(self.video_infos[idx])
        results['modality'] = self.modality  # RGB
        results['start_index'] = self.start_index  # 0

        # prepare tensor in getitem
        # If HVU, type(results['label']) is dict
        if self.multi_class and isinstance(results['label'], list):
            onehot = torch.zeros(self.num_classes)
            onehot[results['label']] = 1.
            results['label'] = onehot

        aug1 = self.pipeline(results)
        if self.repeat > 1:  # TODO if repeat > 1 -> only repeat twice
            aug2 = self.pipeline(results)
            ret = {"imgs": torch.cat((aug1['imgs'], aug2['imgs']), 0),
                   "label": aug1['label'].repeat(2),
                   }
            return ret
        else:
            return aug1
Prepare the frames for training given the index.
EVA-01/video/datasets/build.py