Preprocessing dataset with videos with too few frames can lead to incorrect labels
Hi,
I attended the workshop at GenML and we trained on the sampled dataset of https://huggingface.co/datasets/naomiKenKorem/canny_for_workshop/tree/main . However, there was a video with 25 frames instead of the minimum 33. This leads to a video, specifically dog_agility, being discarded from processing, but its caption still in the list of captions. Meanings that the list of videos and the list of captions are out of sync.
The code in https://github.com/Lightricks/LTX-Video-Trainer/blob/31b12733f51cb16b244d23f6552609f369aed883/scripts/process_videos.py#L212, function _filter_valid_videos, can skip a video if len(video_reader) >= min_frames_required, but no impact on the list of captions.
The mismatch is detected later in https://github.com/Lightricks/LTX-Video-Trainer/blob/31b12733f51cb16b244d23f6552609f369aed883/scripts/process_videos.py#L238, but there's no user action required.
The way I detected this, was looking at the .precomputed captions, which had the dog_goose video have the caption of the dog_agility.
@Naomi-Ken-Korem, I mentioned this to you at the end of the workshop.
Thanks
Found this issue too, this need to be fixed otherwise the data used to train the model is wrong @Naomi-Ken-Korem