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 more efficient #4

Open
bertsky opened this issue Jan 21, 2022 · 1 comment
Open

make more efficient #4

bertsky opened this issue Jan 21, 2022 · 1 comment

Comments

@bertsky
Copy link
Owner

bertsky commented Jan 21, 2022

We currently only use Detectron2's DefaultPredictor for inference:

self.predictor = DefaultPredictor(cfg)

But the documentation says:

This is meant for simple demo purposes, so it does the above steps automatically. This is not meant for benchmarks or running complicated inference logic. If you’d like to do anything more complicated, please refer to its source code as examples to build and use the model manually

One can clearly see how the GPU utilization is scarce, so a multi-threaded implementation with data pipelining would boost performance a lot.

@bertsky
Copy link
Owner Author

bertsky commented Feb 3, 2022

The first try in predict-async does not actually reduce wall time (it only reduces CPU seconds a bit). Perhaps we must first disentangle the page loop (make it a pipeline).

However, 88617a2 (i.e. predicting and post-processing at lower pixel density – no more than 150 DPI) does help quite a bit already.

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

1 participant