FlowNetPytorch icon indicating copy to clipboard operation
FlowNetPytorch copied to clipboard

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

Open poppinjie opened this issue 4 years ago • 2 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.

poppinjie avatar Mar 20 '21 09:03 poppinjie

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

ClementPinard avatar Mar 23 '21 20:03 ClementPinard

Thank you for your reply. I got it.

poppinjie avatar Mar 26 '21 08:03 poppinjie