Detectron: Batch Inference

Created on 30 Jan 2018  路  8Comments  路  Source: facebookresearch/Detectron

How to easily take advantage of batch processing during inference?

enhancement

All 8 comments

@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.

Which files did you change?

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)

Nice, feel free to post the commit :+1:

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

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

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

olgaliak picture olgaliak  路  4Comments

elfpattern picture elfpattern  路  3Comments

lilichu picture lilichu  路  3Comments

junxiaoge picture junxiaoge  路  3Comments

pacelu picture pacelu  路  3Comments