Nvdsanalytics Multiple ROI regions at "inverse-roi=1"

Please provide complete information as applicable to your setup.

• Hardware Platform (GPU)
• DeepStream Version 8.0.0
• TensorRT Version 10.9.0
• NVIDIA GPU Driver Version 580.95.05
• Issue Type: 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)

Running a source stream with nvinfer and nvtracker prior to the nvdsanalytics element with the config attached below
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

Hi there,

I am trying to configure multiple ignore regions with nvdsanalytics on a single stream with “inverse-roi=1”. I want to have tracks be filtered out if they occur in any one of the defined rois, however I am noticing a weird behavior where in order to be filtered out, a track must occur in all regions

What I have noticed is that:

  • When I only have one roi, the tracks are excluded correctly (only tracks inside of the region are excluded)
  • When I have multiple rois (and they do not overlap) and “inverse-roi=0” only tracks inside of the two separate regions are included
  • When I have multiple rois and “inverse-roi=1” only tracks that occur in all defined roi regions are excluded i.e. if there are no rois that overlap, not tracks will be filtered

I’ve attached my config below and an image of this occurring:

Config:

[property]
enable=1
osd-mode=2
config-width=1920
config-height=1080

[roi-filtering-stream-0]
enable=1
inverse-roi=1
roi-test-2=700;208;650;365;480;411;630;500;610;645;740;540;911;600;855;475;966;343;786;350
roi-test-1=800;100;1900;100;1900;1000;800;1000
class-id=-1

Please find the explanation of ‘inverse-roi’ in the doc. In the screenshot the count of test-2 is 2 because two boats are outside of roi-test-2. the count of test-1 is 3 because three boats are outside of test1. could you elaborate on the issue in the screenshot? Thanks!

Hello,

From my understanding :

  • In normal mode, “user_meta_data->roiStatus” contains the list of the zones in which the object is.
  • In inversed mode, “user_meta_data->roiStatus” contains the list of the zones in which the object is not.

So here is a logic that can be used :

  • In normal mode : keep the object if it is in at least one zone
  • In inversed mode : keep the object if it is in all zones

Hope it helps

do you mean there is no issue on the screenshot display and the issue is in user_meta_data->roiStatus? could you use share the related roiStatus information of the screenshot? Thanks!

Hey @fanzh,

I am not the author of the topic, just trying to share my experience if it may be helpful :D

Hi @henri

Admittedly I am still very new to deepstream and it’s intricacies.

My goal is to have a list of objects that do not exist in any of the set roi regions essentially fitting ignore regions of the image. My initial thought are to set inverse-roi to false and on the appsink end filter out for bboxes that have len(roiStatus) > 0.

Would there be another simpler solution I am missing?

Thanks

Thanks for the sharing! Here is a solution for your case.

  1. add multiple ROIs, and set all inverse-roi to 0.
  2. you can get object list from frame_meta->obj_meta_list. please refer the sample deepstream-test1.
  3. iterate over each object, and find which object is not in all ROIs by visiting roiStatus.
1 Like

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.

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