cvg / pixel-perfect-sfm

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

IndexError: _Map_base::at when running demo.ipynb #70

Open SeyedAlirezaFatemi opened 2 years ago

SeyedAlirezaFatemi commented 2 years ago

Hi.

I get the following error when testing the demo.ipynb on another small dataset:

IndexError                                Traceback (most recent call last)
/tmp/ipykernel_5075/3412010250.py in <cell line: 1>()
----> 1 raw.align_points(refined, max_error=0.005, min_inlier_ratio=0.9, min_overlap=3)

IndexError: _Map_base::at

Here's the summary of the reconstruction:

Raw Reconstruction:
    num_reg_images = 25
    num_cameras = 1
    num_points3D = 1262
    num_observations = 4097
    mean_track_length = 3.24643
    mean_observations_per_image = 163.88
    mean_reprojection_error = 1.35567
Refined Reconstruction:
    num_reg_images = 24
    num_cameras = 1
    num_points3D = 1259
    num_observations = 4241
    mean_track_length = 3.36855
    mean_observations_per_image = 176.708
    mean_reprojection_error = 1.292

It worked OK on the demo dataset but not on my dataset. What could be the problem here?

sarlinpe commented 2 years ago
  1. @Phil26AT Could this be due to the fact that some images could not be registered in both models? 24 vs 25. I thought that AlignPointsBetweenReconstructions should already handle this case.
  2. This is an interesting failure case of pixsfm, as there is one image it cannot manage to register. @SeyedAlirezaFatemi anything difficult with your dataset? could you look into which image is it? how many observations does it have in the unrefined model?