Search code examples
tensorflowpytorchonnxtensorrtdetectron

How do I convert a Detectron2 model into another deeplearning framework?


I would like to convert a detectron2 model into a another deeplearning framework i.e. PyTorch, TensorFlow or ONNX. How do I do this conversion?

I can run inference on the detectron2 model with the cfg (which I believe means config in detectron2 lingo).

The goal is to eventually run the Detectron2 model on a Nvidia Jetson Board. So, the goal would be to convert the model.


Solution

  • Since v0.4 you can deploy detectron2 models to torchscript and ONNX. There is more information about it in the documentation (and also example code).