# Tensor RT detection issue

**URL:** <https://forums.developer.nvidia.com/t/tensor-rt-detection-issue/330687>\
**Category:** Jetson Nano\
**Tags:** tensorrt\
**Created:** [April 17, 2025, 11:37am UTC](https://forums.developer.nvidia.com/t/tensor-rt-detection-issue/330687 "2025-04-17T11:37:39Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahuljv](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rahuljv](https://forums.developer.nvidia.com/u/rahuljv)\
**Post date:** [April 17, 2025, 11:37am UTC](https://forums.developer.nvidia.com/t/tensor-rt-detection-issue/330687/1 "2025-04-17T11:37:39Z")

</div>

Actually I had developed yolov8 object detection code and I converted it to best.trt like tensor rt engine file and I used it for detection but I did not get any detections but in the original yolov8 model it is working fine so what could be the issue

---

<div class="post-metadata">

**Author:** ![AastaLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/aastalll/32/14043_2.png) [@AastaLLL](https://forums.developer.nvidia.com/u/AastaLLL)\
**Post date:** [April 18, 2025, 2:33am UTC](https://forums.developer.nvidia.com/t/tensor-rt-detection-issue/330687/3 "2025-04-18T02:33:51Z")

</div>

Hi,

Do you feed the same input source to the model?  
How do you test it? Do you use Ultralytics source?

Thanks.

---

<div class="post-metadata">

**Author:** ![rahuljv](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rahuljv](https://forums.developer.nvidia.com/u/rahuljv)\
**Post date:** [April 18, 2025, 7:51am UTC](https://forums.developer.nvidia.com/t/tensor-rt-detection-issue/330687/4 "2025-04-18T07:51:26Z")

</div>

I feed the input from the CSI camera connected to jetson orin nano and it can also be fed through image from system

---

<div class="post-metadata">

**Author:** ![Y-T-G](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/y-t-g/32/394837_2.png) [@Y-T-G](https://forums.developer.nvidia.com/u/Y-T-G)\
**Post date:** [April 18, 2025, 3:22pm UTC](https://forums.developer.nvidia.com/t/tensor-rt-detection-issue/330687/5 "2025-04-18T15:22:25Z")

</div>

What’s the command you used for export and inference?

---

<div class="post-metadata">

**Author:** ![rahuljv](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rahuljv](https://forums.developer.nvidia.com/u/rahuljv)\
**Post date:** [April 21, 2025, 5:21am UTC](https://forums.developer.nvidia.com/t/tensor-rt-detection-issue/330687/6 "2025-04-21T05:21:09Z")

</div>

1.From .pt file to .onnx file  
yolo export model=best1.pt format=onnx opset=12 imgsz=640 dynamic=false  
2. From .onnx to .trt file  
/usr/src/tensorrt/bin/trtexec --onnx=best.onnx --saveEngine=best1.trt --fp16=false --int8=false

---

<div class="post-metadata">

**Author:** ![rahuljv](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rahuljv](https://forums.developer.nvidia.com/u/rahuljv)\
**Post date:** [April 21, 2025, 6:51am UTC](https://forums.developer.nvidia.com/t/tensor-rt-detection-issue/330687/7 "2025-04-21T06:51:44Z")

</div>

I want suggestions on how to move forward to clear those issues

---

<div class="post-metadata">

**Author:** ![AastaLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/aastalll/32/14043_2.png) [@AastaLLL](https://forums.developer.nvidia.com/u/AastaLLL)\
**Post date:** [April 21, 2025, 7:38am UTC](https://forums.developer.nvidia.com/t/tensor-rt-detection-issue/330687/8 "2025-04-21T07:38:23Z")

</div>

Hi,

After you convert the model into TensorRT, how do you feed the CSI camera input to the engine?  
Usually, this issue is caused by the different preprocessing (ex. RGB vs. BGR or NCHW vs. NHWC) when switching to TensorRT.

Could you share more info about how you feed the input into the TensorRT model?  
Thanks.

---

<div class="post-metadata">

**Author:** ![rahuljv](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rahuljv](https://forums.developer.nvidia.com/u/rahuljv)\
**Post date:** [April 21, 2025, 8:52am UTC](https://forums.developer.nvidia.com/t/tensor-rt-detection-issue/330687/9 "2025-04-21T08:52:54Z")

</div>

The output from the CSI camera is NV12 format and i used nvvidconv and videoconvert with gstreamer pipeline to convert the NV12 to BGRx and then to BGR

---

<div class="post-metadata">

**Author:** ![rahuljv](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rahuljv](https://forums.developer.nvidia.com/u/rahuljv)\
**Post date:** [April 22, 2025, 12:16pm UTC](https://forums.developer.nvidia.com/t/tensor-rt-detection-issue/330687/10 "2025-04-22T12:16:32Z")

</div>

Hi  
Can i get some help regarding this topic

---

<div class="post-metadata">

**Author:** ![AastaLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/aastalll/32/14043_2.png) [@AastaLLL](https://forums.developer.nvidia.com/u/AastaLLL)\
**Post date:** [April 23, 2025, 9:41am UTC](https://forums.developer.nvidia.com/t/tensor-rt-detection-issue/330687/11 "2025-04-23T09:41:05Z")

</div>

Hi,

It’s recommended to dump the BGR input to see if any issue.  
More, could you test your ONNX model with ONNXRuntime with the exact same input to verify the model itself first?

You can find an example in the below link:

> [@Under the int8 mode, the output of onnxruntime and tensorRT are inconsistent](https://forums.developer.nvidia.com/t/under-the-int8-mode-the-output-of-onnxruntime-and-tensorrt-are-inconsistent/224408):
>
> Description I have an int8 onnx model which has quantiz node and dequantize node, then I deploy it by onnxruntime and tensorRT, but I met a confusing output difference between them. There are two outputs during the model inference, I marked these output nodes with 434 and 448. If I only mark one of them, for example, only 434 as my output node and ignoring 448, there is barely gap between onnxruntime-model-output and TensorRT-model-output. The same is 448 as output node and 434 ignored. Howe…

More, just want to confirm that you are using Nano with JetPack 4, is that correct?  
Thanks.

---

<div class="post-metadata">

**Author:** ![rahuljv](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rahuljv](https://forums.developer.nvidia.com/u/rahuljv)\
**Post date:** [April 23, 2025, 11:02am UTC](https://forums.developer.nvidia.com/t/tensor-rt-detection-issue/330687/12 "2025-04-23T11:02:59Z")

</div>

No I use Jetson orin nano with jetpack 6

---

<div class="post-metadata">

**Author:** ![rahuljv](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rahuljv](https://forums.developer.nvidia.com/u/rahuljv)\
**Post date:** [April 23, 2025, 11:05am UTC](https://forums.developer.nvidia.com/t/tensor-rt-detection-issue/330687/13 "2025-04-23T11:05:06Z")

</div>

Can u provide me with inbuilt commands for conversion of .pt file to .onnx and then to convert it to .engine because I have done it already and just wanted check whether there is any difference in the commands

---

<div class="post-metadata">

**Author:** ![AastaLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/aastalll/32/14043_2.png) [@AastaLLL](https://forums.developer.nvidia.com/u/AastaLLL)\
**Post date:** [April 24, 2025, 7:56am UTC](https://forums.developer.nvidia.com/t/tensor-rt-detection-issue/330687/14 "2025-04-24T07:56:40Z")

</div>

Hi,

Please use trtexec to convert an ONNX model into TensorRT.

There are several options to save a PyTorch model into ONNX format.  
In general, you can use the below builtin function:

> **[torch.onnx — PyTorch 2.7 documentation](https://pytorch.org/docs/stable/onnx.html)**

Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [May 21, 2025, 1:14am UTC](https://forums.developer.nvidia.com/t/tensor-rt-detection-issue/330687/16 "2025-05-21T01:14:05Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
