Getting number of boxes of detected objects

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) Jetson Xavier NX
• DeepStream Version 5.0
• JetPack Version (valid for Jetson only) 4.4
• TensorRT Version 7.1.3
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs) Questions
• 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)

Hello! I’m actually using PeopleNet and from the cfg file I can see there’s a “minBoxes” parameter. I wanted to know if I can get minBoxes from one inference, like we can normally get confidence, height, width, etc.,and if so, which plugin should I use?
This is done with Python, but if this can be achieve with C/C++ it’s no problem.

Thanks in advance!

Hi,
Please check below code about minBoxes usage in
sources/libs/nvdsinfer/nvdsinfer_context_impl_output_parsing.cpp::DetectPostprocessor::clusterAndFillDetectionOutputDBSCAN, just list one case, you can search the code for other class type. as for detected number of bbox of objects, did you mean detected number of bbox for specific object, let’s say person, car or bycicle?
/* Cluster together rectangles with similar locations and sizes
* since these rectangles might represent the same object using
* DBSCAN. */
if (detectionParams.minBoxes > 0) {
NvDsInferDBScanCluster(
m_DBScanHandle.get(), &clusteringParams, objArray, &numObjects);
}
m_PerClassObjectList[c].resize(numObjects);
m_PerClassObjectList[c].erase(std::remove_if(m_PerClassObjectList[c].begin(),
m_PerClassObjectList[c].end(),
[detectionParams](const NvDsInferObjectDetectionInfo& obj)
{ return (obj.detectionConfidence <
detectionParams.postClusterThreshold)
? true : false;}),m_PerClassObjectList[c].end());
filterTopKOutputs(m_PerClassDetectionParams.at(c).topK, m_PerClassObjectList.at(c));
totalObjects += m_PerClassObjectList[c].size();
}