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

Question about “posDistThr” of the Nordland dataset #64

Closed Lu-Feng closed 1 year ago

Lu-Feng commented 1 year ago

Hi, thanks for your work. I have a question about “posDistThr” of Nordland dataset. This repository sets the utm coordinate of i-th frame to (i,i) in the Nordland.npz file, which allows us to have a consistent function for evaluating R@N for all datasets. It's great! The tolerance for Nordland dataset is 10 frames in the Patch-NetVLAD paper. However, the radius of the first frame (0,0) to the 11-th frame (10,10) is 10sqrt(2) rather than 10. The “posDistThr” is set to 10 in Nordland.npz file in this repository. I have wrote a script to calculate R@N on Nordland (tolerance is 2 frames). The result is consistent with setting the “posDistThr” to 2sqrt(2) rather than 2.

StephenHausler commented 1 year ago

This is a good finding, thanks. Yes you are correct. Probably in hindsight we should have made utmDb have these coordinates: 0,0 1,0 2,0 etc.

Currently we use: 0,0 1,1 2,2 etc.

Which as you found, the euclidean distance to (10,10) = 10*sqrt(2).

Therefore our value of posDistThr is equivalent to an image distance of ~7 images. In the interest of repeatability I won't change our current nordland.npz file, however what I can do (and this would be a good improvement to this repo) is allow the users of this code to change the value of posDistThr (which can be done by adding a new config argument allowing this value to be manually set by the user).

Lu-Feng commented 1 year ago

Thanks for your reply. It's a good idea to add a new config argument allowing posDistThr to be manually set.

Tobias-Fischer commented 1 year ago

Hiya @StephenHausler - kind reminder re this issue :)

StephenHausler commented 1 year ago

Sorry this has taken a while to complete, I've now updated our code to include the option of using a custom posDistThr value. Specifically, I have added a new optional argument to feature_match.py called --posDistThr. This flag accepts an integer value, which overrides the value of posDistThr defined in the dataset ground truth file.

Changes provided in commit: 50ec8a868d97f5b3b5897df6d4e1a0c879dbfa63

Closing this issue now, if you have any problems feel free to let us know and reopen.