Supporting Faster RCNN and Mask RCNN models


Hi, I’m interested in running Faster RCNN and Mask RCNN models with TVM.

Thanks to @vinx13, we now have ROIPooling, ROIAlign, Proposal, and box related ops. With @Laurawly’s PR we will have argsort and AdaptiveAvgPooling. It seems we have all pieces needed to run Faster RCNN and Mask RCNN models from GluonCV. The only thing missing that I could find is the relay frontend for gather_nd op, which is easy to add.

Are there any other mxnet ops that are missing? @vinx13 @Laurawly @kevinthesun


I have run some faster-rcnn variants. Ops are all supported. Proposal Op may have some performance issue with sorting


We have all ops supported. Gluncv models recently use deconvolution for rcnn models which causes performance issues since we don’t have very optimized deconv schedule in tvm.


odd-even sort seems not that good at proposal op. The reasons may be,

  1. sync is expensive for each loop;
  2. share memory is missed in some case.


agree, replacing it with external cuda lib function might be a solution


Is it possible to use Thrust in TVM?


Yes, you can wrap it into a packed function


Hi, what is target for this discussion of Faster RCNN discussion? GPU? Are these discussions work for CPU or LLVM? Thanks


I think we are having GPU in mind here. But extending support for CPU is not difficult.


Great, thank you for your prompt reply.


Yes, you are right. We also successfully compiled and run on CPU. Thank you for the tips.