C++ inferenec on detection model

(Jin Tian) #1

Hello, I have trained a model with pytorch, but how to inference using c++.

It’s a detection model similar as RFBNet and SSD, so is there anyone try to load model in C++?

(Thomas V) #2

MaskRCNN-benchmark has a PR for tracing the model.

Best regards


(Will Feng) #3

To use a PyTorch model for inference in C++, we need to convert the model to TorchScript first. This is a good tutorial: https://pytorch.org/tutorials/advanced/cpp_export.html.

(Jin Tian) #4

I know, I have successfully trace a classification model to C++, not sure about the detection models.

BTW, does there any comparation of C++ inference speed with libtorch and Caffe or Tensorflow? Who is faster in terms of same models architecture?