Nvanaltic recongise reverse direction with direction setting

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
RTX 3090
• DeepStream Version
DS 6.2 - Deepstream Triton Docker image
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
bugs, question
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
Run deepstream-nvdsanalytics with following settings.



# LC 1
# x1d;y1d;x2d;y2d;x1c;y1c;x2c;y2c
# direction: (x1d, y1d) to (x2d, y2d)
# line: (x1c, y1c) to (x2c, y2c)

# Dir 1

• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

Hi all,

I was testing deepstream-nvdsanalytics and have serval questions:

  1. It seems the direction module in nvanalytic also recognise the class in reverse direction.

  2. Can I create 2 ROI labels or Line crossing lables with different class id?

Many thanks!

could you highlight in the screenshot? Thanks!

yes, please refer to the doc, for example, roi-filtering-stream-0 uses class-id=0, roi-filtering-stream-1uses class-id=1.

The middle person with red cloth and bike have both DIR: South DIR: North in the middle of the images.

Yes I noticed that we can have different ROI for multiple streams. I am wondering if we can have multiple ROI settings in single stream. From the doc we can only have multiple ROI labels, but they share the same class id configurations.

  1. using the configuration with yours, I can reproduce this issue, namely one object has two opposite directions. here is the screenshot. we will check.
    I printed object’s displaytext in nvosd’s sink probe function, the displaytext aslo has two directions.

t:Bicycle 67 DIR:South DIR:North

  1. currently in one stream, all ROIs share the class-id configurations. do you want to this kind of setting? roi-ROI has own class-id?
  1. Thanks!

  2. Yes. In my use case, I need to check different classes in overlapping ROI.

I tried getting the label from NvDsUserMeta.There’s no duplicated direction label in the meta despite the duplicated direction labels show on the screen after OSD.

after adding a probe function on nvosd’s sink, object’s displaytext also has two directions. like this, t:Bicycle 67 DIR:South DIR:North

I saw only 1 label when I probe into the source of OSD.

could you share the test probe function? Thanks!

my function to get the analytic label from obj_user_meta_list

def get_analytic_labels(obj_user_meta_list):
    labels = {'roi': None, 'lc': None, 'dir': None}
    while obj_user_meta_list:
            obj_user_meta = pyds.NvDsUserMeta.cast(obj_user_meta_list.data)
            obj_user_meta: pyds.NvDsUserMeta
            if obj_user_meta.base_meta.meta_type == pyds.nvds_get_user_meta_type("NVIDIA.DSANALYTICSOBJ.USER_META"):
                user_meta_data = pyds.NvDsAnalyticsObjInfo.cast(obj_user_meta.user_meta_data)
                labels['roi'] = user_meta_data.roiStatus
                labels['lc'] = user_meta_data.lcStatus
                labels['dir'] = user_meta_data.dirStatus
        except StopIteration:
        obj_user_meta_list = obj_user_meta_list.next
    return labels

I printed object’s displaytext in nvosd’s sink probe function, the displaytext aslo has two directions.

This is what I am geting.

obj: person id: 33 conf: 0.73 tracker_conf: 0.59 
{'roi': ['roi_label_1'], 'lc': [], 'dir': 'dir_label_1'}

ref: NvDsAnalyticsObjInfo — Deepstream Deepstream Version: 6.2 documentation
It seems like the Python API could only provide 1 label since it is a str. I can’t see multiple direction labels in my console, but it does show on OSD.

  1. dirStatus only has one direction when there are two matching directions.
    it is a known issue, please refer to 249695, we will fix it in the following version.
  2. using your configuration, some objects have two opposite directions.
    after checking, nvanalytics plugin do will give two directions to some objects, we are checking if it is an accuracy issue.

it is because the rectangle of bboxes will change, especially the bike and car 's boxes rectangle are sometimes bigger and sometimes smaller.

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