Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running orthority using multiprocessing #17

Open
fakurten94 opened this issue Oct 9, 2024 · 1 comment
Open

Error when running orthority using multiprocessing #17

fakurten94 opened this issue Oct 9, 2024 · 1 comment

Comments

@fakurten94
Copy link

Hello,

I have been using orthority and saw that there's a recurring error when running multiprocessing. This does not stop the calculation, but it starts spamming the error. Here's a snapshot of what I mean:

image

The function orthorectification is the following:

def orthorectification(file,out_fld,dem_file,cameras):

    camera = cameras.get(file)

    ortho = oty.Ortho(file, dem_file, camera=camera, crs=cameras.crs)
    ortho.process(f'{out_fld}/{os.path.basename(file)}',compress="deflate",interp="bilinear",overwrite=True)

Not sure if I could use orthority using Multiprocessing as it seems that it is using a good amount of memory trying to orthorectify a single image. I also have used the same process in a for loop and does work with no issues, this just becomes a problem when running it through multiprocessing. Any advice on how to mitigate that issue?

For reference, I have been using a Mac with Intel chip.

Thanks!

@dugalh
Copy link
Collaborator

dugalh commented Oct 10, 2024

Hello

Thanks for the report. It looks like the same issue as this. Orthority uses the PROJ library via Rasterio and configures it for on-demand caching of transformation grids.

I will look into this. You could try downloading the transformation grids for your area and see if that helps.

Bear in mind that Orthority is already multi-threaded so you are unlikely to see much speed-up from multi-processing. And yes, memory could be a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants