Multispectral processing help please!

Hi all,
I’m new to WebODM and have a DJI phantom 4 multispectral. I’m just trying out this platform and trying to see how it compares to others such as pix4d. I’m trying to stitch my first project together and am starting small with only 24 images to try to get this up and running.
image
^I’ve selected multispectral and left everything else to auto and when I do this I get the error “process exited with code 1”

I got this error in my task output:
Multi-camera setup detected, but band “RGB” (identified from “DJI_0020.JPG”) has only 4 images (instead of 5), perhaps images are missing or are corrupted. Please include all necessary files to process all bands and try again.
Traceback (most recent call last):

I’m not sure why it needs 5 rgb images, there are only 4 in the images I selected.

For each capture this drone takes 6 pictures through six different lenses: one RGB and then the other 5 multispectral lenses in: Blue (B): 450 nm ± 16 nm; Green (G): 560 nm ± 16 nm; Red ®: 650 nm ± 16 nm; Red edge (RE): 730 nm ± 16 nm; Near-infrared (NIR): 840 nm ± 26 nm

Anyways I increased the project from 24 images to 30 images and got this:
[INFO] Running dataset stage
[INFO] Loading dataset from: /var/www/data/a0d2f5fa-ed37-46f2-9ce7-8731e141c4dd/images
[INFO] Loading 30 images
[INFO] Wrote images database: /var/www/data/a0d2f5fa-ed37-46f2-9ce7-8731e141c4dd/images.json
[INFO] Found 30 usable images
Traceback (most recent call last):
File “/code/run.py”, line 69, in
app.execute()
File “/code/stages/odm_app.py”, line 83, in execute
self.first_stage.run()
File “/code/opendm/types.py”, line 342, in run
self.process(self.args, outputs)
File “/code/stages/dataset.py”, line 154, in process
reconstruction = types.ODM_Reconstruction(photos)
File “/code/opendm/types.py”, line 29, in init
self.multi_camera = self.detect_multi_camera()
File “/code/opendm/types.py”, line 62, in detect_multi_camera
mc.sort(key=lambda x: band_indexes[x[‘name’]])
TypeError: ‘<’ not supported between instances of ‘str’ and 'int’

Can someone please let me know what I may be doing incorrect if I’m just trying to create a top down multispectral 2d map with these images? Im kind of a complete newb to this. It would be much appreciated! Thank you and happy new year.

(task output for 24 images)
[INFO] Initializing ODM - Wed Dec 30 22:20:17 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: 11
[INFO] mesh_size: 200000
[INFO] min_num_features: 8000
[INFO] name: 5985f734-5309-422f-9e24-7cf4567e5ae0
[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: /var/www/data
[INFO] radiometric_calibration: none
[INFO] rerun: None
[INFO] rerun_all: False
[INFO] rerun_from: None
[INFO] resize_to: 2048
[INFO] skip_3dmodel: False
[INFO] skip_band_alignment: 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_overlap: 150
[INFO] texturing_data_term: area
[INFO] texturing_outlier_removal_type: gauss_clamping
[INFO] texturing_skip_global_seam_leveling: True
[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: /var/www/data/5985f734-5309-422f-9e24-7cf4567e5ae0/images
[INFO] Loading 27 images
[INFO] Wrote images database: /var/www/data/5985f734-5309-422f-9e24-7cf4567e5ae0/images.json
[INFO] Found 27 usable images
[ERROR] Multi-camera setup detected, but band “RGB” (identified from “DJI_0020.JPG”) has only 4 images (instead of 5), perhaps images are missing or are corrupted. Please include all necessary files to process all bands and try again.
Traceback (most recent call last):
File “/code/run.py”, line 69, in
app.execute()
File “/code/stages/odm_app.py”, line 83, in execute
self.first_stage.run()
File “/code/opendm/types.py”, line 342, in run
self.process(self.args, outputs)
File “/code/stages/dataset.py”, line 154, in process
reconstruction = types.ODM_Reconstruction(photos)
File “/code/opendm/types.py”, line 29, in init
self.multi_camera = self.detect_multi_camera()
File “/code/opendm/types.py”, line 55, in detect_multi_camera
raise RuntimeError(“Invalid multi-camera images”)
RuntimeError: Invalid multi-camera images

(task output for 30 images)
[INFO] Initializing ODM - Wed Dec 30 22:34:28 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: 11
[INFO] mesh_size: 200000
[INFO] min_num_features: 8000
[INFO] name: a0d2f5fa-ed37-46f2-9ce7-8731e141c4dd
[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: /var/www/data
[INFO] radiometric_calibration: none
[INFO] rerun: None
[INFO] rerun_all: False
[INFO] rerun_from: None
[INFO] resize_to: 2048
[INFO] skip_3dmodel: False
[INFO] skip_band_alignment: 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_overlap: 150
[INFO] texturing_data_term: area
[INFO] texturing_outlier_removal_type: gauss_clamping
[INFO] texturing_skip_global_seam_leveling: True
[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: /var/www/data/a0d2f5fa-ed37-46f2-9ce7-8731e141c4dd/images
[INFO] Loading 30 images
[INFO] Wrote images database: /var/www/data/a0d2f5fa-ed37-46f2-9ce7-8731e141c4dd/images.json
[INFO] Found 30 usable images
Traceback (most recent call last):
File “/code/run.py”, line 69, in
app.execute()
File “/code/stages/odm_app.py”, line 83, in execute
self.first_stage.run()
File “/code/opendm/types.py”, line 342, in run
self.process(self.args, outputs)
File “/code/stages/dataset.py”, line 154, in process
reconstruction = types.ODM_Reconstruction(photos)
File “/code/opendm/types.py”, line 29, in init
self.multi_camera = self.detect_multi_camera()
File “/code/opendm/types.py”, line 62, in detect_multi_camera
mc.sort(key=lambda x: band_indexes[x[‘name’]])
TypeError: ‘<’ not supported between instances of ‘str’ and ‘int’

1 Like

This might be a bug; could you share your images somewhere like Google Drive or Dropbox (even privately)? https://uav4geo.com/contact

3 Likes

Sorry for the late reply, just got notifications set up. Thanks for your help I appreciate it! Trying to get this small batch of images running before I try the complete set. The 30 images can be found here: WebODM - Google Drive

If anyone can get this running and be able to explain how they did so, I’d be forever in your debt! XD I’m completely new to this platform.

I’ve added a fix to process this dataset: Fix phantom4 multispectral dataset by pierotofy · Pull Request #1224 · OpenDroneMap/ODM · GitHub

Note that you’ll need more images to get good ortho/band alignment.

Also, the precision of the rededge/infrared band will be truncated to 8bit (from 16) if you include the RGB images.

image

1 Like