Now it seems, that the background is not recognising the width of the bounding box and applies an (estimated) width of 20 px in addition to the wrong color.
I tried same code on a DS 5.1 docker on DGPU since I don’t have a handy Jetson Nano device and it can work well, I will find a Jetson device to see if can repro the issue.
sorry for the delay, also give a solution for this issue in case others met the same, this issue caused by the VIC limitation and OSD default process-mode is VIC mode, however the mode is GPU mode for dgpu, that’s why the issue cannot repro on my T4. So currently we can set the process-mode of nvdsosd to GPU mode to bypass the issue.
Thanks. Could you please tell me more about the difference of process-mode 2 and 1? I’m currently setting process-mode to 2 in my code, if not working completely headless:
if not self.headless:
nvosd = Gst.ElementFactory.make("nvdsosd", "onscreendisplay")
nvosd.set_property('process-mode', 2) # Hardware
nvosd.set_property('display-text', 1) # Enabled
else:
nvosd = Gst.ElementFactory.make("fakesink", "onscreendisplay")
I think that should depend on your use case. e.g. in your pipeline, there are some CNN models which consume more GPU, then better to use VIC mode. otherwise, you can choose GPU mode if you really need to draw the lillte bboxes width or height < 16