QVPR / Patch-NetVLAD

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

Fixing val.py incorrect recalls issue #43 #44

Closed StephenHausler closed 2 years ago

StephenHausler commented 2 years ago

Made changes to val.py that should fix the indices issue that was causing low reported recalls for mapillary validation on the cph and sf datasets. Without PCA, the recalls with NetVLAD (with the mapillary trained model) are now: 0.495, 0.65, 0.718, 0.77, 0.83, 0.868.

Tobias-Fischer commented 2 years ago

Instead of hardcoding, can't we use eval_set.qIdx and eval_set.pidx?

Tobias-Fischer commented 2 years ago

Also, what are the recalls for Patch-NetVLAD (compared to vanilla NetVLAD)?

StephenHausler commented 2 years ago

Instead of hardcoding, can't we use eval_set.qIdx and eval_set.pidx?

I don't think so, since msls concatenates the two datasets together. So eval_set.qIdx contains a list of query indices that are from both datasets.

StephenHausler commented 2 years ago

I've made changes that now means that val.py should work in the general case, with any combination of mapillary cities. Please re-review and let me know your feedback.

Tobias-Fischer commented 2 years ago

Thanks, lgtm! What do you think @oravus?

oravus commented 2 years ago

Yep, this should do (ignore my earlier comment). EDIT: Re-opened

Tobias-Fischer commented 2 years ago

Agreed that it's not very nice atm. I've got a plan, let me fix tomorrow

Tobias-Fischer commented 2 years ago

Fix #43

Tobias-Fischer commented 2 years ago

Hey @StephenHausler @oravus - I think https://github.com/QVPR/Patch-NetVLAD/pull/44/commits/f06d664be907d1926d0aa0de1e2cb6305a2ba007 makes it a bit cleaner. I did "open loop" coding though and haven't tested if it still works properly - could you please check @StephenHausler?

StephenHausler commented 2 years ago

I've just tested the code, it works perfectly. Thanks Tobi for your refactor, looks great