Multiple ROI filtering with different class ID

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) Jetson Orin Nano
• DeepStream Version 6.3
• JetPack Version (valid for Jetson only) 5.1.2
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs) questions
**• How to reproduce the issue ?
how I can filter out counting my object with multiple regions but each region only counts one classID object. I have already defined it like this but the class ID 0 and 2 are shared for both regions RF1 and RF2. I want RF1 counts objects of class 0 and RF2 counts objects of class2.

[roi-filtering-stream-0]
enable=1
#ROI to filter select objects, and remove from meta data
roi-RF1=200;523;779;524;779;1028;200;1028
roi-RF2=1000;643;1350;634;1350;913;1000;913
class-id=0;2
inverse-roi=0

currently the nvdanalytics can not support this setting directly because nvdanalytics can distinguish different ROIs by “roi-”, but it can distinguish different class-id in the same [roi-filtering-stream-n].
nvdanalytics plugin is opensource. you can modify the parsing configurations code nvdsanalytics_parse_roi_filtering_group to customize. for example, the following code can let the different ROIs process different classid.

 for (ROIInfo & roi:roi_vec) {
   roi.enable = enable;
   roi.inverse_roi = inverse_roi;
   roi.operate_on_class = operate_on_class_vec;
 }
// new code
 for (ROIInfo & roi:roi_vec) {
   printf("last label:%s\n", roi.roi_label.c_str());
   if(i == 0) {
     roi.operate_on_class[0] = 2;
   } else {
     roi.operate_on_class[0] = 0;
   }
   i++;
 }
//--new code

Thanks for your reply, I instead used overcrowding region for the other class. I think that would also work.

thanks for the sharing! yes, overcrowding checking also will count the objects in the ROI. for example,

...... Person Count = 6 Objs in ROI OC = 3 Overcrowding status OC = 1

Is this still an DeepStream issue to support? Thanks!

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