I want recieve classifier_meta_list in test3. I recieve always NULL. Why?

I want recieve classifier_meta_list in test3. I recieve always NULL. Why?
my code:

    static GstPadProbeReturn
    tiler_src_pad_buffer_probe (GstPad * pad, GstPadProbeInfo * info,
        gpointer u_data)
    {
        GstBuffer *buf = (GstBuffer *) info->data;
        guint num_rects = 0; 
        NvDsObjectMeta *obj_meta = NULL;
        guint vehicle_count = 0;
        guint person_count = 0;
        NvDsMetaList * l_frame = NULL;
        NvDsMetaList * l_obj = NULL;
        //NvDsDisplayMeta *display_meta = NULL;

        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) {
            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);
                for (NvDsMetaList * l_class = obj_meta->classifier_meta_list; l_class != NULL;
                    l_class = l_class->next) {
                NvDsClassifierMeta *cmeta = (NvDsClassifierMeta *) l_class->data;
                for (NvDsMetaList * l_label = cmeta->label_info_list; l_label != NULL;
                    l_label = l_label->next) {
                    NvDsLabelInfo *label = (NvDsLabelInfo *) l_label->data;
                    g_print("class:%s", label->result_label);
                    }
                }   
                if (obj_meta->class_id == PGIE_CLASS_ID_VEHICLE) {
                    vehicle_count++;
                    num_rects++;
                }
                if (obj_meta->class_id == PGIE_CLASS_ID_PERSON) {
                    person_count++;
                    num_rects++;
                }
            }
            g_print ("Frame Number = %d Number of objects = %d "
                "Vehicle Count = %d Person Count = %d\n",
                frame_meta->frame_num, num_rects, vehicle_count, person_count);
        }
        return GST_PAD_PROBE_OK;
    }

    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) {
        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);
            for (NvDsMetaList * l_class = obj_meta->classifier_meta_list; l_class != NULL;
                l_class = l_class->next) {
              NvDsClassifierMeta *cmeta = (NvDsClassifierMeta *) l_class->data;
              for (NvDsMetaList * l_label = cmeta->label_info_list; l_label != NULL;
                  l_label = l_label->next) {
                NvDsLabelInfo *label = (NvDsLabelInfo *) l_label->data;
                g_print("class:%s", label->result_label);
                }
              }   
            if (obj_meta->class_id == PGIE_CLASS_ID_VEHICLE) {
                vehicle_count++;
                num_rects++;
            }
            if (obj_meta->class_id == PGIE_CLASS_ID_PERSON) {
                person_count++;
                num_rects++;
            }
        }
          g_print ("Frame Number = %d Number of objects = %d "
            "Vehicle Count = %d Person Count = %d\n",
            frame_meta->frame_num, num_rects, vehicle_count, person_count);
    }
    return GST_PAD_PROBE_OK;
    }

Test3 sample only have one primary gie, it’s for detector, that’s why you got classifier metadata NULL. you can
refer to sample, deepstream-infer-tensor-meta-test which have secondary infer, which is for classifier.

I changed the code by analogy with deepstream-test2(with 3 GIE). The image shows the names of the classification classes, but the classification metadata is empty. Where is the classifier metadata cleared? How to fix it?

see _NvDsClassifierMeta definition, OSD will fetch metadata which will include classifier meta to show on screen, that’s why you just got object lable.

Data Fields

NvDsBaseMeta base_meta

guint num_labels
number of outputs/labels of the classifier More…

gint unique_component_id
unique component id that attaches NvDsClassifierMeta metadata More…

NvDsLabelInfoList * label_info_list
list of label pointers of the given class More…
document, https://docs.nvidia.com/metropolis/deepstream/dev-guide/DeepStream%20Development%20Guide/baggage/struct__NvDsClassifierMeta.html

Sorry, I found my mistake.
I change:

tiler_src_pad = gst_element_get_static_pad (pgie, “src”);

to:

tiler_src_pad =gst_element_get_static_pad (nvosd, “sink”);

Everything is working