mihaidusmanu / d2-net

D2-Net: A Trainable CNN for Joint Description and Detection of Local Features
Other
761 stars 163 forks source link

How to get the image pairs for localization of Aachen dataset? #61

Closed GabbySuwichaya closed 4 years ago

GabbySuwichaya commented 4 years ago

Hi @mihaidusmanu, thanks so much for releasing the codes and implementation as well as evaluation metrics, and supports to make this repository very complete. I find the performance and the evaluation metrics of D2-Net quite interesting, especially on the localization with Aachen Day-Night datasets (https://data.ciirc.cvut.cz/public/projects/2020VisualLocalization/Aachen-Day-Night/).

D2-Net performance is very outstanding, and I have been interesting about the algorithm for a while. Here, I would like to reproduce the results using the visual localization benchmark . I am actually trying to select the good algorithm to perform the task (I will cite your paper accordingly).

My questions are about how to get the retrieval_list.txt and database_pairs_list.txt.

mihaidusmanu commented 4 years ago

Please find my answers below:

  1. For the query images, we have used NetVLAD to retrieve top K database images. More precisely, I used https://github.com/Relja/netvlad/blob/master/serialAllFeats.m to compute 4096 dimensional features for both queries and database images and simply picked the closest K database descriptors for each query image.

  2. No, I do not use exhaustive matching. The dataset already provides poses for database images so I picked top 20 spatially nearby images for each database images - thus the number of database image pairs to match is around 20 x number of database images (supposing no overlap) which is significantly lower than exhaustive matching.

  3. The files released at https://github.com/tsattler/visuallocalizationbenchmark/tree/master/local_feature_evaluation are only for the Local Features challenge (i.e. Aachen Night only). Do no use them for the other tracks since these pairs were manually retrieved.

  4. Please find below the database to database pairs as well as query to database top 20 NetVLAD retrieved pairs. query_to_database_pairs_to_match_20.txt database_pairs_to_match.txt

GabbySuwichaya commented 4 years ago

Thanks so much for the information. I have a few questions left:

mihaidusmanu commented 4 years ago

Here are my answers:

GabbySuwichaya commented 4 years ago

Thank you so much for the answers. It is much clearer, now.

However, I am still be having the problem related to the database file (db.db) for the localization evaluation as the prerequisite said (A COLMAP database (e.g., db.db) containing the database and query images as well as their intrinsics. ) . The problem is that database.db does not contain the intrinsic parameters for image in query/night/milestone

However, the problem is that both the night_time_queries_with_intrinsics.txt and the database.db does not contain the intrinsic parameters for image in query/night/milestone .... Does it means that the query images of this query/night/milestone are not used in evaluation of your paper? Or, could you please advice on how to get the intrinsic parameters for these images ?

mihaidusmanu commented 4 years ago

Only cameras that have intrinsics at https://data.ciirc.cvut.cz/public/projects/2020VisualLocalization/Aachen-Day-Night/queries/ are used for evaluation.

As for the second question, queries taken with the same camera and orientation (i.e. landscape / portrait) have the same intrinsics. You can check this in the lists. For instance:

query/day/nexus4/IMG_20130210_165452.jpg SIMPLE_RADIAL 1600 1200 1469.2 800 600 -0.0353019
query/day/nexus4/IMG_20140521_134213.jpg SIMPLE_RADIAL 1600 1200 1469.2 800 600 -0.0353019
query/day/nexus4/IMG_20130210_164513.jpg SIMPLE_RADIAL 1200 1600 1458.14 600 800 -0.0302454
query/day/nexus4/IMG_20130210_164534.jpg SIMPLE_RADIAL 1200 1600 1458.14 600 800 -0.0302454

1600x1200 have a set of intrinsics, 1200x1600 have another one.

GabbySuwichaya commented 4 years ago

Hi @mihaidusmanu , I see. Thank you very much. It is all cleared now.

Actually, I have one last question. From my understanding, the reference pose for the query images is withheld, which I respect this decision (ref. https://www.visuallocalization.net).

However, I only wonder if there is a way to quickly test whether or not the developed local features are working well on localization with this dataset (Aachen-day-night), Or is there any other equivalent or just a standard dataset will allow developer to access the reference pose?

mihaidusmanu commented 4 years ago

If you simply want to test your predictions, you can submit directly to the evaluation service available at https://www.visuallocalization.net/ and keep the submission hidden. Otherwise, if you need to have access to poses, you can use a validation split (i.e. randomly sample some database images as "query" and evaluate on these while developing your code).

GabbySuwichaya commented 4 years ago

I see. Thanks so much for your answers, insight, and the great supports. I will keep following your works and future contributions.

PS. The idea of sampling the database images as query is quit interesting. I will try :) .

Huang-NienPei commented 3 years ago

Please find my answers below:

  1. For the query images, we have used NetVLAD to retrieve top K database images. More precisely, I used https://github.com/Relja/netvlad/blob/master/serialAllFeats.m to compute 4096 dimensional features for both queries and database images and simply picked the closest K database descriptors for each query image.
  2. No, I do not use exhaustive matching. The dataset already provides poses for database images so I picked top 20 spatially nearby images for each database images - thus the number of database image pairs to match is around 20 x number of database images (supposing no overlap) which is significantly lower than exhaustive matching.
  3. The files released at https://github.com/tsattler/visuallocalizationbenchmark/tree/master/local_feature_evaluation are only for the Local Features challenge (i.e. Aachen Night only). Do no use them for the other tracks since these pairs were manually retrieved.
  4. Please find below the database to database pairs as well as query to database top 20 NetVLAD retrieved pairs. query_to_database_pairs_to_match_20.txt database_pairs_to_match.txt

Hi, for point 2, how do you get the 20 ''spatially'' nearby images for each database images? What information do you use?