Separate line cross count multi object

**• Jetson **
• deepstream 5.0
• jetpack 32.5.0
• tensorrt 7.1.3
• Bug/question

Hello,

We have 6 classes, and I’m trying to get line crossing count for every object separately.
The labels:

person
bicycle
car
motorcycle
bus
truck

The config:

[property]
enable=1
config-width=1920
config-height=1080
osd-mode=2
display-font-size=20
[line-crossing-stream-0]
enable=1
class-id=2
extended=0
mode=loose
line-crossing-Shimrit_car=684;648;688;936;132;800;1240;784;
[roi-filtering-stream-0]
enable=1
inverse-roi=0
class-id=2
roi-Shimrit_before_car=132;800;130;700;1238;684;1240;784;
roi-Shimrit_after_car=132;800;133;899;1241;883;1240;784;
[roi-filtering-stream-0]
enable=1
inverse-roi=0
class-id=0
roi-Shimrit_before_person=132;800;130;700;1238;684;1240;784;
roi-Shimrit_after_person=132;800;133;899;1241;883;1240;784;
[line-crossing-stream-0]
enable=1
class-id=0
extended=0
mode=loose
line-crossing-Shimrit_person=684;648;688;936;132;800;1240;784;

With this configuration, both lines’ count increases when a person crosses the line.
Am I using it wrong or is it not possible?
Ideally, I would like to configure just one line with multiple object ids and then get a map, that maps between the line label and a vector of tuples. The first element of the tuple would be the object id and the second would be the number of objects crossed. Maybe a map would be better as the value of the line label but something among this line. Since currently nvanalytics maps between the line label and the number of objects crossed I tried the above configuration as a walk around, but that also doesn’t work.

Thanks :)

Is it possible to share a repo?

No, sorry :(
But I can see the count increasing for both lines on the rtsp output stream not only in the code (osd-mode=2).
Also I can see the count increasing in objLCCumCnt defined in nvds_analutics_meta.h
My baseline is deepstream-app-test5.

Any sample video can be shared about this issue?

Hi @davidv1
Sorry! Current DeepStream nvdsanalytics should not support to count the line crossing per object id since “std::unordered_map<std::string, uint64_t> objLCCumCnt;” in /opt/nvidia/deepstream/deepstream/sources/includes/nvds_analytics_meta.h is not a tuple with object number.

Thanks!

So it is also not possible to configure several separate lines that count different objects?

It’s not support to count the line crossing for different objects, but we have add this support in our roadmap.

Thanks!