Nvods bbox colors different on Tegra

• Hardware Platform (Jetson / GPU)
All of the above
• DeepStream Version
5.0 DP
• JetPack Version (valid for Jetson only)
4.4
• TensorRT Version
7.1
• NVIDIA GPU Driver Version (valid for GPU only)
440

I have some code that i use to modify display meta for the osd element:

      // get how dangerous the object is as a float
      how_dangerous = calculate_how_dangerous(l_obj, rect_params->height);

      // make the box opaque and red depending on the danger

      color_val = (how_dangerous * 0.6f);
      color_val = color_val < 0.6f ? color_val : 0.6f;

      rect_params->border_width = 0;
      rect_params->has_bg_color = 1;
      rect_params->bg_color.red = color_val + 0.2f;
      rect_params->bg_color.green = 0.2f;
      rect_params->bg_color.blue = 0.2f;
      rect_params->bg_color.alpha = color_val + 0.2f;

On x86_64 the code works as expected, and the boxes turn red. On Tegra, however, the boxes turn green (almost as if .red and .green are swapped). Is it my code, or is this a bug in DeepStream?

can you attach one picture to show it? not quite follow.

Sorry I wasn’t clear.

Here is x86:


Here is tegra:

Boxes are supposed to be transparent grey (rgba .2,.2,.2,.2) when a person is detected, and more solid red (rgba 0.8,.2,.2,.8) as they get closer than their bbox height to each other.

The code is identical, yet behaves differently on Tegra. If you use this code here as a pad probe of type buffer you should be able to replicate.

If you’re in a hurry and are allowed to run docker images (pip3 install youtube-dl required for those sources, or you can use anything uridecodebin supports instead):
x86:

docker run --gpus all -p 8554:8554 --rm mdegans/nvalhalla:v0.1.7-x86 --kenneth --uri $(youtube-dl -f best -g https://www.youtube.com/watch?v=F2MYKj_6-rs) --uri $(youtube-dl -f best -g https://www.youtube.com/watch?v=D3Kh0PFg5bI) --uri $(youtube-dl -f best -g https://www.youtube.com/watch?v=0ipNbOr82sg) --uri $(youtube-dl -f best -g https://www.youtube.com/watch?v=h57pGct-6gE)

tegra:

docker run --runtime nvidia -p 8554:8554 --rm mdegans/nvalhalla:v0.1.7-tegra --sink rtsp --kenneth --uri $(youtube-dl -f best -g https://www.youtube.com/watch?v=F2MYKj_6-rs) --uri $(youtube-dl -f best -g https://www.youtube.com/watch?v=D3Kh0PFg5bI) --uri $(youtube-dl -f best -g https://www.youtube.com/watch?v=0ipNbOr82sg) --uri $(youtube-dl -f best -g https://www.youtube.com/watch?v=h57pGct-6gE)

notes:

  • --sink rtsp can be changed to --sink screen on Tegra if a display is connected (only tested in multi-user.target)
  • the code running in the docker image is newer than the above (now it’s in a separate plugin, and has some foreground/background filtering logic), however it exhibits the same behavior.

Hi,
Fix will be available in upcoming release.

1 Like

Thanks, @Amycao!