Confidence Score Metaparameter

Hi,

I’m trying to edit the deepstream-yolo-app example from the AI-IOT repository to print out bounding box coordinates, class name, and confidence of the inference to the command line. I’ve extracted the bounding box data and class name from the metadata in NvDsObjectParams; however, I can’t find the parameter that lists confidence score. I see in nvdsmeta.h that there is a confidence score in NvDsEventMsgMeta, but I am confused on its usage and how the message parsing module is initialized or used. How would I go about extracting the confidence score?

Thanks!

Hi,

It looks like the confidence value doesn’t be written into the metadata.
But suppose you can print it out in the source of the library:
https://github.com/NVIDIA-AI-IOT/deepstream_reference_apps/blob/master/yolo/lib/yolov3.cpp#L71

Thanks.

Hi,

Thank you so much for your answer. However, I am wondering if there is a way to expose it to the metadata, and if so, where you would recommend starting? I am creating a json string of all the parameters for separate analysis purposes and would like all the metaparameter data to be together. I’m not entirely sure how the yolo libraries link to the deepstream-yolo-app code.

Thanks!

Hi,

You can check our dsexample, which is located at ‘{DS-ROOT}/sources/gst-plugins/gst-dsexample/gstdsexample.cpp’.

/**
 * Attach metadata for the full frame. We will be adding a new metadata.
 */
static void
attach_metadata_full_frame (GstDsExample * dsexample, GstBuffer * inbuf,
    gdouble scale_ratio, DsExampleOutput * output, guint batch_id)
{
  NvDsMeta *dsmeta;
  NvDsFrameMeta *bbparams =
      (NvDsFrameMeta *) g_malloc0 (sizeof (NvDsFrameMeta));
  // Allocate an array of size equal to the number of objects detected
  bbparams->obj_params =
      (NvDsObjectParams *) g_malloc0 (sizeof (NvDsObjectParams) *
      output->numObjects);
......

Thanks.