How to Use a Custom RT-DETR Model with isaac_ros_rtdetr

Hi,
I’m currently using a RealSense camera to follow the tutorial at isaac_ros_rtdetr — isaac_ros_docs documentation for object detection using the RT-DETR model. The example uses the sdetr_grasp.onnx pre-trained model, and I was able to successfully reproduce the demo with the provided Rosbag.

Now, I want to test a different model. I downloaded a pre-trained model from the RT-DETR PyTorch repo (RT-DETR/rtdetr_pytorch at main · lyuwenyu/RT-DETR · GitHub) and replaced the original commands as follows:

From:

/usr/src/tensorrt/bin/trtexec --onnx=${ISAAC_ROS_WS}/isaac_ros_assets/models/synthetica_detr/sdetr_grasp.onnx --saveEngine=${ISAAC_ROS_WS}/isaac_ros_assets/models/synthetica_detr/sdetr_grasp.plan

ros2 launch isaac_ros_examples isaac_ros_examples.launch.py launch_fragments:=realsense_mono_rect,rtdetr engine_file_path:=${ISAAC_ROS_WS}/isaac_ros_assets/models/synthetica_detr/sdetr_grasp.plan

To:

/usr/src/tensorrt/bin/trtexec --onnx=${ISAAC_ROS_WS}/isaac_ros_assets/models/synthetica_detr/rtdetr_r101vd_6x_coco.onnx --saveEngine=${ISAAC_ROS_WS}/isaac_ros_assets/models/synthetica_detr/rtdetr_r101vd_6x_coco.plan

ros2 launch isaac_ros_examples isaac_ros_examples.launch.py launch_fragments:=realsense_mono_rect,rtdetr engine_file_path:=${ISAAC_ROS_WS}/isaac_ros_assets/models/synthetica_detr/rtdetr_r101vd_6x_coco.plan

There were no errors during the process, and the camera feed was displayed successfully. However, no detection results were shown. I would like to ask: besides replacing the ONNX model and engine file, are there any additional steps needed to run other RT-DETR models with this example?

Thank you very much in advance. I’ve also included my log information and model below for reference.
log.txt (26.8 KB)
model.zip

Hi @chihyungwang79

Thank you for your post.

The documentation outlines all the necessary steps to convert a model. Based on your logs, everything appears to be functioning correctly, and the converted model has loaded successfully.

Which setup are you using? It may be a long process on your device.

Best,
Raffaello

Hi @Raffaello ,
Thank you for your response. My operating system is Ubuntu 22.04, running on an x86 platform with an RTX 5000 Ada GPU.

1 Like

Hi @Raffaello
I’m still not getting any detection results. Could you please give me some suggestions?

Hello Raffaello, can you help me take a look at the problem?