cvg / Hierarchical-Localization

Visual localization made easy with hloc
Apache License 2.0
3.21k stars 596 forks source link

Steps with my own indoor data #274

Open MrCorsair3 opened 1 year ago

MrCorsair3 commented 1 year ago

Hello, thanks for really great work. I would like to use your algohorithm to match/find simillar scenes in the indoor photos. I think hloc is the tool I need but I'm having problem with correctly run yours demo code in the colab notebook.

This is my doubts and problems:

                "215 loader = torch.utils.data.DataLoader(
                    216     dataset, num_workers=5, batch_size=1, shuffle=False, pin_memory=True)
                    217 writer_queue = WorkQueue(partial(writer_fn, match_path=match_path), 5)
                --> 219 for idx, data in enumerate(tqdm(loader, smoothing=.1)):
                    220     data = {k: v if k.startswith('image')
                    221             else v.to(device, non_blocking=True) for k, v in data.items()}
                    222     pred = model(data)
                ...
                  File "h5py[/_objects.pyx](https://file+.vscode-resource.vscode-cdn.net/_objects.pyx)", line 54, in h5py._objects.with_phil.wrapper
                  File "h5py[/_objects.pyx](https://file+.vscode-resource.vscode-cdn.net/_objects.pyx)", line 55, in h5py._objects.with_phil.wrapper
                  File "h5py[/h5o.pyx](https://file+.vscode-resource.vscode-cdn.net/h5o.pyx)", line 190, in h5py.h5o.open
                KeyError: 'Unable to open object (component not found)' " 

To resolve it I think I have to use script 'hloc/pairs_from_retrieval.py' berofe, I have right ? If yes then why,

I know that's a lot of questions, but the answers to them would be helpful for me. Thanks in advance for your help and best regards.

sarlinpe commented 1 year ago

Sorry for the late reply. The inloc pipeline requires 3D scan for the references images and is thus not applicable to simple image collections. The demo notebook demo.ipynb should be sufficient for you. Can you give it a try?

We provide pair lists for common datasets so that users do not need to re-compute them. This is not applicable to custom datasets.