def load_data_list(self):
        """Load images and ground truth labels."""

        label_dict = mat4py.loadmat(self.ann_file)['labels']
        split_list = mat4py.loadmat(self.train_test_split_file)

        if self.split == 'train':
            split_list = split_list['trnid']
        elif self.split == 'val':
            split_list = split_list['valid']
        elif self.split == 'test':
            split_list = split_list['tstid']
        else:
            train_ids = split_list['trnid']
            val_ids = split_list['valid']
            train_ids.extend(val_ids)
            split_list = train_ids

        data_list = []
        for sample_id in split_list:
            img_name = 'image_%05d.jpg' % (sample_id)
            img_path = self.backend.join_path(self.img_prefix, img_name)
            gt_label = int(label_dict[sample_id - 1]) - 1
            info = dict(img_path=img_path, gt_label=gt_label)
            data_list.append(info)

        return data_list
Load images and ground truth labels.
mmpretrain/datasets/flowers102.py