uzh-rpg / rpg_timelens

Repository relating to the CVPR21 paper TimeLens: Event-based Video Frame Interpolation
597 stars 86 forks source link

random access logic #5

Closed etienne87 closed 3 years ago

etienne87 commented 3 years ago

Hi, thanks for this great dataset! I would like to code a random access function getitem that, given index i, num_skip s, returns the necessary data to train. Can i assume that:

When i try this i sometimes get events that begin before timestamps[i]

etienne87 commented 3 years ago

Ah, i think i understand reading at your code. In fact there is no per se a strict correspondance between file index and events, because you concatenate all event files and then perform a linear search using the timestamps as input. Therefore this question boils down to using a np.searchsorted inside the events.