dmlc / decord

An efficient video loader for deep learning with smart shuffling that's super easy to digest
Apache License 2.0
1.73k stars 147 forks source link

is it possible to load only a crop of the video? #300

Open orena1 opened 1 month ago

orena1 commented 1 month ago

If I have a 1200x1200 video, can I load only crop (central 100x100) or maybe every second pixel (spatial subsampling)? Thanks

johndpope commented 1 month ago

are you doing machine learning stuff? is your concern on the memory usage? i have been solving similiar problem in pytorch land rendering out frames to a new dataframe npz file https://github.com/johndpope/MegaPortrait-hack/blob/main/EmoDataset.py#L59