Merge pull request #634 from modelscope/bugfix

fix videodataset to load images
This commit is contained in:
Zhongjie Duan
2025-06-24 11:42:14 +08:00
committed by GitHub

View File

@@ -134,7 +134,8 @@ class VideoDataset(torch.utils.data.Dataset):
def load_image(self, file_path):
image = Image.open(file_path).convert("RGB")
image = self.crop_and_resize(image, *self.get_height_width(image))
return image
frames = [image]
return frames
def is_image(self, file_path):