kinetics_i3d_pytorch icon indicating copy to clipboard operation
kinetics_i3d_pytorch copied to clipboard

Details regarding optical flow pre-processing

Open simonguiroy opened this issue 6 years ago • 4 comments

Hi Yana! Do you have some details on the your pre-processing for the optical flow? I've tried using your model with my own pre-processing that worked with the original TensorFlow repo of I3D, but when using your implementation of I3D the predictions are totally off when I use the flow stream.

simonguiroy avatar Sep 06 '18 15:09 simonguiroy

Hi Simon,

As you might see here, I don't do anything specific beyond loading their sample in my code.

I therefore don't know what might cause this discrepancy.

Let me know if you find out where that came from !

Yana

hassony2 avatar Sep 06 '18 16:09 hassony2

Hi Yana,

I encountered another problem when using your code. I after creating the model, if model.train() is called, training accuracy drops significantly, compared to when model.eval() is called, even without with torch.no_grads(). Could there be something with the batchnorm layer implementation, that is linked to that behavior?

Thanks again

Simon

On Thu, 6 Sep 2018 at 12:12, Yana [email protected] wrote:

Hi Simon,

As you might see here https://github.com/hassony2/kinetics_i3d_pytorch/blob/a4b815fb95d311bbf01734f4d1d3610f7f39cde1/i3d_pt_demo.py#L35, I don't do anything specific beyond loading their sample in my code.

I therefore don't know what might cause this discrepancy.

Let me know if you find out where that came from !

Yana

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hassony2/kinetics_i3d_pytorch/issues/19#issuecomment-419153002, or mute the thread https://github.com/notifications/unsubscribe-auth/APn0cDhMjGMbXVAgM5KuKSlxB4DwlrMJks5uYUmHgaJpZM4WdODu .

simonguiroy avatar Mar 25 '19 02:03 simonguiroy

It is probably due to batch normalisation layers acting up. If you want to evaluate new videos then use .eval(), If you want to train the model with a smaller batch size then freeze the normalisation layer.

gurkirt avatar Mar 26 '19 04:03 gurkirt

See this issue which details optical flow pre-processing on the original Tensorflow implementation. https://github.com/deepmind/kinetics-i3d/issues/87

ed-fish avatar Feb 12 '20 11:02 ed-fish