I am running deepstream-nvdsanalytics-test application in “source/apps/sample_apps/”. I am counting objects of different classes crossing defined line (line count).
My query is, can I seperate total count based on classes? For example if 4 objects crossed the line lets say 2 persons and 2 cars then how can I get the separate count of cars and people who crossed the line?
I tried looking into metadata (specifically in frame_user_meta_list) to get count based on classes but didn’t found any.
Thank you in advance
• Hardware Platform (GPU) • DeepStream Version - 5.0(Docker) • NVIDIA GPU Driver Version 440.33.01
The deepstream-test 1 only contains the counting module to count the objects from different classes within the current frame. I think both author and I mean to count the objects having crossed the virtual line instead and get an accumulated count from frame#1 to the current frame, with respect to different classes as well. For example "People:20 Car:35 ".
I looked into deepsteam_nvdsanalytics_test.cpp from /opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-nvdsanalytics-test. It looks like it only supports give a total count of objects crossed the line, like"exit:55", rather than presenting the counts regarding different classes like "People:20 Car:35 ".
The line crossing counting was called by meta->objLCCumCnt and it’s defined in this link . And it said “holds a map of total cumulative count of Line crossing for configured lines, can be accessed using key, value pair; where key is the line crossing label.” But looks like “exit” is the only crossing label I have found yet. Do you know where it is defined?
Do you have any solution to count the objects having crossed line, with respect to difference class labels, rather than"exit"?
Holds a map of total count of objects for each class ID, can be accessed using key, value pair; where key is class ID.
The line crossing counting was called by meta->objLCCumCnt and it’s defined in this link . And it said “holds a map of total cumulative count of Line crossing for configured lines, can be accessed using key, value pair; where key is the line crossing label.” But looks like “exit” is the only crossing label I have found yet. Do you know where it is defined?
Do you have any solution to count the objects having crossed line, with respect to difference class labels, rather than"exit"?
labels will get parsed from configuration group marked as bold black font.
line-crossing-stream-* #line-crossing-Entry=1072;911;1143;1058;944;1020;1297;1020;
line-crossing-Exit=789;672;1084;900;851;773;1203;732
Thanks! I tried using this element std::unordered_map<int, uint32_t> objCntbut it is still counting the number of objects presented in the current frame only, not accumulated count from frame 1 to now, about how many objects from multiple classes passed the virtual line.
My hope is to combine this multi-class in-frame counter with the element objLCCumCnt together so that it can count the objects in terms of classes that passed the virtual line. But I don’t think there is a way to use such an index unless I created multiple virtual line configs for different classes.
BTW, thanks for pointing out the place where the label is defined.
You want to count the number for specific class object which crossed the line? you can accumulate it into one variable in the probe function parse_nvdsanalytics_meta_data(deepstream_nvdsanalytics_meta.cpp) which called by nvdsanalytics_src_pad_buffer_probe(deepstream_app_main.c).