QVPR / Patch-NetVLAD

Code for the CVPR2021 paper "Patch-NetVLAD: Multi-Scale Fusion of Locally-Global Descriptors for Place Recognition"
MIT License
510 stars 72 forks source link

Why is the performance improved so much after a pca module? #48

Closed HawkYJH closed 2 years ago

HawkYJH commented 2 years ago

Hello, first of all thank you for your great work!I get the result as below: (I am a student and I don't understand this,as I know,pca is used for dimensionality reduction, it is for more efficient storage. Usually it will lose part of the accuracy. But why is the performance improved so much after a WPCA module?)

for msls val set: netvlad val:(non pca) ====> Calculating recall @ N
====> Recall@1: 0.4946
====> Recall@5: 0.6500
====> Recall@10: 0.7176
====> Recall@20: 0.7703
====> Recall@50: 0.8297
====> Recall@100: 0.8676

after WPCA512: <========= calculte Recall for netvlad ====> Recall netvlad@1: 0.6392 ====> Recall netvlad@5: 0.7676 ====> Recall netvlad@10: 0.8068 ====> Recall netvlad@20: 0.8473 ====> Recall netvlad@50: 0.8905 ====> Recall netvlad@100: 0.9216

StephenHausler commented 2 years ago

Hi @HawkYJH,

I'm not sure exactly why this occurs, however I speculate that the PCA is discarding redundant information within the original 8192 descriptor. PCA returns the ordered principle components in the descriptor given some training data set, the fact that performance improves means that the PCA training set is highly relevant for place recognition and that the top 512 components of the original 8192 vector are better for place recognition than the original vector. Ultimately, what this probably means is that the original 8192 vector is information sparse and a better network architecture is probably possible as future work which directly trains on 512 dimensions.