-
Notifications
You must be signed in to change notification settings - Fork 599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CosPlace for global features extraction #257
Conversation
Thanks for the PR, this is great! Nice work, self-promotion is of course encouraged :) Just out of curiosity: are you able to run the reconstruction + localization on Aachen v1.1 (using this pipeline) and submit the results to visuallocalization.net so we see how much this actually helps over NetVLAD? You can set |
Hello!
I was expecting to see CosPlace vastly outperform NetVLAD (the image below are results on geo-localization retrieval dataset, and the gap between CosPlace and NetVLAD is very wide especially on Tokyo which contains night images), but it seems that results are quite similar. My guess is that for such a small dataset as Aachen, the retrieval method is not that important, and that Aachen is quite saturated as a dataset (at least for what concerns the retrieval method). PS: these results are on Aachen Day-Night, not on Aachen Day-Night v1.1. Somehow using the pipeline from Aachen_v1_1, the output file has 922 lines, which is the number of queries in Aachen Day-Night. PPS: I see that there are a few closed issues (e.g. this) from people who had troubles running the pipeline on Aachen. I had the same issue, because I downloaded the dataset from visuallocalization.net. Once I saw the README in the pipelines/Aachen_v1_v1 then my problems were solved :) |
Nice, thanks for the extensive results! Aachen is indeed pretty saturated, so these results only confirm that CosPlace works at least as well as NetVLAD. Differences of <1% are not reliable because of the small number of queries (especially on night) and the randomness in the pipeline. Aachen v1.1 is a tad better w.r.t. size but I don't expect a large difference. Our LaMAR benchmark is much better on this point so I'll run a few evals when I find the time. Thanks again for all your work! |
Hi @sarlinpe @Phil26AT So here is the list of the architectures available for CosPlace (multiple backbones/output dimensionality). To change the architecture it is only needed to change the two parameters of default_conf What do you think is the cleanest way to allow the user to change the architecture? And regarding EigenPlaces, the code is basically the same as for CosPlace (and also for EigenPlaces multiple architectures are available from torch.hub) and it is only required to change the "CosPlace" in this line to "EigenPlaces". So basically passing 3 parameters (backbone, dimensionality and method, where method can be CosPlace or EigenPlaces) would provide the opportunity to choose among >40 models. |
This is already great then, users can already overwrite any of these parameters when calling |
Sure I'd be happy to make a PR. |
Yes. You might rename the model+file to accommodate both Eigen/CosPlace, but I'd really prefer having a single file since the two models are conceptually very similar. |
Is EigenPlaces always better than CosPlace? if so, can we just replace CosPlace with EigenPlaces? I haven't seen it much used so far anyway. |
Yes, EigenPlaces is always better than CosPlace on standard VPR datasets. I'm not sure if this directly translates to better performances when used as a pre-processing step for tasks like SfM and visual localization, but my guess is that yes, it does. |
Sounds good, thank you! |
I added CosPlace as a global features extractor as it is the latest SOTA in image retrieval for geolocalization.
There are multiple models available, I set as default the one with ResNet50 and features dimensionality of 2048, which provides a good trade-off between speed and accuracy.
However, I didn't provide any way to use the other models without changing the hardcoded default parameters in
default_conf
here. Perhaps I could add the option to select other models? I'm thinking that it might be useful to have lightweight features for large datasets (e.g. CosPlace with ResNet-101 with features dimensionality 128 which still outperforms 30x larger features from NetVLAD and OpenIBL).Link to CosPlace paper - sorry for the self-promotion 😉 but the link should be useful to back the claims