# ROS2 inference package based on mmdetection

**URL:** <https://discourse.openrobotics.org/t/ros2-inference-package-based-on-mmdetection/26862>\
**Category:** Computer Vision / Perception\
**Tags:** ros2, humble\
**Created:** [August 11, 2022, 7:57am UTC](https://discourse.openrobotics.org/t/ros2-inference-package-based-on-mmdetection/26862 "2022-08-11T07:57:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wep21](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/wep21/32/12192_2.png) [@wep21](https://discourse.openrobotics.org/u/wep21)\
**Post date:** [August 11, 2022, 7:57am UTC](https://discourse.openrobotics.org/t/ros2-inference-package-based-on-mmdetection/26862/1 "2022-08-11T07:57:16Z")

</div>

I created [a new sample package](https://github.com/wep21/mmdet_tensorrt_ros) to make inference based on a trained model with [mmdetection](https://github.com/open-mmlab/mmdetection) which is one of open source object detection toolbox based on PyTorch.  
The training and inference pipelines are as below.

1. train a model with mmdetection
2. convert the model into end2end onnx file with [mmdeploy](https://github.com/open-mmlab/mmdeploy)
3. do inference with the onnx file. It is parsed into execution file for [TensorRT](https://developer.nvidia.com/tensorrt) in my package.

Currently, yolox is only supported, but I would like to increase the supported models in the future.  
Any feedback is welcome. Thank you.
