Skip to content
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

Visual Localization config #55

Open
boyagesmile opened this issue Dec 7, 2024 · 7 comments
Open

Visual Localization config #55

boyagesmile opened this issue Dec 7, 2024 · 7 comments

Comments

@boyagesmile
Copy link

I use the Hierarchical-Localization to test acchen and inloc dataset. But the reslut is not perform good than Loftr by uisng the same configs. I wonder to know the configs such as the threshold for coarse matching. For Inloc test, do you use the model trained by megadepth?
while I use demo for test, i found in the same configs, the 3D model reconstruction by Eloftr get less point, is it right?
the reconstrction by eloftr:

Reconstruction:
	num_cameras = 10
	num_images = 10
	num_reg_images = 10
	num_points3D = 3988
	num_observations = 12328
	mean_track_length = 3.09127
	mean_observations_per_image = 1232.8
	mean_reprojection_error = 0.43195
	num_input_images = 10

while the reconstruviont by loftr:
Reconstruction:

	num_cameras = 10
	num_images = 10
	num_reg_images = 10
	num_points3D = 10706
	num_observations = 48751
	mean_track_length = 4.55361
	mean_observations_per_image = 4875.1
	mean_reprojection_error = 0.586661
	num_input_images = 10

by use the same config:

    "loftr": {
        "output": "matches-loftr",
        "model": {"name": "loftr", "weights": "outdoor"},
        "preprocessing": {"grayscale": True, "resize_max": 1024, "dfactor": 8},
        "max_error": 1,  # max error for assigned keypoints (in px)
        "cell_size": 1,  # size of quantization patch (max 1 kp/patch)
    },

and the coarse matching thresold is 0.2.

@wyf2020
Copy link
Contributor

wyf2020 commented Dec 11, 2024

We use the outdoor model on Inloc, and all results in the paper are obtained using the publicly available outdoor trained model. Thresholds of 0.1 and 0.2 are both reasonable and can serve as a trade-off between the number of points and precision. We suggest further adjusting the "max_error" and "cell_size" to control the trade-off between track-length and precision.

@boyagesmile
Copy link
Author

Loftr didn't use sub-pixel predictions for db-db pairs by using round() while testing the Visual Localization Work. I wonder to know how do you deal with the EfficientLoftr to keep different keyframe pairs produce variance keypoints for one keyframe.

@wyf2020
Copy link
Contributor

wyf2020 commented Dec 11, 2024

We use the merge strategy provided by hloc match_dense.py to handle sub-pixel predictions.

@boyagesmile
Copy link
Author

I am trying to reproduce the implementation on acchen by use the config :

    "eloftr_aachen": {
        "output": "matches-eloftr_aachen",
        "model": {"name": "eloftr", "weights": "outdoor"},
        "preprocessing": {"grayscale": True, "resize_max": 1024, "dfactor": 32},
        "max_error": 2,  # max error for assigned keypoints (in px)
        "cell_size": 8,  # size of quantization patch (max 1 kp/patch)  #6
    }

The parameter combinations I tried for the max_marror and cell_size are: "1,1", "2,8", "4,4", "3,8", "4,8", "5,8", "6,8", "7,8", "8,8". It cannot achieve the accuracy of Eloftr. However, the loftr can acieve the accuracy by using the config "2,8".
Did you conduct the experiment on HLOC? Do you have any good suggestions for adjusting parameters? I think the “cell_size” should be eval to 8 due to the coarse matching method. The max_error should be larger than 8 due to the finetuning method? The best result I got is "88.6 / 95.1 / 98.5 74.9 / 90.6 / 99.5", while max_error=4, cell_size=8, coarse matching threshold = 0.2. There is a significant gap with the conclusion of the paper.

@wyf2020
Copy link
Contributor

wyf2020 commented Dec 11, 2024

Regarding the adjustment of hyperparameters, my suggestion is that cell_size does not necessarily have to be 8; it can be smaller, such as 1, 2, or 4. For max_error, I suggest it should be equal to cell_size or a fraction of cell_size like 1/2, 1/4, etc. Moreover, the results from our paper can be seen on the benchmark.

@boyagesmile
Copy link
Author

Thank you for your answer. I will try it.
I wonder to know if the Eloftr's Aachen evaluation result was obatained by Hloc or other codes?

@wyf2020
Copy link
Contributor

wyf2020 commented Dec 11, 2024

Our results on Aachen and Inloc were obtained by HLoc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants