Set detection confidence threshold

• Hardware Platform (Jetson / GPU)
Jetson Xavier NX and AGX
• DeepStream Version
5.1
• JetPack Version (valid for Jetson only)
4.5.1
• Issue Type( questions, new requirements, bugs)
Questions

Hello nvidia family and friends,

I’m using peoplenet for one of my project because I obviously need to detect when there are people in front of the camera.
However, currently when I show my hand with two fingers pointing downwards, it is detected as a person.
Therefore, I would like to set a higher minimum confidence threshold for the ‘person’ class detection.
I would like for instance that the network only decides that the object detected is a person if it is at least 85% confident that it is a person for instance.

My problem is that I don’t know how to do it.
Could someone tell me how ?

In the documentation of nvinfer, I see a few settings mentioning confidence, but I’m not convinced they are the right settings.
There is segmentation threshold, that says:

Confidence threshold for the segmentation model to output a valid class for a pixel. If confidence is less than this threshold, class output for that pixel is −1.

There is dbscan-min-score, that say:

Minimum sum of confidence of all the neighbors in a cluster for it to be considered a valid cluster.

but none of these two seem the right one to me.

Any help would be greatly appreciated :-)
Cheers

Alright, actually in the probe function where you can get the metadata, you can first get

batch_meta = pyds.gst_buffer_get_nvds_batch_meta(hash(gst_buffer))
l_frame = batch_meta.frame_meta_list

then, in the while loop over the l_frames

while l_frame is not None:

you get the l_obj like this:

l_obj = frame_meta.obj_meta_list

and then again, loop over the l_obj

while l_obj is not None:

to get the l_obj metadata like this:

obj_meta = pyds.NvDsObjectMeta.cast(l_obj.data)

from which you can get the confidence with obj_meta.confidence.
You can then use that confidence the way you see fit.

Here is the python code example from which I extracted the information.

Cheers

Exactly, so is there still any other questions?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.