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

Pipeline for custom data #315

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

SagarB-97
Copy link

I was looking to use hloc for following usecase which is not uncommon in vision-based localization:

  • A 'map creator' creates a 'ground-truth map' of a place using a sequence of images.
  • New users use this map to localize their own new images (without altering the data and features in the ground-truth map).

However, I think the examples provided don't directly address this usecase, as they are mostly written to evaluate hloc on datasets. As a result, the reference images and query images are tightly coupled. For example, in pipeline_Aachen.ipynb, the features for both the reference and query images are extracted together. Localizing query images wihtout updating the ground-truth data (eg. features db) requires changing the code.
While the notebook demo.ipynb achieves something to this effect, it uses exhaustive matching which is impractical for most usecases.
I have added pipeline_custom.ipynb that demonstrates how to use hloc for one's own data (with some very small changes to the hloc APIs).

If this is useful, I can add more documentation on how to generate one's own data (eg. generating colmap SfM model) if needed.

@@ -67,6 +67,35 @@ def pairs_from_score_matrix(scores: torch.Tensor,
return pairs


def save_global_candidates_for_query(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this function needed? why isn't pairs_from_retrieval.main sufficient?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, pairs_from_retreival.main is sufficient. I will rewrite my example and push once I get the chance.

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

Successfully merging this pull request may close these issues.

2 participants