People crossing lines slowly are not counted in deepstream-occupancy-analytics

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)

This topic is related to my previous post False line-crossing count for persons who do not pass the line in deepstream-occupancy-analytics.
Thanks to your support, the false count issue for person bypassing a configured line can be solved by applying a patch and tuning a nvdsanalytics parameter “obj-cnt-win-in-ms”.

However, when using a tuned “obj-cnt-win-in-ms” (~ input video fps), I found that people crossing configured lines slowly were not counted.
(People crossing fast were counted correctly.)
This issue does not occur if “obj-cnt-win-in-ms” is increased, but in this case I suffer from the false count issue.

Is there any way to avoid overlooking people crossing lines slowly without increasing “obj-cnt-win-in-ms”?

Thank you.

if did not set obj-cnt-win-in-ms, you can use the default value, which is same with the previous logic. please refer to this sample code.
whole.txt (680 Bytes)

Thank you for the quick reply.

When obj-cnt-win-in-ms is small, e.g. 5 for 5 fps input video, slowly moving people are not counted.
On the other hand, when obj-cnt-win-in-ms is large, e.g. 50 (the default value), quickly bypassing people are incorrectly counted.
I am afraid that your proposed code does not solve the dilemma when the two kinds of people appear in the same input video.

I am wondering if there is any solution.

In the last topic, the video is 2fps and obj-cnt-win-in-ms is set 2. the line crossing checking worked well. about this new case, could you share the video and configuration file? Thanks! You can use forum private email. please click forum avatar-> personal messages->new message.

what is the source 's fps? if fps is high, we don’t need to set obj-cnt-win-in-ms. could you share the video and configuration file? Thanks!

Thank you very much.
When video and config reproducing the same issue become available, I will let you know by forum private email.

Thanks for the sharing! I will try to reproduce.

person 18 is a special case because he bypassed the crossing line besides low fps. we don’t need to lower obj-cnt-win-in-ms for other persons. currently this obj-cnt-win-in-ms is a global variable. nvdsanalytics plugin dose not support setting obj-cnt-win-in-ms respectively for single object or crossing line.

Thank you very much for checking.
Is there any plan to modify nvdsanalytics plugin for this issue in future DeepStream, like adapting obj-cnt-win-in-ms depending on moving speed of each person?

  1. about “adapting obj-cnt-win-in-ms depending on moving speed of each person”, AYK, it is hard to measure moving speed because the moving direction is not fixed.
  2. from DS6.3, nvdsanalytics plugin is opensource and nvdsanalytics low-level lib is still closed source. you can also customize own line crossing algorithm.

Thank you for the reply.

you can also customize own line crossing algorithm.

I’ll try this approach.
Thank you very much for kind support about this issue.

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