I am using v1.1.8, does it not support for deepstream 6.2?
I did change it to v1.1.6 I am still getting this error
deepstream | 2024-01-24T11:59:29.501322547Z Traceback (most recent call last):
deepstream | 2024-01-24T11:59:29.501372387Z File “main.py”, line 1055, in osd_sink_pad_buffer_probe
deepstream | 2024-01-24T11:59:29.501709395Z masks = pyds.NvOSD_MaskParams.get_mask_array(mask_data)
deepstream | 2024-01-24T11:59:29.501739345Z AttributeError: type object ‘pyds.NvOSD_MaskParams’ has no attribute ‘get_mask_array’
Here is mask part in my Code
batch_meta = pyds.gst_buffer_get_nvds_batch_meta(hash(gst_buffer))
l_frame = batch_meta.frame_meta_list
while l_frame is not None:
try:
# Note that l_frame.data needs a cast to pyds.NvDsFrameMeta
# The casting is done by pyds.NvDsFrameMeta.cast()
# The casting also keeps ownership of the underlying memory
# in the C code, so the Python garbage collector will leave
# it alone.
frame_meta = pyds.NvDsFrameMeta.cast(l_frame.data)
n_frame = pyds.get_nvds_buf_surface(hash(gst_buffer), frame_meta.batch_id)
except StopIteration:
break
l_user = frame_meta.frame_user_meta_list
frame_number = frame_meta.frame_num
l_obj = frame_meta.obj_meta_list
while l_obj is not None:
try:
obj_meta = pyds.NvDsObjectMeta.cast(l_obj.data)
mask_data = pyds.NvOSD_MaskParams.cast(l_obj.data)
# masks = mask_data.get_mask_array(mask_data)
masks = pyds.NvOSD_MaskParams.get_mask_array(mask_data)
print(masks)
# obj_meta.rect_params.has_bg_color = 1
# obj_meta.rect_params.bg_color.set( 0.0, 1.0, 0.0, 0.2 )
except StopIteration:
error("Iteration Stopped from OnScreenDisplay due to an Exception in masks values")
break
# obj_meta.rect_params.border_color.set(0.0, 0.0, 1.0, 0.0)
try:
l_obj = l_obj.next
except StopIteration:
break
Adding to the above code
for print(dir(mask_data), dir(pyds.NvOSD_MaskParams))
I am getting this
deepstream | 2024-01-24T12:08:01.923371068Z ['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'cast', 'data', 'height', 'size', 'threshold', 'width'],
['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'cast', 'data', 'height', 'size', 'threshold', 'width']
According to the source code it should have this function right:
py::class_<NvOSD_MaskParams>(m, "NvOSD_MaskParams",
pydsdoc::NvOSD::NvOSD_MaskParams::descr)
.def(py::init<>())
.def_readwrite("data", &NvOSD_MaskParams::data)
.def_readwrite("size", &NvOSD_MaskParams::size)
.def_readwrite("threshold", &NvOSD_MaskParams::threshold)
.def_readwrite("width", &NvOSD_MaskParams::width)
.def_readwrite("height", &NvOSD_MaskParams::height)
.def("get_mask_array",
[](NvOSD_MaskParams &self) -> py::array