Labels from secondary infer are missing in the bbox for multiple sources

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) - GPU
• DeepStream Version - 6.1
• JetPack Version (valid for Jetson only)
• TensorRT Version - 8.2.1
• NVIDIA GPU Driver Version (valid for GPU only) - 530
• Issue Type( questions, new requirements, bugs) - questions
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

The labels from the secondary classifier are shown over the bbox if I use only one source. But it doesn’t show for more than one sources. I see other posts related to to this issue where it’s advised to enable --tiledtext, but my application is a custom pipeline and doesn’t resemble any of the existing sample apps. Kindly let me know how to do it. Also will there be any performance issues because of this?

Could you attach your whole pipeline or reproduce that with our demo app?

Thanks for the response. PFB the probe function I use to add the label to the txt_params -

static GstPadProbeReturn probe_osd_display_conf(GstPad *pad, GstPadProbeInfo *info, gpointer user_data)
    {
        GstBuffer *buffer = (GstBuffer *)info->data;
        auto batch_meta = gst_buffer_get_nvds_batch_meta(buffer);
        for (auto l_frame = batch_meta->frame_meta_list; l_frame != NULL;
             l_frame = l_frame->next)
        {
            NvDsFrameMeta *frame_meta = (NvDsFrameMeta *)(l_frame->data);
            for (auto l_obj = frame_meta->obj_meta_list; l_obj != NULL; l_obj = l_obj->next)
            {
                gchar *str_ins_pos = NULL;
                NvDsObjectMeta *obj_meta = (NvDsObjectMeta *)(l_obj->data);

                g_free (obj_meta->text_params.display_text);
                obj_meta->text_params.display_text = NULL;

                obj_meta->text_params.display_text = (char *)g_malloc (128);
                obj_meta->text_params.display_text[0] = '\0';
                str_ins_pos = obj_meta->text_params.display_text;

                if (obj_meta->obj_label[0] != '\0')
                    sprintf (str_ins_pos, "%s", obj_meta->obj_label);
                str_ins_pos += strlen (str_ins_pos);

                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;
                    if (label->pResult_label) {
                        sprintf (str_ins_pos, " %s", label->pResult_label);
                    } else if (label->result_label[0] != '\0') {
                        sprintf (str_ins_pos, " %s", label->result_label);
                    }
                    str_ins_pos += strlen (str_ins_pos);
                    }
                    // std::cout << *str_ins_pos << std::endl;
                }

                double conf = obj_meta->confidence;
                NvOSD_TextParams &txt_params = obj_meta->text_params;
                std::string new_display_text = fmt::format("{} c{:.2f}", txt_params.display_text, conf);
                txt_params.display_text = strdup(new_display_text.c_str());
                // std::cout << new_display_text << std::endl;
                obj_meta->text_params.display_text = strdup(new_display_text.c_str());
            }
        }
        return GST_PAD_PROBE_OK;
    }

By any chance, the text labels are forcefully suppressed for multiple sources in deepstream?

No. Can you provide a simple demo that can reproduce this problem?

Hi,

Adding the below lines in the probe solved the problem.

obj_meta->text_params.x_offset = obj_meta->rect_params.left;
obj_meta->text_params.y_offset = obj_meta->rect_params.top - 30;

Thanks!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.