You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the file video_dataset.py, the getitem not make sense to me:
def__getitem__(self, index):
sample=self.samples[index]
# Keep trying to load videos until you find a valid sampleloaded_video=Falsewhilenotloaded_video:
buffer, clip_indices=self.loadvideo_decord(sample) # [T H W 3]loaded_video=len(buffer) >0ifnotloaded_video:
index=np.random.randint(self.__len__())
sample=self.samples[index]
# Label/annotations for videolabel=self.labels[index]
defsplit_into_clips(video):
""" Split video into a list of clips """fpc=self.frames_per_clipnc=self.num_clipsreturn [video[i*fpc:(i+1)*fpc] foriinrange(nc)]
# Parse video into frames & apply data augmentationsifself.shared_transformisnotNone:
buffer=self.shared_transform(buffer)
buffer=split_into_clips(buffer)
ifself.transformisnotNone:
buffer= [self.transform(clip) forclipinbuffer]
returnbuffer, label, clip_indices
In the current setup (at least in eval), samples are file paths to videos. So, here we´re replacing the video output with a random other video and returning it as the video at the current index with the label for the current index?
Worst case:
This could mess up validation (if the labels are used)
Best case:
Random double videos
Or maybe I´m missing something?
The text was updated successfully, but these errors were encountered:
In the file video_dataset.py, the getitem not make sense to me:
Particularly, the following:
In the current setup (at least in eval), samples are file paths to videos. So, here we´re replacing the video output with a random other video and returning it as the video at the current index with the label for the current index?
Worst case:
This could mess up validation (if the labels are used)
Best case:
Random double videos
Or maybe I´m missing something?
The text was updated successfully, but these errors were encountered: