OpenDroneMap / ODM

A command line toolkit to generate maps, point clouds, 3D models and DEMs from drone, balloon or kite images. 📷

Home Page:https://opendronemap.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possible Bug: Rolling Shutter Correction unable to handle non-Geolocated Imagery

Saijin-Naib opened this issue · comments

How did you install ODM? (Docker, installer, natively, ...)?

Docker, latest pull as of 2023-03-15.

What is the problem?

Consistent failure to process a sample dataset with RSC enabled, though it processes fine with same settings otherwise (and RSC disabled). Sensor readout is accurate and present in our database.

What should be the expected behavior? If this is a feature request, please describe in detail the changes you think should be made to the code, citing files and lines where changes should be made, if possible.

If RSC can't work with non-geolocated imagery, a graceful fallback or fixed up error message that is more meaningful would be helpful.

How can we reproduce this? What steps did you do to trigger the problem? If this is an issue with processing a dataset, YOU MUST include a copy of your dataset AND task output log, uploaded on Google Drive or Dropbox (otherwise we cannot reproduce this).

Console Log:

[INFO]    Initializing ODM 3.0.5 - Thu Mar 16 05:06:28  2023
[INFO]    ==============
[INFO]    3d_tiles: False
[INFO]    align: None
[INFO]    auto_boundary: True
[INFO]    auto_boundary_distance: 0
[INFO]    bg_removal: True
[INFO]    boundary: {}
[INFO]    build_overviews: False
[INFO]    camera_lens: auto
[INFO]    cameras: {}
[INFO]    cog: True
[INFO]    copy_to: None
[INFO]    crop: 3
[INFO]    dem_decimation: 1
[INFO]    dem_euclidean_map: False
[INFO]    dem_gapfill_steps: 3
[INFO]    dem_resolution: 5
[INFO]    dsm: False
[INFO]    dtm: False
[INFO]    end_with: odm_postprocess
[INFO]    fast_orthophoto: False
[INFO]    feature_quality: ultra
[INFO]    feature_type: hahog
[INFO]    force_gps: False
[INFO]    gcp: None
[INFO]    geo: None
[INFO]    gltf: True
[INFO]    gps_accuracy: 10
[INFO]    ignore_gsd: False
[INFO]    matcher_neighbors: 64
[INFO]    matcher_type: bow
[INFO]    max_concurrency: 8
[INFO]    merge: all
[INFO]    mesh_octree_depth: 11
[INFO]    mesh_size: 200000
[INFO]    min_num_features: 128000
[INFO]    name: d6e61ec5-946e-42b5-92c0-39f6944f3c32
[INFO]    no_gpu: False
[INFO]    optimize_disk_space: False
[INFO]    orthophoto_compression: DEFLATE
[INFO]    orthophoto_cutline: False
[INFO]    orthophoto_kmz: False
[INFO]    orthophoto_no_tiled: False
[INFO]    orthophoto_png: False
[INFO]    orthophoto_resolution: 5
[INFO]    pc_classify: False
[INFO]    pc_copc: False
[INFO]    pc_csv: False
[INFO]    pc_ept: True
[INFO]    pc_filter: 0.0
[INFO]    pc_las: False
[INFO]    pc_quality: ultra
[INFO]    pc_rectify: False
[INFO]    pc_sample: 0
[INFO]    pc_skip_geometric: False
[INFO]    pc_tile: False
[INFO]    primary_band: auto
[INFO]    project_path: /var/www/data
[INFO]    radiometric_calibration: none
[INFO]    rerun: None
[INFO]    rerun_all: False
[INFO]    rerun_from: ['odm_postprocess']
[INFO]    rolling_shutter: True
[INFO]    rolling_shutter_readout: 0
[INFO]    sfm_algorithm: incremental
[INFO]    skip_3dmodel: True
[INFO]    skip_band_alignment: True
[INFO]    skip_orthophoto: True
[INFO]    skip_report: True
[INFO]    sky_removal: True
[INFO]    sm_cluster: None
[INFO]    sm_no_align: False
[INFO]    smrf_scalar: 1.25
[INFO]    smrf_slope: 0.15
[INFO]    smrf_threshold: 0.5
[INFO]    smrf_window: 18.0
[INFO]    split: 999999
[INFO]    split_image_groups: None
[INFO]    split_overlap: 150
[INFO]    texturing_keep_unseen_faces: False
[INFO]    texturing_single_material: False
[INFO]    texturing_skip_global_seam_leveling: False
[INFO]    texturing_skip_local_seam_leveling: False
[INFO]    tiles: False
[INFO]    use_3dmesh: False
[INFO]    use_exif: False
[INFO]    use_fixed_camera_params: False
[INFO]    use_hybrid_bundle_adjustment: False
[INFO]    video_limit: 500
[INFO]    video_resolution: 4000
[INFO]    ==============
[INFO]    Running dataset stage
[INFO]    Loading dataset from: /var/www/data/d6e61ec5-946e-42b5-92c0-39f6944f3c32/images
[INFO]    Loading images database: /var/www/data/d6e61ec5-946e-42b5-92c0-39f6944f3c32/images.json
[INFO]    Found 50 usable images
[WARNING] GPS position not available for 2023-03-15_11.29.46_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.36_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.30.16_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.44_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.03_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.52_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.51_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.55_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.35_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.58_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.30.00_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.43_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.20_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.40_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.30.03_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.42_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.50_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.22_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.34_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.26_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.29_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.53_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.38_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.39_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.41_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.30.01_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.23_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.25_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.10_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.47_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.31_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.30_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.30.13_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.30.08_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.33_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.57_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.56_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.17_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.28_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.45_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.59_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.19_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.37_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.14_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.49_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.30.18_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.27_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.30.17_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.07_X-T2.jpg
[WARNING] GPS position not available for 2023-03-15_11.29.48_X-T2.jpg
[WARNING] Could not generate coordinates file. The orthophoto will not be georeferenced.
[INFO]    Finished dataset stage
[INFO]    Running split stage
[INFO]    Normal dataset, will process all at once.
[INFO]    Finished split stage
[INFO]    Running merge stage
[INFO]    Normal dataset, nothing to merge.
[INFO]    Finished merge stage
[INFO]    Running opensfm stage
[WARNING] /var/www/data/d6e61ec5-946e-42b5-92c0-39f6944f3c32/opensfm/image_list.txt already exists, not rerunning OpenSfM setup
[WARNING] /var/www/data/d6e61ec5-946e-42b5-92c0-39f6944f3c32/opensfm/exif already exists, not rerunning photo to metadata
[WARNING] Detect features already done: /var/www/data/d6e61ec5-946e-42b5-92c0-39f6944f3c32/opensfm/features exists
[WARNING] Match features already done: /var/www/data/d6e61ec5-946e-42b5-92c0-39f6944f3c32/opensfm/matches exists
[WARNING] Found a valid OpenSfM tracks file in: /var/www/data/d6e61ec5-946e-42b5-92c0-39f6944f3c32/opensfm/tracks.csv
[WARNING] Found a valid OpenSfM reconstruction file in: /var/www/data/d6e61ec5-946e-42b5-92c0-39f6944f3c32/opensfm/reconstruction.json
[INFO]    running "/code/SuperBuild/install/bin/opensfm/bin/opensfm" rs_correct "/var/www/data/d6e61ec5-946e-42b5-92c0-39f6944f3c32/opensfm"
2023-03-16 05:06:28,817 INFO: Starting rolling shutter correction
2023-03-16 05:06:29,579 INFO: Estimating camera velocities
2023-03-16 05:06:29,581 INFO: Computing from camera poses
2023-03-16 05:06:29,581 INFO: 2023-03-15_11.29.03_X-T2.jpg (+0.00,+0.00,+0.00) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.07_X-T2.jpg (-1.26,+1.08,+0.03) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.10_X-T2.jpg (-2.66,+1.91,-0.00) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.14_X-T2.jpg (-2.27,+0.89,-0.01) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.17_X-T2.jpg (-2.90,+0.34,-0.06) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.19_X-T2.jpg (-3.72,-0.41,-0.03) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.20_X-T2.jpg (-6.06,-3.13,-0.01) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.22_X-T2.jpg (-2.90,-1.89,-0.07) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.23_X-T2.jpg (-4.82,-4.53,-0.04) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.25_X-T2.jpg (-1.67,-2.40,-0.02) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.26_X-T2.jpg (-2.18,-5.15,-0.06) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.27_X-T2.jpg (-1.60,-5.23,-0.00) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.28_X-T2.jpg (-0.24,-6.36,-0.17) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.29_X-T2.jpg (+0.56,-4.93,+0.01) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.30_X-T2.jpg (+1.48,-4.80,-0.03) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.31_X-T2.jpg (+2.83,-4.39,-0.03) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.33_X-T2.jpg (+1.86,-1.99,+0.02) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.34_X-T2.jpg (+3.72,-3.26,+0.00) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.35_X-T2.jpg (+3.78,-3.34,-0.03) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.36_X-T2.jpg (+3.15,-2.30,+0.02) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.37_X-T2.jpg (+4.44,-2.05,+0.02) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.38_X-T2.jpg (+4.70,-1.33,+0.09) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.39_X-T2.jpg (+4.12,-1.01,+0.11) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.40_X-T2.jpg (+4.87,-0.39,+0.05) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.41_X-T2.jpg (+3.35,+0.17,-0.01) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.42_X-T2.jpg (+3.79,+0.60,+0.14) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.43_X-T2.jpg (+4.49,+1.63,+0.03) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.44_X-T2.jpg (+3.86,+1.90,-0.01) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.45_X-T2.jpg (+3.32,+2.35,-0.04) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.46_X-T2.jpg (+3.16,+3.37,+0.10) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.47_X-T2.jpg (+2.96,+4.25,-0.03) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.48_X-T2.jpg (+2.29,+4.15,+0.03) m/s
2023-03-16 05:06:29,582 INFO: 2023-03-15_11.29.49_X-T2.jpg (+2.14,+4.35,-0.05) m/s
2023-03-16 05:06:29,583 INFO: 2023-03-15_11.29.50_X-T2.jpg (+1.12,+4.64,-0.02) m/s
2023-03-16 05:06:29,583 INFO: 2023-03-15_11.29.51_X-T2.jpg (+0.05,+4.76,-0.03) m/s
2023-03-16 05:06:29,583 INFO: 2023-03-15_11.29.52_X-T2.jpg (+0.14,+4.56,-0.01) m/s
2023-03-16 05:06:29,583 INFO: 2023-03-15_11.29.53_X-T2.jpg (-0.26,+3.73,+0.11) m/s
2023-03-16 05:06:29,583 INFO: 2023-03-15_11.29.55_X-T2.jpg (-0.31,+2.39,+0.03) m/s
2023-03-16 05:06:29,583 INFO: 2023-03-15_11.29.56_X-T2.jpg (-1.89,+3.73,+0.02) m/s
2023-03-16 05:06:29,583 INFO: 2023-03-15_11.29.57_X-T2.jpg (-3.17,+3.58,+0.06) m/s
2023-03-16 05:06:29,583 INFO: 2023-03-15_11.29.58_X-T2.jpg (-3.11,+3.22,+0.07) m/s
2023-03-16 05:06:29,583 INFO: 2023-03-15_11.29.59_X-T2.jpg (-3.63,+2.93,+0.01) m/s
2023-03-16 05:06:29,583 INFO: 2023-03-15_11.30.00_X-T2.jpg (-4.02,+2.56,-0.05) m/s
2023-03-16 05:06:29,583 INFO: 2023-03-15_11.30.01_X-T2.jpg (-3.95,+1.57,-0.00) m/s
2023-03-16 05:06:29,583 INFO: 2023-03-15_11.30.03_X-T2.jpg (-2.33,+0.73,-0.03) m/s
2023-03-16 05:06:29,583 INFO: 2023-03-15_11.30.08_X-T2.jpg (-1.22,+0.14,+0.01) m/s
2023-03-16 05:06:29,583 INFO: 2023-03-15_11.30.13_X-T2.jpg (-1.59,+0.13,-0.01) m/s
2023-03-16 05:06:29,583 INFO: 2023-03-15_11.30.16_X-T2.jpg (-3.36,-0.49,-0.06) m/s
2023-03-16 05:06:29,583 INFO: 2023-03-15_11.30.17_X-T2.jpg (-4.37,-3.04,-0.07) m/s
2023-03-16 05:06:29,583 INFO: 2023-03-15_11.30.18_X-T2.jpg (-4.25,-3.03,-0.00) m/s
2023-03-16 05:06:29,583 INFO: Correcting observations...
Traceback (most recent call last):
File "/code/SuperBuild/install/bin/opensfm/bin/opensfm_main.py", line 25, in <module>
commands.command_runner(
File "/code/SuperBuild/install/bin/opensfm/opensfm/commands/command_runner.py", line 38, in command_runner
command.run(data, args)
File "/code/SuperBuild/install/bin/opensfm/opensfm/commands/command.py", line 13, in run
self.run_impl(data, args)
File "/code/SuperBuild/install/bin/opensfm/opensfm/commands/rs_correct.py", line 13, in run_impl
rs_correct.run_dataset(dataset, args.rolling_shutter_readout)
File "/code/SuperBuild/install/bin/opensfm/opensfm/actions/rs_correct.py", line 138, in run_dataset
features[shot_id].points[ob.id][:2] = corrected_point
IndexError: index 10317 is out of bounds for axis 0 with size 5614

===== Dumping Info for Geeks (developers need this to fix bugs) =====
Child returned 1
Traceback (most recent call last):
File "/code/stages/odm_app.py", line 81, in execute
self.first_stage.run()
File "/code/opendm/types.py", line 397, in run
self.next_stage.run(outputs)
File "/code/opendm/types.py", line 397, in run
self.next_stage.run(outputs)
File "/code/opendm/types.py", line 397, in run
self.next_stage.run(outputs)
File "/code/opendm/types.py", line 376, in run
self.process(self.args, outputs)
File "/code/stages/run_opensfm.py", line 38, in process
octx.reconstruct(args.rolling_shutter, self.rerun())
File "/code/opendm/osfm.py", line 73, in reconstruct
self.run('rs_correct')
File "/code/opendm/osfm.py", line 34, in run
system.run('"%s" %s "%s"' %
File "/code/opendm/system.py", line 110, in run
raise SubprocessException("Child returned {}".format(retcode), retcode)
opendm.system.SubprocessException: Child returned 1

===== Done, human-readable information to follow... =====

[ERROR]   Uh oh! Processing stopped because of strange values in the reconstruction. This is often a sign that the input data has some issues or the software cannot deal with it. Have you followed best practices for data acquisition? See https://docs.opendronemap.org/flying/

Imagery:
Upon request (Contains PII)

Yep, we shouldn't allow RSC if there's no geographic reference (it's not doable).

Which is a shame because the velocities it resolved actually make a ton of sense and seem correct. I was side-stepping around the subject at a pretty good pace, with some pauses here and there.

Is there really no way to have the cake and eat it too here?