deepstream-occupancy-analytics icon indicating copy to clipboard operation
deepstream-occupancy-analytics copied to clipboard

How to implement traffic flow statistical analysis.

Open lwzhaojun opened this issue 3 years ago • 5 comments

I see that you have adapted it from deepstream-test5-app to implement the function of people flow statistics. Can you realize the statistics of traffic flow? Where to modify it?

lwzhaojun avatar Jan 20 '22 11:01 lwzhaojun

Hi Lwzhaojun,

Yes, you can update the class-ids in analytics configuration.https://github.com/NVIDIA-AI-IOT/deepstream-occupancy-analytics/blob/b3430e70e11407bba1e22f4b20de3a2976e8229d/config/config_nvdsanalytics.txt#L72

monjha avatar Jan 22 '22 06:01 monjha

Thank you for your answer. For example, when I use peoplenet, I set class-id=2, which means the class is face. But the detection box about the face is not displayed and there is no count, I tried to increase the display-bbox=1 in the osd in the config file, it doesn't work either. image How should I display the detection box about the face and count it.

lwzhaojun avatar Jan 24 '22 03:01 lwzhaojun

I seem to know. There are only cars and persons in your program, so my model peoplenet has no car, so there is no detection box for car. So if I change the model to dashcamnet, firstly the detection boxes about car and persons will be displayed, and secondly update the class-ids=1 in analytics configuration, it should be able to count the car flow. But if you update the class-ids=-1 in analytics configuration, you should not be able to count the flow of cars and people. Is my thinking correct? image

lwzhaojun avatar Jan 24 '22 08:01 lwzhaojun

I changed the model to dashcamnet, the detection boxes about cars and persons will be displayed, and the statistical count of car flow is realized, but the flow of cars and people cannot be counted at the same time. How should I modify it? Is an array added to this function (analytics_custom_parse_nvdsanalytics_meta_data (NvDsMetaList *l_user, AnalyticsUserMeta *data)) to store the flow of the corresponding class? image

lwzhaojun avatar Jan 24 '22 09:01 lwzhaojun

Hi,

You can access the class-id and its respective analytics data.

monjha avatar Jan 31 '22 06:01 monjha