yxgeee / OpenIBL

[ECCV-2020 (spotlight)] Self-supervising Fine-grained Region Similarities for Large-scale Image Localization. 🌏 PyTorch open-source toolbox for image-based localization (place recognition).
https://yxgeee.github.io/projects/sfrs
MIT License
271 stars 41 forks source link

mean and std of image transform #15

Closed amaralibey closed 3 years ago

amaralibey commented 3 years ago

Hello, I was wondering how did the mean and std of the transform come from ? I've calculated that of Pittsburg and it seem way different, especially the std ! https://github.com/yxgeee/OpenIBL/blob/5ab80d65afa42ca22210c4c08983fdc156696bab/ibl/utils/data/__init__.py#L37

mean=[0.48501960784313836, 0.4579568627450961, 0.4076039215686255],

std=[0.00392156862745098, 0.00392156862745098, 0.00392156862745098]

The std is way too small, can you please explain how did you get to it ? Thanks

yxgeee commented 3 years ago

The mean and std are borrowed from the VGG pre-training weights of MatConvNet (it should be computed on ImageNet), since the official repos of NetVLAD and SARE are based on MatConvNet. To reproduce their results, we need to load the same pretrained weights as well as the same mean/std.