ClementPinard / FlowNetPytorch

Pytorch implementation of FlowNet by Dosovitskiy et al.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What's does the values [0.45, 0.432, 0.411] mean?

poppinjie opened this issue · comments

In the main.py file,there is a Normalization operation which is " transforms.Normalize(mean=[0.45, 0.432, 0.411], std=[1, 1, 1])". I was confused of the meaning of the values [0.45, 0.432, 0.411]. I guess they are The mean of the dataset, but why they are fixed for different datasets?
Moreover, the values are in the opposite order in the main.py file and run_inference.py file, However, I think they should keep consistent.

These are the values to which we normalize images coming from Flying Chairs dataset. It's a legacy from original implementation in caffe. I belive these numbers can be seen in the caffe definition of the flownet models. You can download them from here : https://github.com/lmb-freiburg/flownet2/blob/master/models/download-models.sh

These values are supposed to be the mean values of the images of FltyingChairs dataset. It means that now the color distribution of the whole set of images is centered around zero.

And thanks for seeing the error in run_inference.py ! It's probably a legacy bug coming from the fact that we used OpenCV before, which uses BGR color space instead of RGB. I'll correct this

Thank you for your reply. I got it.