cvg / Hierarchical-Localization

Visual localization made easy with hloc
Apache License 2.0
3.2k stars 593 forks source link

error run pipeline_Aachen.ipynb #91

Closed xdw-123 closed 3 years ago

xdw-123 commented 3 years ago

Dear author, I'm sorry to disturb you in my busy schedule. It's my runipy pipeline_ The following error occurred in aachen.ipynb. I don't know what to do. I want to ask you and look forward to your reply.[runipy pipeline_Aachen.ipynb **runipy pipeline_Aachen.ipynb 08/23/2021 05:15:29 PM INFO: Reading notebook pipeline_Aachen.ipynb 08/23/2021 05:15:30 PM INFO: Running cell: %load_ext autoreload %autoreload 2

from pathlib import Path from pprint import pformat

from hloc import extract_features, match_features, pairs_from_covisibility from hloc import colmap_from_nvm, triangulation, localize_sfm, visualization

08/23/2021 05:15:31 PM INFO: Cell returned 08/23/2021 05:15:31 PM INFO: Running cell: dataset = Path('datasets/aachen/') # change this if your dataset is somewhere else images = dataset / 'images/images_upright/'

pairs = Path('pairs/aachen/') sfm_pairs = pairs / 'pairs-db-covis20.txt' # top 20 most covisible in SIFT model loc_pairs = pairs / 'pairs-query-netvlad50.txt' # top 50 retrieved by NetVLAD

outputs = Path('outputs/aachen/') # where everything will be saved reference_sfm = outputs / 'sfm_superpoint+superglue' # the SfM model we will build results = outputs / 'Aachen_hloc_superpoint+superglue_netvlad50.txt' # the result file

08/23/2021 05:15:31 PM INFO: Cell returned 08/23/2021 05:15:31 PM INFO: Running cell:

list the standard configurations available

print(f'Configs for feature extractors:\n{pformat(extract_features.confs)}') print(f'Configs for feature matchers:\n{pformat(match_features.confs)}')

08/23/2021 05:15:31 PM INFO: Cell returned 08/23/2021 05:15:31 PM INFO: Running cell:

pick one of the configurations for extraction and matching

you can also simply write your own here!

feature_conf = extract_features.confs['superpoint_aachen'] matcher_conf = match_features.confs['superglue']

08/23/2021 05:15:31 PM INFO: Cell returned 08/23/2021 05:15:31 PM INFO: Running cell: feature_path = extract_features.main(feature_conf, images, outputs)

08/23/2021 05:15:34 PM INFO: Cell returned 08/23/2021 05:15:34 PM INFO: Running cell: colmap_from_nvm.main( dataset / '3D-models/aachen_cvpr2018_db.nvm', dataset / '3D-models/database_intrinsics.txt', dataset / 'aachen.db', outputs / 'sfm_sift')

pairs_from_covisibility.main( outputs / 'sfm_sift', sfm_pairs, num_matched=20)

08/23/2021 05:18:52 PM INFO: Cell returned 08/23/2021 05:18:52 PM INFO: Running cell: sfm_match_path = match_features.main(matcher_conf, sfm_pairs, feature_conf['output'], outputs)

08/23/2021 10:09:49 PM INFO: Cell returned Traceback (most recent call last): File "/home/hzh005/.local/bin/runipy", line 8, in sys.exit(main()) File "/home/hzh005/.local/lib/python3.8/site-packages/runipy/main.py", line 158, in main nb_runner.run_notebook(skip_exceptions=args.skip_exceptions) File "/home/hzh005/.local/lib/python3.8/site-packages/runipy/notebook_runner.py", line 232, in run_notebook self.run_cell(cell) File "/home/hzh005/.local/lib/python3.8/site-packages/runipy/notebook_runner.py", line 151, in run_cell msg = self.kc.get_iopub_msg(timeout=1) File "/home/hzh005/.local/lib/python3.8/site-packages/jupyter_client/utils.py", line 25, in wrapped return loop.run_until_complete(coro(*args, *kwargs)) File "/home/hzh005/.local/lib/python3.8/site-packages/nest_asyncio.py", line 70, in run_until_complete return f.result() File "/usr/lib/python3.8/asyncio/futures.py", line 178, in result raise self._exception File "/usr/lib/python3.8/asyncio/tasks.py", line 280, in __step result = coro.send(None) File "/home/hzh005/.local/lib/python3.8/site-packages/jupyter_client/client.py", line 125, in _async_get_iopub_msg return await self.iopub_channel.get_msg(args, kwargs) File "/home/hzh005/.local/lib/python3.8/site-packages/jupyter_client/channels.py", line 230, in get_msg raise Empty _queue.Empty

sarlinpe commented 3 years ago

runipy is depreacted and unmaintained. The preferred way of running notebooks from the command line is now nbconvert with the --execute flag: https://nbconvert.readthedocs.io/en/latest/execute_api.html