Our yolov5s TensorRT 8 version can work well on Nano but cannot work well on NX

Hello, Dear NVIDIA Team,

I did some changes to have made our yolov5s, which was implemented basing on TensorRT 7, work well with TensorRT 8 on Jetson Nano on which JetPack4.6 is flashed, but now I find the same code cannot work well with TensorRT 8 on Jetson NX on which JetPack4.6 is also flashed, there is not any compiling error or running error, the model can do inference, but detects out nothing in image or video, while the same model can detect out persons in image or video on Nano, this is very strange, I cannot think out what is wrong with TensorRT8 on NX, could you please have a look with our code ?
All code and video and model weights files are zipped and attached here:
yolov5_trt8.zip (23.5 MB)

Flash your NX with the corresponding Jetpack4.6 image, download and extract the zip file, then do:

  1. mkdir build && cd build
  2. cmake …
  3. make -j
  4. ./yolov5 -s …/yolov5s_20classes.weights yolov5s.engine
  5. ./yolov5 -v yolov5s.engine …/palace.mp4
    then you will see log printings output repeatedly like:
    prob[0] 0.000000, res.size :0
    this means nothing is detected out by the model.

If you do the above steps on Nano, the output should be like:
prob[0] 739.000000, res.size :18
prob[0] 755.000000, res.size :17
prob[0] 764.000000, res.size :18
prob[0] 748.000000, res.size :17
prob[0] 730.000000, res.size :17

and so on, till the video ends, and then you will find a result video palace.mp4-det.mp4 is generated under the directory where palace.mp4 lies, and you will see model has detected out persons and heads as expected in the result video.

We want to do a project on NX, but are blocked here by this issue.

CMakeLists.txt line 32
set(SMS 52 53) → set(SMS 52 53 72)

Thanks a lot.

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