piergiaj / pytorch-i3d

Apache License 2.0
971 stars 250 forks source link

Why is the number of flow frames halved ? #61

Closed MounirB closed 4 years ago

MounirB commented 4 years ago

Hello, I saw in the charades_dataset.py script that the number of flow frames was divided by 2, in the following operation :

if mode == 'flow':
            num_frames = num_frames//2

I'm wondering why you did this operation. Does it have something to do with the fact that 2 consecutive rgb frames are theoritically needed to compute a flow frame ? Best regards, Mounir

piergiaj commented 4 years ago

This is because the way I generated flow created 2 images for each frame. A x-flow and y-flow. So there are twice as many images as frames. When these are loaded, the two (greyscale) frames are stacked on the channel axis to give the two channel floa input.

On May 7, 2020, at 7:21 AM, Mounir Bendali-Braham notifications@github.com wrote:

 This message was sent from a non-IU address. Please exercise caution when clicking links or opening attachments from external sources.

Hello, I saw in the charades_dataset.py script that the number of flow frames was divided by 2, in the following operation :

if mode == 'flow': num_frames = num_frames//2

I'm wondering why you did this operation. Does it have something to do with the fact that 2 consecutive rgb frames are theoritically needed to compute a flow frame ? Best regards, Mounir

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/piergiaj/pytorch-i3d/issues/61, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AARTPUXSJVVS6QLELS4JVATRQK7WFANCNFSM4M3L2UCQ.

MounirB commented 4 years ago

Thank you for your answer !