Possible bug in ODM latest version

Hello Everyone! I am using opendronemap/odm:master to generate a simple orthomosaic Orthophoto to extract multispectral bands of Micasense Rededge M sample dataset. I think the latest version have a bug with added parameters of --radiometric-calibration=camera+sun.

docker run -ti --rm -v /home/username/datasets:/datasets opendronemap/odm:master --project-path /datasets project --radiometric-calibration camera+sun

Following is the output log of a simple ODM process.

docker run -ti --rm -v /home/avt/datasets:/datasets opendronemap/odm:master --project-path /datasets project --radiometric-calibration=camera+sun
[INFO] Initializing ODM - Thu Dec 10 12:19:56 2020
[INFO] ==============
[INFO] build_overviews: False
[INFO] camera_lens: auto
[INFO] cameras: {}
[INFO] crop: 3
[INFO] debug: False
[INFO] dem_decimation: 1
[INFO] dem_euclidean_map: False
[INFO] dem_gapfill_steps: 3
[INFO] dem_resolution: 5
[INFO] depthmap_resolution: 640
[INFO] dsm: False
[INFO] dtm: False
[INFO] end_with: odm_report
[INFO] fast_orthophoto: False
[INFO] feature_quality: high
[INFO] feature_type: sift
[INFO] force_gps: False
[INFO] gcp: None
[INFO] geo: None
[INFO] gps_accuracy: 10
[INFO] ignore_gsd: False
[INFO] matcher_distance: 0
[INFO] matcher_neighbors: 8
[INFO] matcher_type: flann
[INFO] max_concurrency: 8
[INFO] merge: all
[INFO] mesh_octree_depth: 10
[INFO] mesh_point_weight: 4
[INFO] mesh_samples: 1.0
[INFO] mesh_size: 200000
[INFO] min_num_features: 8000
[INFO] name: project
[INFO] opensfm_depthmap_method: PATCH_MATCH
[INFO] opensfm_depthmap_min_consistent_views: 3
[INFO] opensfm_depthmap_min_patch_sd: 1
[INFO] optimize_disk_space: False
[INFO] orthophoto_compression: DEFLATE
[INFO] orthophoto_cutline: False
[INFO] orthophoto_no_tiled: False
[INFO] orthophoto_png: False
[INFO] orthophoto_resolution: 5
[INFO] pc_classify: False
[INFO] pc_csv: False
[INFO] pc_ept: False
[INFO] pc_filter: 2.5
[INFO] pc_las: False
[INFO] pc_quality: medium
[INFO] pc_rectify: False
[INFO] pc_sample: 0
[INFO] primary_band: auto
[INFO] project_path: /datasets
[INFO] radiometric_calibration: camera+sun
[INFO] rerun: None
[INFO] rerun_all: False
[INFO] rerun_from: None
[INFO] resize_to: 2048
[INFO] skip_3dmodel: False
[INFO] sm_cluster: None
[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_multitracks: False
[INFO] split_overlap: 150
[INFO] texturing_data_term: gmi
[INFO] texturing_outlier_removal_type: gauss_clamping
[INFO] texturing_skip_global_seam_leveling: False
[INFO] texturing_skip_local_seam_leveling: False
[INFO] texturing_tone_mapping: none
[INFO] tiles: False
[INFO] time: False
[INFO] use_3dmesh: False
[INFO] use_exif: False
[INFO] use_fixed_camera_params: False
[INFO] use_hybrid_bundle_adjustment: False
[INFO] use_opensfm_dense: False
[INFO] verbose: False
[INFO] ==============
[INFO] Running dataset stage
[INFO] Loading dataset from: /datasets/project/images
[INFO] Loading 210 images
[INFO] Wrote images database: /datasets/project/images.json
[INFO] Found 210 usable images
[INFO] Parsing SRS header: WGS84 UTM 34N
[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
[INFO] Reconstruction will use 42 images from auto band
[INFO] Writing exif overrides
[INFO] Maximum photo dimensions: 1280px
[INFO] Altitude data detected, enabling it for GPS alignment
[INFO] [‘use_exif_size: no’, ‘flann_algorithm: KDTREE’, ‘feature_process_size: 640’, ‘feature_min_frames: 8000’, ‘processes: 8’, ‘matching_gps_neighbors: 8’, ‘matching_gps_distance: 0’, ‘depthmap_method: PATCH_MATCH’, ‘depthmap_resolution: 320’, ‘depthmap_min_patch_sd: 1’, ‘depthmap_min_consistent_views: 3’, ‘optimize_camera_parameters: yes’, ‘undistorted_image_format: tif’, ‘bundle_outlier_filtering_type: AUTO’, ‘align_orientation_prior: vertical’, ‘triangulation_type: ROBUST’, ‘feature_type: SIFT’, ‘use_altitude_tag: yes’, ‘align_method: auto’, ‘local_bundle_radius: 0’]
[INFO] running /code/SuperBuild/src/opensfm/bin/opensfm extract_metadata “/datasets/project/opensfm”

[ 7.1763722e-08 1.7066399e-07 1.0000000e+00]] (score: 4.929096304055055)
[INFO] IMG_0188_5.tif --> IMG_0188_1.tif good match
[INFO] IMG_0279_5.tif --> IMG_0279_1.tif good match
[INFO] IMG_0294_5.tif --> IMG_0294_1.tif good match
[INFO] IMG_0200_5.tif --> IMG_0200_1.tif good match
[INFO] IMG_0293_5.tif --> IMG_0293_1.tif good match
[INFO] Can’t use features matching, will use ECC (this might take a bit)
[INFO] IMG_0296_5.tif --> IMG_0296_1.tif good match
[INFO] IMG_0205_5.tif --> IMG_0205_1.tif good match
[INFO] IMG_0295_5.tif --> IMG_0295_1.tif good match
[INFO] IMG_0186_5.tif --> IMG_0186_1.tif good match
[INFO] IMG_0299_5.tif --> IMG_0299_1.tif good match
[INFO] IMG_0207_5.tif --> IMG_0207_1.tif good match
[INFO] IMG_0300_5.tif --> IMG_0300_1.tif good match
[INFO] IMG_0280_5.tif --> IMG_0280_1.tif good match
[INFO] IMG_0298_5.tif --> IMG_0298_1.tif good match
[INFO] Can’t use features matching, will use ECC (this might take a bit)
[INFO] IMG_0291_5.tif --> IMG_0291_1.tif good match
[INFO] IMG_0275_5.tif --> IMG_0275_1.tif good match
[INFO] IMG_0190_5.tif --> IMG_0190_1.tif good match
[INFO] IMG_0281_5.tif --> IMG_0281_1.tif good match
[INFO] IMG_0297_5.tif --> IMG_0297_1.tif good match
[INFO] IMG_0277_5.tif --> IMG_0277_1.tif good match
[INFO] IMG_0273_5.tif --> IMG_0273_1.tif good match
[INFO] IMG_0185_5.tif --> IMG_0185_1.tif good match
[INFO] IMG_0278_5.tif --> IMG_0278_1.tif good match
[INFO] IMG_0187_5.tif --> IMG_0187_1.tif good match
[INFO] IMG_0183_5.tif --> IMG_0183_1.tif good match
[INFO] IMG_0282_5.tif --> IMG_0282_1.tif good match
[INFO] Can’t use features matching, will use ECC (this might take a bit)
[INFO] IMG_0201_5.tif --> IMG_0201_1.tif good match
[INFO] IMG_0276_5.tif --> IMG_0276_1.tif good match
[INFO] IMG_0203_5.tif --> IMG_0203_1.tif good match
[INFO] IMG_0208_5.tif --> IMG_0208_1.tif good match
[INFO] IMG_0180_5.tif --> IMG_0180_1.tif good match
[INFO] IMG_0202_5.tif --> IMG_0202_1.tif good match
[INFO] IMG_0292_5.tif --> IMG_0292_1.tif good match
[INFO] Can’t use features matching, will use ECC (this might take a bit)
[INFO] IMG_0189_5.tif --> IMG_0189_1.tif good match
[INFO] IMG_0184_5.tif --> IMG_0184_1.tif good match
[INFO] IMG_0206_5.tif --> IMG_0206_1.tif good match
[INFO] IMG_0182_5.tif --> IMG_0182_1.tif good match
[INFO] Rededge band will be aligned using warp matrix [[ 9.91364492e-01 6.27711196e-03 2.26304970e+01]
[-6.04585556e-03 9.92253571e-01 -9.59471452e+00]
[-3.66021707e-08 1.24236715e-06 1.00000000e+00]] (score: 2.7633998526247483)
[INFO] Adding shots to reconstruction
[INFO] Backing up reconstruction
[INFO] Undistorting /datasets/project/opensfm …
2020-12-10 12:39:03,257 DEBUG: Undistorting image IMG_0187_4.tif
2020-12-10 12:39:03,258 DEBUG: Undistorting image IMG_0181_5.tif
2020-12-10 12:39:03,258 DEBUG: Undistorting image IMG_0181_4.tif
2020-12-10 12:39:03,262 DEBUG: Undistorting image IMG_0181_3.tif
2020-12-10 12:39:03,262 DEBUG: Undistorting image IMG_0181_2.tif
2020-12-10 12:39:03,264 DEBUG: Undistorting image IMG_0291_5.tif
2020-12-10 12:39:03,265 DEBUG: Undistorting image IMG_0186_4.tif
2020-12-10 12:39:03,267 DEBUG: Undistorting image IMG_0291_2.tif
2020-12-10 12:39:04,009 DEBUG: Undistorting image IMG_0186_3.tif
2020-12-10 12:39:04,024 DEBUG: Undistorting image IMG_0187_5.tif
2020-12-10 12:39:04,032 DEBUG: Undistorting image IMG_0186_2.tif
2020-12-10 12:39:04,033 DEBUG: Undistorting image IMG_0296_5.tif
Traceback (most recent call last):
File “/code/run.py”, line 69, in
File “/code/stages/odm_app.py”, line 83, in execute
File “/code/opendm/types.py”, line 361, in run
File “/code/opendm/types.py”, line 361, in run
File “/code/opendm/types.py”, line 361, in run
File “/code/opendm/types.py”, line 342, in run
self.process(self.args, outputs)
File “/code/stages/run_opensfm.py”, line 126, in process
octx.convert_and_undistort(self.rerun(), undistort_callback, image_list_override)
File “/code/opendm/osfm.py”, line 328, in convert_and_undistort
undistort.run_dataset(ds, “reconstruction.json”,
File “/code/SuperBuild/src/opensfm/opensfm/actions/undistort.py”, line 39, in run_dataset
undistort_reconstruction(tracks_manager, r, data, udata, imageFilter)
File “/code/SuperBuild/src/opensfm/opensfm/actions/undistort.py”, line 79, in undistort_reconstruction
parallel_map(undistort_image_and_masks, arguments, processes)
File “/code/SuperBuild/src/opensfm/opensfm/context.py”, line 51, in parallel_map
res = Parallel(batch_size=batch_size)(delayed(func)(arg) for arg in args)
File “/usr/local/lib/python3.8/dist-packages/joblib/parallel.py”, line 1061, in call
File “/usr/local/lib/python3.8/dist-packages/joblib/parallel.py”, line 940, in retrieve
File “/usr/lib/python3.8/multiprocessing/pool.py”, line 771, in get
raise self._value
File “/usr/lib/python3.8/multiprocessing/pool.py”, line 125, in worker
result = (True, func(*args, **kwds))
File “/usr/local/lib/python3.8/dist-packages/joblib/_parallel_backends.py”, line 595, in call
return self.func(*args, **kwargs)
File “/usr/local/lib/python3.8/dist-packages/joblib/parallel.py”, line 262, in call
return [func(*args, **kwargs)
File “/usr/local/lib/python3.8/dist-packages/joblib/parallel.py”, line 262, in
return [func(*args, **kwargs)
File “/code/SuperBuild/src/opensfm/opensfm/actions/undistort.py”, line 92, in undistort_image_and_masks
image = imageFilter(shot.id, image)
File “/code/stages/run_opensfm.py”, line 73, in undistort_callback
image = func(shot_id, image)
File “/code/stages/run_opensfm.py”, line 78, in radiometric_calibrate
return multispectral.dn_to_reflectance(photo, image, use_sun_sensor=args.radiometric_calibration==“camera+sun”)
File “/code/opendm/multispectral.py”, line 117, in dn_to_reflectance
irradiance = compute_irradiance(photo, use_sun_sensor=use_sun_sensor)
File “/code/opendm/multispectral.py”, line 136, in compute_irradiance
solar_elevation, solar_azimuth = dls.compute_sun_angle([photo.latitude, photo.longitude],
File “/code/opendm/dls.py”, line 134, in compute_sun_angle
altitude = pysolar.get_altitude(position[0], position[1], utc_datetime)
File “/usr/local/lib/python3.8/dist-packages/pysolar/tzinfo_check.py”, line 92, in func_with_check
raise NoTimeZoneInfoError(argname, dt)
pysolar.tzinfo_check.NoTimeZoneInfoError: datetime value ‘2018-08-22 12:08:37.573976’ given for arg ‘when’ should be made timezone-aware.
You have to specify the ‘tzinfo’ attribute of ‘datetime.datetime’ objects.

I will be grateful for any help.
Thank you. :blush:

1 Like

Yes it looks like a bug. I’ll have a fix soon. Thanks for reporting it!


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.