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

Performance enhancement for inference #4

Open
nicolasnn opened this issue Apr 8, 2022 · 1 comment
Open

Performance enhancement for inference #4

nicolasnn opened this issue Apr 8, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@nicolasnn
Copy link

On GPU hardware, in production scripts, post-processing takes twice as long as neural network inference.

On an NVidia GeForce GTX 1080 Ti (12GB RAM), for one full-size Sentinel-2 tile, CRGA OS2 UNet model, tile size 1024:

  • With post-processing: ~6 minutes
  • Without post-processing: ~2 minutes

A temporary workaround for speedup could be to skip post-processing by setting nodatavalues to None in inference.py. However, this would induce some artifacts, especially on images containing NoData.
A more long-term solution would be to include the post-processing inside the Keras model.

@remicres
Copy link
Collaborator

Starting from otbtf >=3.3.0 this would be easy to implement thanks to the otbtf.model.ModelBase.
We just have to implement the post-processing steps in the postprocess_outputs() method.

@remicres remicres added the enhancement New feature or request label Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants