Nvdsanalytics sometimes counts line crossing that haven´t happened

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU): GPU
• DeepStream Version: 5.0
• TensorRT Version: 7.1.3-1+cuda10.2
• NVIDIA GPU Driver Version (valid for GPU only): 440.33.01
• Issue Type( questions, new requirements, bugs): Bugs or issues

Hi,

We are using nvdsanalytics to detect objects crossing a line. It works fine but we are finding an issue sometimes as it detects some line crossing that is not happening. The counted object is far from the line but nevertheless is counted sometimes.

Below, I send an example of object detected and the coordinates generated when the line is crossed:
Frame Number = 305 of Stream = 0, Objs in ROI RF = 3 LineCrossing Cumulative Entry = 1 LineCrossing Cumulative Exit = 3 LineCrossing Current Frame Entry = 0 LineCrossing Current Frame Exit = 1 | [8, 305, fuera, 1425.36, 229.599, 155.009, 133.099]

The last values of previous line correspond with “[class_id, frame_number, direction, x, y, width, height]” of the object.

I also copy the nvdsanalytics file we are using. It can be observed that the entry/exit line is far away from the object x value.

Nvdsanalytics config file:
[property]
enable=1
#Width height used for configuration to which below configs are configured
config-width=1280
config-height=720
osd-mode=2
#Set OSD font size that has to be displayed
display-font-size=12

[roi-filtering-stream-0]
#enable or disable following feature
enable=1
#ROI to filter select objects, and remove from meta data
roi-RF=0;0;1280;0;1280;720;0;720
#remove objects in the ROI
inverse-roi=0
class-id=-1

[roi-filtering-stream-2]
#enable or disable following feature
enable=0
#ROI to filter select objects, and remove from meta data
roi-RF=295;643;579;634;642;913;56;828
#remove objects in the ROI
inverse-roi=1
class-id=0

[overcrowding-stream-1]
enable=0
roi-OC=295;643;579;634;642;913;56;828
#no of objects that will trigger OC
object-threshold=3
class-id=0;1;2

[line-crossing-stream-0]
enable=1
#Label;direction;lc
line-crossing-Exit=720;550;800;550;800;10;800;700
line-crossing-Entry=880;550;800;550;800;10;800;675
class-id=-1
#extended when 0- only counts crossing on the configured Line
extended=1
#LC modes supported:
#loose : counts all crossing without strong adherence to direction
#balanced: Strict direction adherence expected compared to mode=loose
#strict : Strict direction adherence expected compared to mode=balanced
mode=balanced

[direction-detection-stream-0]
enable=1
#Label;direction;
direction-dentro=720;550;800;550
direction-fuera=880;550;800;550
class-id=-1

So far this issue has only appeared with one type of objects (objects with class ID 8). However, I´m not sure if this can be connected with the issue.

Thanks in advance.

Can you disable this item?

We have disabled it, but the problem persists.

I saw you enabled it in your config, also can you set the mode=strict.
Keep in mind we use bottom center of the object to decide if the object cross the line or not