JiaRenChang / PSMNet

Pyramid Stereo Matching Network (CVPR2018)
MIT License
1.44k stars 423 forks source link

Data normalization mean and variance #81

Open long2double opened 6 years ago

long2double commented 6 years ago

When preprocess.py is normalized in your source code,

transforms.Normalize(**normalize), __imagenet_stats = {'mean': [0.485, 0.456, 0.406], 'std': [0.229, 0.224, 0.225]}

Is the mean and variance of the imagenet data set? The training uses the FlyingThings3D dataset. Does the mean and variance have not changed?

JiaRenChang commented 6 years ago

@changshuangzhao Yes, it's the mean and variance from Imagenet.

aasharma90 commented 6 years ago

Hi @JiaRenChang ,

On the same topic, could you please explain why the other stats ([0.5, 0.5, 0.5], [0.5, 0.5, 0.5]) are not chosen? I mean if I choose those params, will the results be negatively affected? Many thanks!

JiaRenChang commented 6 years ago

@aasharma90 The mean and variance from very large natural image dataset may help better normalization for natural images. On scene flow, two normalization achieved similar results. When transferring to KITTI, imagenet normalization has a slight better performance.

aasharma90 commented 6 years ago

Many thanks @JiaRenChang for the explanation. In that case, I think I can use either of them, since this slight reduction in performance on KITTI is not a big concern presently.
Best regards!