Overwriting predictions labels in python binding demo application

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) GOPU
• DeepStream Version 6.3
• JetPack Version (valid for Jetson only)
• TensorRT Version 8.6.1
• NVIDIA GPU Driver Version (valid for GPU only) 12.2
• Issue Type( questions, new requirements, bugs)
I want to override the prediction out of nvinfer module and want to override with different class id. I have modified osd_sink_pad_buffer_probe function to have below changes but bounding box labels are not changed. I tried to update the buffer using pyds.gst_buffer_add_nvds_meta(hash(gst_buffer)) its changing the bounding box label but getting type error on the console. Appreciate any guidance to update same.
while l_obj is not None:
# Casting l_obj.data to pyds.NvDsObjectMeta
obj_meta = pyds.NvDsObjectMeta.cast(l_obj.data)
except StopIteration:
print (obj_meta)
print (“************** %s” %obj_meta.class_id)
obj_counter[obj_meta.class_id] += 1
obj_meta.rect_params.border_color.set(0.0, 0.0, 1.0, 0.8) # 0.8 is alpha (opacity)
print (obj_meta.class_id)
if obj_meta.class_id == 10 or obj_meta.class_id == 3:
obj_meta.class_id = 0
l_obj = l_obj.next
except StopIteration:

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

How did you confirm that bounding box labels are not changed? Can you use one of our demo deepstream_python_apps to reproduce this scenario?

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