Processing Mavic 3M Images (PyODM vs WebODM API)

Hi Everyone,

I’m currently using the Mavic 2 Pro to capture data for a local farm. I’ve setup Docker to run PyODM & analyse the files (JPG Images) to create an orthophoto.tif file and the other relevant files such as the dsm.tif & ODM Report, this is all working as expected without any issues.

I’ll soon be purchasing the Mavic 3 Multispectral due to requiring more data such as NDVI & Other Vegetation Indices, GAI, Crop Height, Crop Count & so on. I’m aware that the Mavic 3M will have 5 output files per image captured meaning now I will have JPG, R.TIF, NIR.TIF, G.TIF, RE.TIF.

I have a few questions regarding the new workflow & capabilities of PyODM & WebODM:

  1. If I now send the 5 files (JPG, R.TIF, NIR.TIF, G.TIF, RE.TIF) to PyODM will it generate the standard orthophoto, an NDVI orthophoto and also include these in the ODM Report or do I need to send the JPG images & NDVI images separately to create the different orthophotos? (I’m just wary this will double my processing time or I suppose I could create a separate docker container to analyse the NDVI images alongside the standard orthophoto?

  2. WebODM has an inbuilt NDVI function, if I send the 5 files (JPG, R.TIF, NIR.TIF, G.TIF, RE.TIF) is it capable of generating the orthophotos and NDVI data I require within the same process and am I able to interact with WebODM using API’s as this would allow me to use WebODM instead of PyODM due to WebODM having more capabilities.

  3. For further agricultural data analysis I was hoping to use FieldImageR which seems compatible with WebODM. I want to obtain Crop Count & Crop Height, can I send the data from WebODM to FieldImageR via API’s or python code to be processed or does this step have to be manual?

  4. How difficult is it to edit the ODM Report? If I now have additional data such as the NDVI or other Vegetation Indices, Crop Height & Crop Count from FieldImageR can I modify the ODM Report generation process to now include this data?

Any help with these questions would be greatly appreciated.

3 Likes

Hi ivogaz,

Welcome to ODM!

A couple of things to bear in mind with multispec in general and also multispec with ODM

  • You are right that you end up with a LOT more data. For example, a 5ha RGB flight with the Phantom multispec is ~750mb and 800 files. With multispec you have 5 TIFs for each image (4 with the M3M) so you end up with 5x800 = 4,000 tifs and 15.7GB of data. This alone is a total pain to manage let alone process and upload anywhere

  • I’ve had mixed results with ODM and multispec. I’ve had some success with P4M files but haven’t actually gotten any of my M3M flights to process and ODM doesn’t often provide good error output so it is hard to figure out the issue. I haven’t had time to dig into what is causing the issues, but this is reasonably high priority for me at the moment, There are a few ongoing conversation in the forums on this topic, so have a look at those to see where things stand (link). so I’m hoping to do some more M3M flights in the next few weeks to have additional datasets to test with and I will post those when I have a chance.

  • A few things to know about the M3M… it is a million times more user friendly than the Phantom multispec, but still has it’s issues. In particular:

  1. if you need terrain following you can’t set the camera angle off of nadir. This is probably fine for most crops but if you want to fly forests, it is really a problem. DJI support said that the workaround is to use their “oblique” mode, but I wasn’t able to get this working reliably as it isn’t designed for grid surveys in the same way and you either end up with incomplete data or you have to do 4x more flights than with the regular mode (which would be an extra data management nightmare if also recording 4x multispec images). Also, the M3M lacks some of the standard fancy features on the other Mavic E models, like Follow Me mode, so if you are hoping to do things other than just plant scanning, you’ll have to decide if you need those features more than multispec.

  2. The M3M has pretty major issues with compression artifacts in the RGB camera and there is no setting in their software to change this (I’ve spoken to DJI support and they have confirmed this is the case). This is disappointing if you are hoping to use their 25mp camera to get good RGB data. Also, it gets way worse in even slightly lower light. (see also the discussion here)

  3. Note that the M3M doesn’t have a blue band on the multispec camera, so if you are looking for any fancy indices that need the blue band then this might be an issue (you may be able to pull Blue from the RGB but I imagine this would be a bit of research project in itself to get it calibrated and working).

re your specific questions:

  1. AFAIK you’ll need to process the rgb and multispec separately. Multispec processing seems to work reasonably quickly though, so having 4x more images doesn’t equate to 4x longer processing time. You do get a false colour RGB output from the multispec but it doesn’t look that great. Here’s an example (link) from a small dataset from the P4M if you want to have a look at the outputs.

  2. You’ll get NDVI output layers and you can use the “plant health” tab in the map to interact with that data. I haven’t tested any of this rigorously though, so you’ll want to spend enough time with some test datasets to be happy that it is doing what you think it is.

  3. For FieldImageR, I’m pretty sure you have to download all your data from ODM and then process the files from R. We’re in the process of building an integrated platform that links ODM outputs to jupyter notebooks. Those currently only run python, but we’ll be looking into adding R support, so if you want to be a beta tester on that, pm me. The python integration works quite well but I’m not the developer so I don’t know if there is additional tooling needed to implement the same linkages between ODM and R. but get in touch and we can look into it.

  4. Can you clarify what you had in mind? You could edit the PDF directly, but are you hoping to automate things so ODM provides additional outputs in the Report, or just to extend it with say outputs from the post processing in R?

Apologies in advance that I don’t have time today to write a longer reply… I will follow up next week when I have the chance and perhaps others can chime in as well.

4 Likes

Hi Tim,

Thank you for that thorough response, it’s really appreciated. I’ll summarise what I’m working on, I won’t reveal all on here but we can chat privately If you’re interested. I’m doing regular mapping missions for a local farm to assess their crops. The data is then sent to my cloud servers & I’ve written all of the backend code to start the servers, organise the naming structure, data, files and docker then run pyodm/nodeodm, all of the output files are placed in my results folder at the end of this process. This all works perfectly well with the Mavic 2 Pro however the end goal was to always upgrade to the Mavic 3M, I just used the Mavic 2 Pro as a feasibility test:

I suppose regarding the extra data using the Mavic 3M, I can scale the severs quite easily to handle this efficiently. I’ve downloaded a sample dataset to trial starting next week so I’ll let you know how I get on. I’m holding off on buying the drone until I know I yields good data with the process I’m using.

  1. Fortunately my initial clients are only growing rapeseed, barley, potatoes etc. The drone will only be performing simple mapping functions i.e deploying, capturing images, landing so we’re keeping it nice and simple.

  2. Regarding the compression issue, do you think there will be a fix for this? Also can this not be mitigated by flying lower than usual and regular sun light calibrations?

  3. Yep, I noticed from some of the datasets I’ve looked at there was no blue band data, like you said it should be achievable using the RGB, I should be able to write some code to split the channels, zero the red and green bands then output the file as a .tif and package it with the M3 multispec data.

Specific Questions

  1. Ah okay, that’s a shame, I was thinking about splitting my workflow in my code to get around this, I might try creating two docker containers, send the RGB data to one then the Multispectral to the other so they can be processed simultaneously.

  2. Do you know of any NDVI plugins for PyODM/NodeODM?

  3. I’d definitely be interested in the beta testing, at minimal I’d love to hear more about it. I almost had FieldImageR working with my pyodm data, I was able to automatically send the data to FieldImageR but once there I couldn’t crop it since I’m trying to run everything as part of my code. Is there any way to auto crop your data exactly along the area the drone has captured i.e ignoring all overlap?

  4. Yep, I’m hoping to automate it so ODM provides additional outputs in the Report. Lets say I was able to generate NDVI, other vegetation indicies then crop height & crop count from FieldImageR I’d like to be able to create an ODM report with all of this information.

I’d like to thank you again for the response, didn’t expect that much detail from anyone, I look forward to hearing back from you.

So, i have done forestry Multispectral but just for fun. actually i am more or less only doing mapping for forestry and Solar stuff but bought an M3M because i wanted the bigger cam and the RTK next to my M3T. And the M3M is not that much more exppensive than the M3E.

i’ll give you my 5 cents, but i am just working with Windows ODM (the purchase Version)

  1. Yes, one process for JPG and one process for the Multisp Bands
  2. again 2 Processes afaik
  3. since have just been doing forestry, had a look at FieldImageR but it doesn’t really have functions i need by now
  4. probably you can use a workaround by PDF24 e.g. and just split it, put your data in and merge it again

Hi ivogaz,

re jpg compression artifacts: DJI support told me their engineers have confirmed there is currently no way around this, at least when using their software. I’m using their enterprise controller which is tied to their control software, so there may be third part software that would support adjusting camera parameters, but I haven’t looked into it.
I suspect they might be more likely to fix this if more people complained, so you might want to log into DJI chat and ask the same question so they know this is an issue people are concerned about.

NDVI plugins: No, but let us know if you find one! Also, we are in the process of building an open source pipeline for wheat plot and height detection which I think also has NDVI as an output, so I can pass that on when it is ready (timeline somewhat vague but hopefully in the next few months).

Auto-crop: can you take the bounding box or extents of the ortho or of the drone flight path? or do you need it to detect the actual outline of the field?

Test Data:

If you want to play with some data, here’s a multispec flight I did yesterday with the M3M.
I’m in the midst of stitching it on our system so I can’t promise the dataset will work, but the flight went fine so I have no reason to think they won’t work (other than that ODM seems to be somewhat flakey with M3M data).

Area: 5.8Ha
JPG’s: 254 (2.19 Gb)
TIFs: 1026 (9.54 Gb)

https://drive.google.com/drive/folders/1Xr8NcSWY9TO0BwrMP6BxVIDI1BPA70FS?usp=sharing

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