I am doing video analytics on prerecorded video files. At the end of each video clip, it appears the nvtracker is resetting the tracking IDs, however the internal states of nvdsanalytics is not reset, (in the OSD, I can see the line crossing counter starts with previous clip’s value), in result on the second video clip the line crossing would fail to detect line crossing.
the structure of the pipeline:
uridecodebin->nvstreammux->nvinfer->nvtracker->nvdsanalytics->nvstreamdemux->nvdsosd->nvoverlaysink
Is there a way to reset the nvdsanalytics state in ds6.0? Thanks.
Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU)
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• 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)
Here’s how I reproduce this issue. The same mp4 was played back to back using the pipeline. When the first playback is done, in the EOS message callback, the pipeline is restarted by setting the state to NULL first, then to PLAYING.
Here’s what I observed:
In the first run, everything looks normal. This is the screenshot of the first frame when vehicles are detected.
In the second run, it looks mostly the same, but there are some subtle differences, that’s why I suspect some internal states were not reset with the EOS. Particularly: The two line crossing counters were not reset to zero, they kept previous values; car7 is not in the ROI, so the bounding box is red, while in the first run it is properly detected as in ROI.
How long is the mp4? will these cars in the screenshot disappear from the video? Noticing all trackerid did not changed in the second run. yes, line crossing counter is accumulative.
nvdsanalytics plugin is opensource in DS6.3. you can reload the cfg to recreate low-level instance. By this way, all counter will start from 0. please refer to this topic for how to reload cfg.