Skip to content

Commit

Permalink
Update abstract_dataset.py
Browse files Browse the repository at this point in the history
  • Loading branch information
YZY-stack committed May 27, 2024
1 parent 6a6f615 commit 6e5c240
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions training/dataset/abstract_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -599,4 +599,4 @@ def __len__(self):
# print(iteration)
...
# if iteration > 10:
# break
# break

0 comments on commit 6e5c240

Please sign in to comment.