NvDsObjectMeta Zero Confidence issue

In “deepstream_test2_app.c” i added the below code in osd_sink_pad_buffer_probe()

if (obj_meta->class_id == PGIE_CLASS_ID_VEHICLE) {
                vehicle_count++;
                num_rects++;
                //    msg_meta->trackingId = obj_meta->object_id;
                //msg_meta->confidence = obj_meta->confidence;
                  g_print ("Frame Number = %d Vehicle Confidence  = %f Object ID = %ld \n",frame_number, 
                  obj_meta->confidence, obj_meta->object_id);

            }

In this I have two questions:

  1. Why do I get confidence values 0.0000
  2. What is the range of obj_meta->confidence? and if its set by the model from where I can know its range in the test2 sample code

Please refer to the solution here - https://devtalk.nvidia.com/default/topic/1058661/deepstream-sdk/nvinfer-is-not-populating-confidence-field-in-nvdsobjectmeta-ds-4-0-/post/5404760/#5404760