I want to skip running detector if the RoI in frame is not changed. The detector will work when previous frame and now frame is different. My program is running on deepstream and written by Python. Can you give me some suggestion how to do it?
Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU): Jetson Xavier
• DeepStream Version: 5.0, GCID: 20426409, DATE: Mon Apr 27 14:05:38 UTC 2020
• JetPack Version (valid for Jetson only): 4.4
• TensorRT Version: 18.104.22.168
• Issue Type( questions, new requirements, bugs): Questions
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)
How do you know the ROI is not changed?
(lastFrame - nowFrame) and compute the different pixel count. If different pixel count > threshold, this is RoI frame changed.
Will you add this judgment before inference plugin? How do you add the function? With a new plugin or in other way? How do you inform nvinfer plugin this event?
nvinfer is open source. You can change it as you like.
Is it possible to use insert function at plugin’s sink such as python example of deepstream? I have multiple stream to set different RoI region.
If python can’t work, how do I use C to finish this task ?
Create a plugin for detecting changed happend, and send a signal to nvinfer. how to pass a signal from my detction plugin to nvinfer? how to pass RoI region’s XY coordinate to my plugin?
For multiple streams case, nvinfer does not support different ROI for different sources with one pipeline.
In python deepstream sample codes, there are probe function implementation in every sample app.
nvinfer use config parameter “roi-top-offset” and “roi-bottom-offset” to set the ROI. Gst-nvinfer — DeepStream 6.1.1 Release documentation
For your own plugin, you need to decide how to set your parameters by yourself.
There are many ways to implement the function. You need to investigate and consider according to your requirement.