Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU): Jetson • DeepStream Version: 6.0.1 • JetPack Version (valid for Jetson only): 4.6.2 • TensorRT Version: 8.2.1-1+cuda10.2 • NVIDIA GPU Driver Version (valid for GPU only) • Issue Type( questions, new requirements, bugs): questions • 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) • Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)
I found that a person whose bounding box has not intersected with the configured line is sometimes regarded to cross the line.
The count increases when the bounding box is away from the line.
Here is a part of nvdsanalytics config related to line-crossing:
The false counts persist even when setting “mode” to “strict”.
I am wondering how the nvdsanalytics plugin, which deepstream-occupancy-analytics depends on, counts line crossing.
My understanding is that the count for the configured line increases by one when a straight line segment between bottom centers of bounding boxes with the same tracking-id in consecutive two frames intersects the configured line and the angle between them satisfies a certain condition that is determined by “mode” in nvdsanalytics config.
Is this kind of false line-crossing count a known issue?
And, if my understanding is not correct, could you tell me how nvdsanalytics counts line crossing?
Thank you.
Thank you.
But sorry, for now the original input video cannot be shared because it contains information of my customer.
If some video reproducing the same issue becomes available, I will let you know.
about “For line “Exit”, 00:15 (ID=22), 00:18 (ID=1), 00:38 (maybe ID=43), and 01:01 (ID=47).”, after checking again, there are some counting errors.
at 00:08 (ID=22), 00:30 (ID=43) , the person passed the line, but nvdsanalytics did not count.
at 00:15 (ID=1), the person did not pass the line, but nvdsanalytics counted.
about “For line “Entry”, 00:16 (ID=12), 00:26 (ID=11), 01:16 (ID=70), and 01:28 (ID=31).”. it is expected because the moving direction is not the same with the line’s.
about “at 00:08 (ID=22), 00:30 (ID=43)” 's issue, please refer to nvdsanalytics , nvdsanalytics plugin will check the bottom center coordinate(x_left + width/2, y_top + height). when the person 's bottom center coordinate passed the crossing line, the bbox disappeared because the person’s body left the frame partially, as a result, nvdsanalytics did not count.
about “For line “Exit”, 00:15 (ID=22), 00:18 (ID=1), 00:38 (maybe ID=43), and 01:01 (ID=47).”, after checking again, there are some counting errors.
at 00:08 (ID=22), 00:30 (ID=43) , the person passed the line, but nvdsanalytics did not count.
at 00:15 (ID=1), the person did not pass the line, but nvdsanalytics counted.
about “For line “Entry”, 00:16 (ID=12), 00:26 (ID=11), 01:16 (ID=70), and 01:28 (ID=31).”. it is expected because the moving direction is not the same with the line’s.
Could you tell me whether these comments are for your output video or my output video?
If your output video is different from mine, could you share it via forum private message?
about “at 00:08 (ID=22), 00:30 (ID=43)” 's issue, please refer to nvdsanalytics , nvdsanalytics plugin will check the bottom center coordinate(x_left + width/2, y_top + height). when the person 's bottom center coordinate passed the crossing line, the bbox disappeared because the person’s body left the frame partially, as a result, nvdsanalytics did not count.
I tested restnet10 and peoplenet models based on the configuration and video you shared. I can’t see that “00:15 (ID=22),…” timestamp and trackerid in my output video. " 00:08 (ID=22), 00:30 (ID=43)" is my test video result.
As I mentioned in my personal message, I used peoplenet with resnet34 backbone. I think this makes the results different.
Could you please try with the model I used?
I also noticed that in your video the color of a counted bounding box does not change.
Is there any other difference between your and my setups? For example, I’m running DeepStream with version 6.0.1 on Jetson.
yes, I tested restnet10 and resnet34 you shared. both get the same result, at 00:08 (ID=22), the person passed the line, but nvdsanalytics did not count.
I tested on deesptream6.2 xavier and deepstram6.3 T4. As I said in the email, you can change the crossing line’s positon to improve.
Thanks, I understand the situation! I will put your advise to good use.
Now I suspect false counting is caused due to my DeepStream version.
I am afraid that it is difficult to immediately update DeepStream in my Jetson.
Would it be possible for you to test on DeepStream6.0.1 and Jetson Xavier?
it is related to the detector model. if you don’t want to change line’s position, you can use other models with high accuracy.
Take timestamp “00:08” for example, when the person’s bottom center coordinate passed the crossing line, the body was covered. both restnet10 and resnet34 can’t give bbox, but yolov7 can give the bbox. with the bbox, the count added one finally .
Thank you.
But I think this does not account for a false count for person ID=1 at “00:18” in my output video, for example. He seems to be detected and tracked successfully.
This false count does not occur in your output video, so I guess the issue is related to DeepStream version.
About the “false count at 00:18” issue. we can see the person with ID1 bypassed the crossing line and the count was added incorrectly. I can reproduce this issue. it is because nvdsanalytics was using the start object and current object to get the moving line when fps is low. the video you shared only has about 2 fps. we will continue to check.
yes, low fps means low objects count. if fps is low, the start objects will be used to get moving line, if fps is high, the recent consecutive objects will be used.
gst-nvdsanalytics is opensource in ds6.3, the code path is /opt/nvidia/deepstream/deepstream/sources/gst-plugins/gst-nvdsanalytics, you can set “obj-cnt-win-in-ms=2” in nvdsanalytics 's configuration file. but please apply this patch first because of the bug. 1.diff (817 Bytes)
here are the detailed steps:
apply the patch, then rebuild according to the readme.
replace -rw-r–r-- 1 root root 93048 Aug 20 15:33 /opt/nvidia/deepstream/deepstream/lib/gst-plugins/libnvds_dsanalytics.so with new libnvds_dsanalytics.so.