diff --git a/training/dataset/abstract_dataset.py b/training/dataset/abstract_dataset.py index a9c2069..89b855d 100644 --- a/training/dataset/abstract_dataset.py +++ b/training/dataset/abstract_dataset.py @@ -201,9 +201,9 @@ def collect_img_and_label_for_one_dataset(self, dataset_name: str): frame_paths = video_info['frames'] # sorted video path to the lists if '\\' in frame_paths[0]: - frame_paths = sorted(frame_paths, key=lambda x: int(frame_paths[0].split('\\')[-1].split('.')[0])) + frame_paths = sorted(frame_paths, key=lambda x: int(x.split('\\')[-1].split('.')[0])) else: - frame_paths = sorted(frame_paths, key=lambda x: int(frame_paths[0].split('/')[-1].split('.')[0])) + frame_paths = sorted(frame_paths, key=lambda x: int(x.split('/')[-1].split('.')[0])) # Consider the case when the actual number of frames (e.g., 270) is larger than the specified (i.e., self.frame_num=32) # In this case, we select self.frame_num frames from the original 270 frames @@ -599,4 +599,4 @@ def __len__(self): # print(iteration) ... # if iteration > 10: - # break \ No newline at end of file + # break