Confidence values from pgie like -0.1?

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.