Sgie's bbox goes beyond the pgie

**• Hardware Platform (Jetson / GPU) Jetson orin nx
**• DeepStream Version: 6.2
**• JetPack Version (valid for Jetson only) 5.1.1
**• TensorRT Version8.2.2

When I run two detection models of yolov5n, one pgie(vehicle) and one sgie(tail), the sgie’s bbox goes beyond the pgie,
the srcWidth=1920 and srcHeight=536.

The result is shown below
image

And my pipline :

  1. is the green circle ROI?
  2. can you use this simple sample to test your models? this sample supports two back to back detectors.

Two red ROI, pgie(vehicle) → sgie(tail).
I think the tail detector’s bbox should be inside vehicle0’s bbox, but it isn’t

  1. I try it, but it not correct.
    The tail relative to the top of the vehicle is 402, but the vehicle is only 395,beyond that.

from the highlight data in the picture, 395 should be the vehicle’s height, the vehicle’ bottom should be 134+395.
why dose this blue car have no tail part?

The tail part of the blue car is the highlighted part of the oval.
Because the top of tail is 402 and the top of vehicle is 134, 402+134=536 . It overlaps the border of picsrc

the vehicle’ bottom is 134+395 = 529, the tail 's bottom is 402+80 = 482. the tail is still inside of vehicle rect because 482 is smaller than 529.

I think the top of tail 402 is relative to 134, not relative to picture. so the tail’ bottom is 134+402+80 = 616.

could you provide the tail model and source video? Thanks, I will have a try, you can share with forum private email.

sure, just only tail model, not need vehicle model ?

Thank you, please the whole project if you can.

I send the demo refer simple sample. Please check ,thanks

please try this fix:
fix.txt (927 Bytes)

  1. add this code to /opt/nvidia/deepstream/deepstream/sources/gst-plugins/gst-nvinfer/gstnvinfer_meta_utils.cpp.
  2. In gst-nvinfer directory, rebuild libnvdsgst_infer.so, then replace /opt/nvidia/deepstream/deepstream/lib/gst-plugins/libnvdsgst_infer.so with the new so.
1 Like

Thanks for your solution, I changed it a little bit earlier, like this

I just want to know the real cause of this problem, because the tail’ top is out of vehicle’ height , it mean the center coordinate(x,y) is out of source, But this does not happen in yolov5.

I review the preprocess’ source of about “maintain-aspect-ratio=1, symmetric-padding=1”, it right.
But I have a doubt about the part of RGB

when the infer start(gst_nvinfer_start),


It always is NVBUF_COLOR_FORMAT_RGBA when I use VIC to process my picture
But my model is RGB

  1. did you try the fix code? can it fix the original issue?
  2. let’s focus on the original issue, if meeting a new issue, please open a new topic, thanks!

Yes, it’s fixed. Thanks for your help
I will open a new topic about new issue

1 Like

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