nvinfer is not populating 'confidence' field in NvDsObjectMeta (DS 4.0)

Trying to follow this patch with the most recent deepstream 4.02 and the build fails on the step above:

$ cd sources/libs/nvdsinfer/
$ sudo CUDA_VER=10.0 make install

The error is:

-fPIC -std=c++11 -I /usr/local/cuda-10.0/include -I ../../includes
g++ -c -o nvdsinfer_context_impl.o -fPIC -std=c++11 -I /usr/local/cuda-10.0/include -I ../../includes nvdsinfer_context_impl.cpp
In file included from nvdsinfer_context_impl.cpp:22:0:
nvdsinfer_context_impl.h:25:10: fatal error: opencv2/objdetect/objdetect.hpp: No such file or directory
 **#include <opencv2/objdetect/objdetect.hpp>**

compilation terminated.
Makefile:47: recipe for target 'nvdsinfer_context_impl.o' failed
make: *** [nvdsinfer_context_impl.o] Error 1

Solved the compilation issues. It seems that Deepstream 4.02 has moved the location of the opencv headers so I just needed to add the following the CFLAGS in the Makefile: “-I /usr/include/opencv4”.

Thanks for this patch. Is there a patch for clusterandFillDetectionOutputCV? e.g. can I add

object.detectionConfidence=m_ObjectList[c].detectionConfidence

in clusterandFillDetectionOutputCV (rather than DBSCAN as I’m trying to develop deepstream-app sample code)

clusterandFillDetectionOutputCV uses “Group Rectangles” algorithm from OpenCV which does not preserve confidence values in the clustering operation and hence it’s not been added.

This worked for deepstream 5.0.
Thank you!

1 Like