pytorch / torchcodec

PyTorch video decoding
BSD 3-Clause "New" or "Revised" License
77 stars 9 forks source link

Indexing a 4D FrameBatch: Should this return a Frame or a 3D FrameBatch? #288

Closed NicolasHug closed 1 week ago

NicolasHug commented 2 weeks ago

Opening this issue so we don't forget to discuss this: https://github.com/pytorch/torchcodec/pull/283#discussion_r1815047315

For now, indexing a 4D FrameBatch returns a (3D) Frame. We could instead return a 3D FrameBatch.

I suggest we first land https://github.com/pytorch/torchcodec/pull/284, then I'll submit a PR that makes the change of returning a 3D FrameBatch instead - it'll be easier to evaluate the UX changes that this involves.

CC @ahmadsharif1