Nvosd: no lables are drawn in some pipelines

• Hardware Platform: Jetson Nano
• DeepStream Version 5.0
• JetPack Version 4.5
• TensorRT Version 7.1.3 (standard)
• Issue Type question, possibly bug or mistake, not sure.


I have a custom Deepstream app, and a few pipelines for different sources.
Problem is, on my webcam pipeline with mjpeg decoder I dont see any classifier/tracker labels or any custom labels that I add via nvdsmeta.

The bounding boxes are still being shown correctly.
More than that, when I step through gst-nvosd - I can see that the correct labels are getting placed into nvdsosd->text_params, and are sent to nvll_osd_put_text() without any errors.

Interestingly, when I use my other piplene (with a mp4 file decoder) - I can see everything.
Supposedly in both cases OSD is just getting an RGBA buffer and the drawing should just work,
and I don’t know what to look for.

The cam pipeline looks like this

Please help :)

edit: i noticed that the cam pipeline had a different memory type chosen - nvbuf-mem-default, so I made streammux use MEM_SURFACE_ARRAY. Didin’t help.
I didn’t spot any other differences from the working pipeline. Feels like HW/CPU mode issue, since rects are drawn ok, but I don’t see lines or text.

Hey, have you tried the same based on deepstream-test2 and see if it can work?

Tried that just now.
I added my camera capture to test2 app, same approach. And no labels, just bounding boxes.
Unmodified test2 app correctly shows labels and bounding boxes.

I’ve attached the modified file if you want to check on your side.

As a sidenote: I strongly suspect this will work with nvjpegdec (currently I’m using the software decoder - jpegdec) - and it does work correctly on my normal computer with dgpu, and same cuda/trt etc. versions.
But on jetson nvjpegdec unfortunately segfaults in nvvideoconvert somewhere, I haven’t investigated that yet, but i doubt that I can do much since these are all closed-source libs.

deepstream_test2_app.c (15.6 KB)

Changing the input of nvstreammux to NV12 fixed the issue.
(it was RGBA)

I have no clue why, I might try investigating that later, but I’m a bit behind on this app, so I’ll have to just accept this as an accidental fix.