cvg / pixel-perfect-sfm

Pixel-Perfect Structure-from-Motion with Featuremetric Refinement (ICCV 2021, Best Student Paper Award)
Apache License 2.0
1.34k stars 139 forks source link

Aborted (core dumped) during 3D reconstruction #71

Closed CCOSerika closed 2 years ago

CCOSerika commented 2 years ago

Hi, author. I met the issue when testing the demo.ipynb. The complete info is as follows.

10 mapping images
[2022/09/20 14:58:31 hloc INFO] Extracting local features with configuration:
{'model': {'max_keypoints': 4096, 'name': 'superpoint', 'nms_radius': 3},
 'output': 'feats-superpoint-n4096-r1024',
 'preprocessing': {'grayscale': True, 'resize_max': 1024}}
[2022/09/20 14:58:31 hloc INFO] Skipping the extraction.
[2022/09/20 14:58:31 hloc INFO] Found 45 pairs.
[2022/09/20 14:58:31 hloc INFO] Matching local features with configuration:
{'model': {'name': 'superglue',
           'sinkhorn_iterations': 50,
           'weights': 'outdoor'},
 'output': 'matches-superglue'}
[2022/09/20 14:58:31 hloc INFO] Skipping the matching.
[2022/09/20 14:58:32 pixsfm.features.models.s2dnet INFO] Loading S2DNet checkpoint at /media/.../pixel-perfect-sfm-fix-ceres-v2.2.0/pixsfm/features/models/checkpoints/s2dnet_weights.pth.
[2022/09/20 14:58:35 pixsfm INFO] Loaded dense extractor with configuration:
{'cache_format': 'chunked',
 'device': 'auto',
 'dtype': 'half',
 'fast_image_load': False,
 'l2_normalize': True,
 'load_cache_on_init': False,
 'max_edge': 1024,
 'model': {'name': 's2dnet'},
 'overwrite_cache': False,
 'patch_size': 16,
 'pyr_scales': [1.0],
 'resize': 'LANCZOS',
 'sparse': True,
 'use_cache': False}
[2022/09/20 14:58:35 pixsfm INFO] Building matching graph...
[2022/09/20 14:58:35 pixsfm INFO] Extracting dense features...
  0%|          | 0/10 [00:00<?, ?it/s]
[2022/09/20 14:58:36 pixsfm INFO] Computing tracks...
[2022/09/20 14:58:36 pixsfm INFO] # graph nodes: 10930
[2022/09/20 14:58:36 pixsfm INFO] # graph edges: 17944
[2022/09/20 14:58:36 pixsfm INFO] # tracks: 3227
[2022/09/20 14:58:36 pixsfm INFO] Start feature-metric keypoint adjustment.
100%[████████████████████] 10930/10930 [00:01, 7852.01it/s]
[2022/09/20 14:58:37 pixsfm INFO] KA Time: 1.39268s, cost change: 0.0232016 --> 0.0213704
[2022/09/20 14:58:37 hloc WARNING] The database already exists, deleting it.
[2022/09/20 14:58:37 hloc INFO] Creating an empty database...
[2022/09/20 14:58:38 hloc INFO] Importing images into the database...
[2022/09/20 14:58:38 hloc INFO] Importing features into the database...
  0%|          | 0/10 [00:00<?, ?it/s]
[2022/09/20 14:58:38 hloc INFO] Importing matches into the database...
  0%|          | 0/45 [00:00<?, ?it/s]
[2022/09/20 14:58:38 hloc INFO] Performing geometric verification of the matches...
[2022/09/20 14:58:39 hloc INFO] Running 3D reconstruction...
Aborted (core dumped)

I checked the code and found the issue lies in pycolmap.incremental_mapping. Any ideas to solve it?

ubuntu18.04 cuda11.1 python3.8 torch1.8.1+cu111 torchvision0.9.1+cu111 colmap and pycolmap are all installed from source.

sarlinpe commented 2 years ago

Can you please report the output of the reconstruction step in verbose mode?

refined, sfm_outputs = sfm.reconstruction(..., verbose=True)
CCOSerika commented 2 years ago

The output is as follows.

[2022/09/20 16:40:02 hloc INFO] Performing geometric verification of the matches...

==============================================================================
Custom feature matching
==============================================================================

Matching block [1/1] in 0.831s
Elapsed time: 0.014 [minutes]
[2022/09/20 16:40:03 hloc INFO] Running 3D reconstruction...

==============================================================================
Loading database
==============================================================================

Loading cameras... 10 in 0.000s
Loading matches... 45 in 0.000s
Loading images... 10 in 0.001s (connected 10)
Building correspondence graph... in 0.003s (ignored 0)

Elapsed time: 0.000 [minutes]

==============================================================================
Finding good initial image pair
==============================================================================

==============================================================================
Initializing with image pair #9 and #8
==============================================================================

==============================================================================
Global bundle adjustment
==============================================================================

Aborted (core dumped)
CCOSerika commented 2 years ago

I run it successfully on the other computer. Maybe the inconsistent versions of dependencies caused this issue. Thanx a lot for ur work.