Confidence values from pgie like -0.1?

If you can record a video stream that reproduces the same behaviour, that would be helpful for us to debug.

class-attrs- config property are all working as expected. But keep in mind that ‘post-clustering-threshold’ is not applicable to group rectangles type of clustering because of the reason i mentioned above.

We will get back to regarding the question about ‘mindetectorConfidence’

What would be the best way to record the raw stream? I’ve tried simply:

gst-launch-1.0 -e rtspsrc location=rtsp://1.1.1.1/Streaming/Channels/201 ! rtph265depay ! filesink location=camera201.h265

But it doesn’t seem to create a file that I can feed into my app instead of the rtsp source.

Any recommendations?

Any detector bboxes that have confidence values lower than mindetectorConfidence would be discarded and not be tracked by the tracker. So if you expect the detector confidence values of -0.1, then it would be better to set mindetectorConfidence: -1

But -0.1 is a garbage confidence value. So minDetectorConfidence should probably NOT be used?

By setting mindetectorConfidence: -1, you don’t filter out any bboxes. So I recommend you set it that way if you don’t use any clustering mode in detector.

ok so -1 means use ALL detector bounding boxes.

I want to try and filter out false detections. So was thinking of using mindetectorConfidence: 0.8 for example. But my question is - will this even work since the detector is not properly setting the confidence values?

Sorry for all the replies but its very hard to work this out from your responses.

If you use DBSCAN or NMS in PGIE, the confidence values of detector bboxes will be >=0. Then you can use mindetectorConfidence in tracker to filter out some false positives.

ok. Now I’m understanding. And if using DBSCAN and I patch nvinfer I can get accurate confidence values too? What about NMS?

Hi Jason,

You dont need to apply any patch for nvinfer plugin in DS 5.0. The confidence values from PGIE will only be added to the metadata if you choose NMS or DBSCAN as the clustering type. For group rectangles mode of clustering, confidence values would be -0.1 for all objects.

1 Like

Hi Jason,
As mentioned, all confidence from primary detector are -0.1 in your case. For boxes with values near 1.0, they are not detected by primary detector, but discovered by tracker only. So currently their confidence values are given by tracker. In GA release coming soon, we will have separate confidence fields for detector and tracker so they will not be mixed together.

Thankyou @fangyul - makes sense and I’ll wait for 5.0 GA.

Any idea if this is fixed in the new release 5.0. I still get neg numbers

GA means general availability, for now we only have access to developer preview (5.0 dp).

Hi @robby_nvida if you use DBSCAN or NMS you wont get the negative values from the nvinfer element - its only happening with group rectangles (which is the default in the sanmle config files).

1 Like

Thank you … I will research that… Found it … Your a star!!

Hi, jason. I did everything like you said but still didn’t get confidence values. That is my code based on deepstream-test-3. What am I missing?

NvDsBatchMeta *batch_meta = gst_buffer_get_nvds_batch_meta (buf);

for (l_frame = batch_meta->frame_meta_list; l_frame != NULL; l_frame = l_frame->next) {
    object_meta = nvds_acquire_obj_meta_from_pool(batch_meta);
    test_message = " ";
    NvDsFrameMeta *frame_meta = (NvDsFrameMeta *) (l_frame->data);
    //int offset = 0;
    for (l_obj = frame_meta->obj_meta_list; l_obj != NULL; l_obj = l_obj->next) {
        obj_meta = (NvDsObjectMeta *) (l_obj->data);
        obj_meta->classifier_meta_list;
        test_message = g_strconcat("Confidence = ", g_strdup_printf("%f", object_meta->confidence), " Confidence = ", g_strdup_printf("%f", obj_meta->classifier_meta_list), "\n", NULL);
        g_print(test_message);
1 Like

What have you set for the cluster-mode property n the nvinfer config file?

Hi, I’ve set cluster-mode to 1 and it was not working. I just cleaned and compiled it a few times changing strings and stuff (nothing directly related to deepstream or confidence) and suddenly it started working. Now it displays the confidence values.

I’ll keep investigating and I’ll post it here as soon as I find the reason of this misbehaviour in my PC. Hopefully it will help someone in the future.

Thanks for your attention.

Don’t use cluster-mode=1. That is for opencv’s GroupRectangles which does not provide a confidence score. Try DBSCAN or NMS and you code will work.