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

missing thirdparty, cannot use matchers like lightglue/superglue #2

Closed
1 task done
pablovela5620 opened this issue May 7, 2024 · 7 comments
Closed
1 task done
Labels
bug Something isn't working

Comments

@pablovela5620
Copy link

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

Usually when I install hloc from source to use it I have to do a recursive clone to get things like the superpoint/superglue/lightglue network

File "/home/pablo/0Dev/personal/forked-repos/nerfstudio/.pixi/envs/default/lib/python3.10/site-packages/hloc/matchers/lightglue.py", line 2, in
from lightglue import LightGlue as LightGlue_
ModuleNotFoundError: No module named 'lightglue'
Screenshot from 2024-05-06 19-18-14

it seems like the third-party folder is missing.

Installed packages

I'm using pixi (which uses conda under the hood). this is what `pixi list` looks like

[dependencies]
python = "3.10.*"
pip = ">=24.0,<25"
cuda = {version = "*", channel="nvidia/label/cuda-11.8.0"}
pytorch-cuda = {version = "11.8.*", channel="pytorch"}
pytorch = {version = ">=2.2.0,<2.3", channel="pytorch"}
torchvision = {version = ">=0.17.0,<0.18", channel="pytorch"}
pyarrow = ">=15.0.2,<15.1"
colmap = ">=3.9.1,<3.10"
hloc = ">=1.4,<2"


### Environment info

```shell
pixi info

(nerfstudio) pablo@pablo-ubuntu:~/0Dev/personal/forked-repos/nerfstudio$ pixi info
      Pixi version: 0.19.1
          Platform: linux-64
  Virtual packages: __unix=0=0
                  : __linux=6.5.0=0
                  : __glibc=2.35=0
                  : __cuda=12.2=0
                  : __archspec=1=zen
         Cache dir: /home/pablo/.cache/rattler/cache
      Auth storage: /home/pablo/.rattler/credentials.json

Project
------------
           Version: 1.0.3
     Manifest file: /home/pablo/0Dev/personal/forked-repos/nerfstudio/pixi.toml
  Config locations: 
      Last updated: 06-05-2024 19:19:20

Environments
------------
       Environment: default
          Features: default
          Channels: nvidia/label/cuda-11.8.0, nvidia, conda-forge, pytorch
  Dependency count: 9
      Dependencies: python, pip, cuda, pytorch-cuda, pytorch, torchvision, pyarrow, colmap, hloc
 PyPI Dependencies: nerfstudio
  Target platforms: linux-64
             Tasks: tcnn-install
@pablovela5620 pablovela5620 added the bug Something isn't working label May 7, 2024
@Tobias-Fischer
Copy link
Contributor

In conda-forge, we shouldn't add third-party dependencies. Instead, we should package them separately and add them as dependencies. You can open an issue in https://github.com/conda-forge/staged-recipes or better add a PR that adds lightglue in that repo :)

@pablovela5620
Copy link
Author

Thank you for the quick reply! Let me see if I fully understand, In order for me to use the reconstruction/keypoint detection/matching functions in hloc with light glue via conda (assuming only lightglue and not any other third-party matcher/extractor dependencies) I would need to

Lightglue PR

  1. Replace the current lightglue @ git+https://github.com/cvg/LightGlue in the requirements.txt with a packaged version (I think this would also mean I would need to get the authors of lightglue to create a pip wheel that is available via pypi?) or potentially with the kornia implementation since kornia is already a dep
  2. Have the PR accepted + get a version bump of hloc so that the condafeedstock can get updated?

I'm fairly new to the packaging world outside of just being a user, so apologies if I'm asking the wrong questions!

@Tobias-Fischer
Copy link
Contributor

Hi @pablovela5620 - sorry, I completely forgot to get back to you about this.

1.1 Yes, correct, ideally we would need to package lightglue here on conda-forge. This will not necessarily need a pypi release, but a release on GitHub. I created an issue: cvg/LightGlue#129
1.2 I am not sure what you mean with the kornia implementation. Do they include lightglue? kornia is already packaged on conda-forge, that would simplify things.
2. That's correct

I'm happy to help/provide input, but currently don't have the capacity to take the lead on this.

Best, Tobi

@pablovela5620
Copy link
Author

I'd be happy to lead this, once there's a github release for lightglue I'll make a PR to use the Kornia lightglue matcher (they do indeed have lightglue already included) https://kornia.readthedocs.io/en/stable/feature.html#kornia.feature.LightGlueMatcher

@Tobias-Fischer
Copy link
Contributor

Hi @pablovela5620 - I've had a closer look at this. kornia implements its own version of LightGlue, which is independent (but based on) the original authors' code. I've also started a pull request to get the original LightGlue to conda-forge: conda-forge/staged-recipes#27052

@Tobias-Fischer
Copy link
Contributor

I've added a dependency to LightGlue in #4

The other third_party things are not trivial to add; if you need them, you can follow similar steps as for LightGlue.

@pablovela5620
Copy link
Author

Awesome, Thank you for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants