Gst-nvdsanalytics display ROIs and lines, but not labels

Please provide complete information as applicable to your setup.

**• Hardware Platform (Jetson / GPU)**Jetson NX
**• DeepStream Version 6.2
**• JetPack Version (valid for Jetson only)5.1

I used deepstream’s Gst-nvdsanalytics component. Depending on the requirements of the project, the OSD output only needs to display ROIs and lines, but not labels. The osd-mode setting does not meet this requirement, and I wonder if the output of the labels can be removed programmatically.

Have you tried to set the display-text=0 and it doesn’t work?

Thank you for your reply. Because there are other labels that need to be displayed (such as the ID of the target…). ), so I can’t close all the labels. It just needs not to show the label of ROIs. I want to close from the program, but I don’t know how to get this information

You can learn our nvdsmeta structure carefully first:sources\includes\nvdsmeta.h. Then you can get the NvOSD_TextParams from the probe function in your app. You can just set the relevant alpha para to 0 to let the text be transparent.

I got NvOSD_TextParams,and I can change other labels(such as object’s id,class…), but it doesn’t seem to contain the labels (names of ROIs) of the nvdsanalytics output.

You can refer to our demo code: sources\apps\sample_apps\deepstream-nvdsanalytics-test\deepstream_nvdsanalytics_meta.cpp to get the nvdsanalytics meta and change the paras of NvDsAnalyticsObjInfo.

Thanks. I refer the doc and demo code,but cannot find the paras of label .

/////////////////////////
NvDsAnalyticsFrameMeta include:
ocStatus – dict<str, bool>, Holds a map of boolean status of overcrowding for configured ROIs,which can be accessed using key, value pair; where key is the ROI label.

objInROIcnt – dict<str, int>, Holds a map of total count of valid objects in ROI for configured ROIs,which can be accessed using key, value pair; where key is the ROI label.

objLCCurrCnt – dict<str, int>, Holds a map of total count of Line crossing in current frame for configured lines, which can be accessed using key, value pair; where key is the line crossing label.

objLCCumCnt – dict<str, int>, Holds a map of total cumulative count of Line crossing for configured lines, can be accessed using key, value pair; where key is the line crossing label

unique_id – str, Holds unique identifier for nvdsanalytics instance.

objCnt – int, Holds a map of total count of objects for each class ID, can be accessed using key, value pair; where key is class ID.

/////////////////////////
NvDsAnalyticsObjInfo include:
roiStatus – list of str, Holds the array of ROI labels in which object is present.

ocStatus – list of str, Holds the array of OverCrowding labels in which object is present.

lcStatus – list of str, Holds the array of line crossing labels which object has crossed.

dirStatus – str, Holds the direction string for the tracked object.

unique_id – int, Holds unique identifier for nvdsanalytics instance.


I hope to only remove the label in the red box, and Keep other labels。

We only support the following three modes currently:

#osd-mode 0: Dont display any lines, rois and text
#         1: Display only lines, rois and static text i.e. labels
#         2: Display all info from 1 plus information about counts

We will confirm whether to add this special mode in the future.

Can I modify what NVDSAnalytics displays through the program? Such as the content of lable, the color of the ROI’s line, and so on

Yes. You can get the display-meta in your app and when you find the corresponding text, just set the alpha para to 0. You can refer to the simple code below to get the display meta:

        NvDsMetaList *display_meta_list = NULL;
        display_meta_list = batch_meta->display_meta_pool->full_list;
        NvDsDisplayMeta *display_meta = NULL;
        NvDsMetaList *l = NULL;
        NvOSD_TextParams *txt_params = NULL;
        for (l = display_meta_list; l != NULL; l = l->next)
        {
          display_meta = (NvDsDisplayMeta *)(l->data);
          txt_params = &display_meta->text_params[0];
          g_print("txt %s\n", txt_params->display_text);
        }

thanks

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