I’ve previously been told in a forum post that the ROI filtering is calculated by testing whether the centre pixel on the bottom of a bounding box is inside or outside the region.
Is this still the case with DS5.0+ ?
I have the following config file:
[property] enable=1 config-width=1920 config-height=1080 osd-mode=0 [roi-filtering-stream-0] enable=1 roi-Privacy=664;1080;111;576;1920;173;1920;0;0;0;0;1080;664;1080 inverse-roi=1 class-id=-1 [roi-filtering-stream-1] enable=1 roi-Privacy=333;1080;754;1080;856;809;1132;298;159;196;493;802;333;1080 inverse-roi=1 class-id=-1 [roi-filtering-stream-2] enable=1 roi-Privacy=636;393;1135;106;1920;357;1920;0;187;0;395;428;636;393 inverse-roi=1 class-id=-1
Just looking at the ROI for stream 0 in the file above:
The inverse flag is set so this means that if the bottom centre pixel of any classes bounding box is INSIDE or ON that region it should be ignored.
Can you please confirm this logic?
Because… I’m finding that it works except when objects are on the bottom edge of the frame like this example:
Here is a photo of what the region of interest looks like superimposed on a camera.
Here is an example video showing the ROI not working.
At about 3.5 seconds into the clip a red shaded bounding box is shown for one frame. This was correctly detected as in the inverse ROI so should be ignored (to do so I have coloured the box red to show).
But then the very next frame is a problem. The box is not shaded which means the ROI checking has failed. This box should be ignored as the bottom centre point is within the inverse ROI area.
What I do notice however is that the box coordinates are right at the bottom and left of the screen. So the y-coordinate of the bottom centre point being checked is 1080 (1080p video feed).
Could this be an off-by-one error in the nvdsanalytics code that checks whether a point is inside an ROI or not? If its not a bug how can I handle this situation because it means any bbox that touches the bottom of the frame does not with with ROI filtering?
Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU) Nana and Xavier NX
• DeepStream Version 5.0.1
• Issue Type( questions, new requirements, bugs) Potential bug
• 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)
To reproduce this issue just run a pipeline using the nvdsanalytics element and checks its ROI filtering on bboxes that are resting on the bottom of the frame. Left of the frame seems to work but bottom of frame does not.