ClementPinard / FlowNetTorch

Torch implementation of Fischer et al. FlowNet training code
30 stars 6 forks source link

Input range of pretrained models #9

Closed Kaixhin closed 7 years ago

Kaixhin commented 7 years ago

Thanks for the great work porting this over! Do you know what inputs the pretrained models expect, particularly flowNetS.t7? In Torch we usually load RGB images in [0, 1], but Caffe is usually BGR in [0, 255] or [0, 1].

ClementPinard commented 7 years ago

Hello, the input is supposed to be BGR [0,1] for the pretrained models (directly picked from caffe source code) But in the end it does not really matter if you take RGB [0,1] or BGR [0,1], since during caffe training they did color warps as data augmentation. The code on livedemo.lua is doing the transposition, but it's not mandatory.

Kaixhin commented 7 years ago

Thanks for confirming (so quickly too)! I'll close this, but perhaps adding this info to the README would be helpful for others who might be wondering the same thing :)