A cutline issue

I’ve been wanting to improve the trimming of orthophotos on a project and decided to see if the cutline option opened more opportunity for custom trimming like some of the alternative processing engines. I have a dataset of 154 jpg images that process to completion in a reasonable time on Lightning as well as my local webodm node using the Hi Res template with no other options selected. But when I run that same data set wiht the Hi Res template + cutline option flipped to True, Lightning errors out with an error 1 notification at a little under 3 hours. Running that same HiRes + cutline task on my local machine just keeps churning. I finally cut it off at 35 hours on a 8-core 64G RAM machine.

I’m sure that I must be asking the processing engine to do something dumb, so I’m checking in here to learn more. Both the data set and the error message are available on Dropbox here: https://www.dropbox.com/sh/peu3rf7c2slnrdw/AACei97-LKfdwdNePWFekYk-a?dl=0

For my original photo trimming, I"ve been able to do that in Photoshop, so it’s not an urgent issue for me to do it in WebODM. But I want to learn what that cutline option is supposed to do and how I should be using it.

Thanks… Bob R.

2 Likes

I think you might have forgotten the error messages log (can’t find it in Dropbox) :slight_smile:

1 Like

This was the error message log that Lightning sent me. If not what you need, let me know and I’ll go find the right one.

Your task [Task of 2020-09-07T20:25:42.359Z] could not complete. Here’s a copy of the error message:

format).
Execution of finished.
Cleaning up default sqlite database …
Cleaning up temporary files…
[INFO] Generated cutline file: /var/www/data/863cb17d-a356-4796-b3de-e77eea44af4e/odm_orthophoto/grass_cutline_tmpdir/cutline.gpkg --> /var/www/data/863cb17d-a356-4796-b3de-e77eea44af4e/odm_orthophoto/cutline.gpkg
[INFO] Computing mask raster: /var/www/data/863cb17d-a356-4796-b3de-e77eea44af4e/odm_orthophoto/odm_orthophoto_cut.tif
Traceback (most recent call last):
File “/code/run.py”, line 62, in
app.execute()
File “/code/stages/odm_app.py”, line 95, in execute
self.first_stage.run()
File “/code/opendm/types.py”, line 350, in run
self.next_stage.run(outputs)
File “/code/opendm/types.py”, line 350, in run
self.next_stage.run(outputs)
File “/code/opendm/types.py”, line 350, in run
self.next_stage.run(outputs)
File “/code/opendm/types.py”, line 350, in run
self.next_stage.run(outputs)
File “/code/opendm/types.py”, line 350, in run
self.next_stage.run(outputs)
File “/code/opendm/types.py”, line 350, in run
self.next_stage.run(outputs)
File “/code/opendm/types.py”, line 350, in run
self.next_stage.run(outputs)
File “/code/opendm/types.py”, line 350, in run
self.next_stage.run(outputs)
File “/code/opendm/types.py”, line 350, in run
self.next_stage.run(outputs)
File “/code/opendm/types.py”, line 350, in run
self.next_stage.run(outputs)
File “/code/opendm/types.py”, line 331, in run
self.process(self.args, outputs)
File “/code/stages/odm_orthophoto.py”, line 149, in process
blend_distance=20, only_max_coords_feature=True)
File “/code/opendm/orthophoto.py”, line 90, in compute_mask_raster
dist_t = ndimage.distance_transform_edt(alpha_band)
File “/usr/local/lib/python2.7/dist-packages/scipy/ndimage/morphology.py”, line 2195, in distance_transform_edt
dt = dt.astype(numpy.float64)
MemoryError

You can try to post on https://community.opendronemap.org for help, or you can search the forum for a possible solution to the error message.

To disable these notifications please visit https://webodm.net/dashboard


This is an automated e-mail, please do not reply.

1 Like

Ah, yes, this is a known issue: https://github.com/OpenDroneMap/ODM/issues/1113

I’m probably going to fix it as part of the upcoming Python 3 + Ubuntu 18.04 release, since it seems to be affecting quite a bit of people.

OK.

Is cutline intended to provide user access to setting input on cropping?

I could test this, but will ask since we’re all here - Will cutline work without Hi Res?

R

Cutline will work without hi-res. The idea behind the cutline work is to provide split merge the necessary cutlines for stitching together multiple submodels. The challenge with running submodels is hiding the variation in lighting across a split scene. Cutlines seek to create those cuts in the high contrast areas where they’ll be least likely to be noticed by the human eye. Feathering does the rest.

Non-split-merge use cases probably abound.

Got it. Thanks… R

1 Like