Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

Batch Inference #84

Open
filipetrocadoferreira opened this issue Jan 30, 2018 · 8 comments
Open

Batch Inference #84

filipetrocadoferreira opened this issue Jan 30, 2018 · 8 comments

Comments

@filipetrocadoferreira
Copy link

filipetrocadoferreira commented Jan 30, 2018

How to easily take advantage of batch processing during inference?

@kampelmuehler
Copy link

kampelmuehler commented Mar 14, 2018

@filipetrocadoferreira I've implemented this for Faster RCNN and so far it seems to work ok with TEST.IMS_PER_BATCH > 1. It's not a whole lot of work to do this yourself.

@filipetrocadoferreira
Copy link
Author

Which files did you change?

@kampelmuehler
Copy link

kampelmuehler commented Mar 14, 2018

All changes are to be made in lib/core/test.py and lib/core/test_engine.py. (+ adding a TEST.IMS_PER_BATCH config option)

@filipetrocadoferreira
Copy link
Author

Nice, feel free to post the commit 👍

@kampelmuehler
Copy link

kampelmuehler commented Mar 14, 2018

Sure, there you go:
kampelmuehler/Detectron@2beae3e
note that it's neither a clean nor a comprehensive implementation.

@filipetrocadoferreira
Copy link
Author

Thanks a lot :)
Do you think it needs changes for Mask/Keypoint prediction?

@kampelmuehler
Copy link

kampelmuehler commented Mar 14, 2018

Yes it will for sure. See whereever it says Not implemented, or better compare with the non _batch methods.
You'll get the idea.

@filipetrocadoferreira
Copy link
Author

filipetrocadoferreira commented Mar 21, 2018

Keypoint Batch Inference is not straight forward. I'm facing some problems here:

_get_rois_blob(boxes, im_scales)

worst. Now I'm aware that single image inference is composed by multiple data exchange between gpu<->cpu which will be ,prolly, the main bottleneck of performance

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

No branches or pull requests

3 participants