Dataloader help

I currently have a dataset that is split into training, validation, and test sets. The dataset is consistent of frames from various videos.

I’m running into issues about how to load this data in. The dataset is currently saved as video_1_0000, video_1_0001, …, video_2_0000, video_2_0001,…, etc. And each video may have different numbers of frames.

How do I go about loading this data, especially since the frames are all in the same directory? Do I need to do some preprocessing with the directory management or is there some library I can take advantage of?


How would you like to load these frames?
Should each frame be randomly picked to create a batch or would you like to implement a sequential logic?
Also, how would the targets be defined?