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

make inference faster, and add more specificity to do_seg wrt inputs and outputs #27

Closed
dbuscombe-usgs opened this issue Mar 1, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@dbuscombe-usgs
Copy link
Member

  1. Inference is slow. How do we speed it up?
  2. add functionality to control which outputs are created
@ebgoldstein
Copy link
Member

Has anybody profiled the code to see what step is the longest in the inference code? (i.e., via cPython or the even the tensorflow profiler?)
I have not done it, but i presume its just the actual model.predict call?
And do we have an understanding of model.predict speed on GPU vs CPU?

@ebgoldstein ebgoldstein added the enhancement New feature or request label Mar 1, 2023
@dbuscombe-usgs
Copy link
Member Author

In many of my applications, a single model.predict is a small fraction of the total time. I use several other function calls to prepare inputs and outputs. I also tend to call the model several times for the same image. Writing outputs to file often takes longer than creating them. So, parallelizing the model inference makes sense anyway

According to the docs, model(x) should be quicker than model.predict(x) on a single input

It would be really nice to not have to rely on GPU, which will be out of reach for a lot of users and hinder cloud deployments

@dbuscombe-usgs
Copy link
Member Author

I added a small change to enable the option to use model in parallel using joblib using gym, zoo, etc.

0999c40

@dbuscombe-usgs
Copy link
Member Author

Superseded by #31

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