facebookresearch / Detectron

FAIR's research platform for object detection research, implementing popular algorithms like Mask R-CNN and RetinaNet.
Apache License 2.0
26.24k stars 5.45k forks source link

Generating proposals on GPU #246

Open pooyadavoodi opened 6 years ago

pooyadavoodi commented 6 years ago

Detectron uses Python operator of Caffe2 to generate proposals https://github.com/facebookresearch/Detectron/blob/master/lib/ops/generate_proposals.py.

Caffe2 already has an operator that supports this in C++: https://caffe2.ai/docs/operators-catalogue.html#generateproposals

My benchmark shows that generating proposals using the Python implementation takes about 30% of the training time.

I was wondering why the C++ operator is not used instead of the python implementation?

pooyadavoodi commented 6 years ago

I am going to give it a shot and replace the Python operator with the C++ one.

rbgirshick commented 6 years ago

@pooyadavoodi thanks for trying it out. Looking forward to hearing your results. The only reason it's not in use is that we haven't prioritized looking into using it as a replacement (it was developed later specifically for mobile deployment).