Deepstream LPR sgie, how to deactivate LPD output display label

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson Orin NX)
• DeepStream Version 7
• JetPack Version 6 36.3

I have deployed deepstream with yolov8S model as PGIE and LPD and LPR as sgie, my question is : how can i deactivate the label from lpd model so that only the one from lpr model (the license plate) is displayed? because the two label detections are overlapping
also, i’m using redis to store the detections, but i can’t find the license plate recognition from lpr model, how can i get it to save the results on redis?

Thank you in advance

A simpler way to do this is to just delete the label characters from the label file.

You need to customize this yourself. You can refer to the code below to create a new message sending the label filed.

      if (obj_meta->unique_component_id == PRIMARY_DETECTOR_UID) {
	          if (label_info) {
	            if (label_info->label_id == 0 && label_info->result_class_id == 1) {
	              g_print ("Plate License %s\n",label_info->result_label);
                NvDsEventMsgMeta *msg_meta =
                    (NvDsEventMsgMeta *) g_malloc0 (sizeof (NvDsEventMsgMeta));
                msg_meta->bbox.top = obj_meta->rect_params.top;
                msg_meta->bbox.left = obj_meta->rect_params.left;
                msg_meta->bbox.width = obj_meta->rect_params.width;
                msg_meta->bbox.height = obj_meta->rect_params.height;
                msg_meta->frameId = frame_number;
                msg_meta->trackingId = obj_meta->object_id;
                msg_meta->confidence = obj_meta->confidence;
                generate_event_msg_meta (msg_meta, label_info->result_label, obj_meta);

                NvDsUserMeta *user_event_meta =
                    nvds_acquire_user_meta_from_pool (batch_meta);
                if (user_event_meta) {
                  user_event_meta->user_meta_data = (void *) msg_meta;
                  user_event_meta->base_meta.meta_type = NVDS_EVENT_MSG_META;
                  user_event_meta->base_meta.copy_func =
                      (NvDsMetaCopyFunc) meta_copy_func;
                  user_event_meta->base_meta.release_func =
                      (NvDsMetaReleaseFunc) meta_free_func;
                  nvds_add_user_meta_to_frame (frame_meta, user_event_meta);
                } else {
                  g_print ("Error in attaching event meta to buffer\n");
                }

is this only required for LPR model? because with sgie0 it is saving the detections normally in redis

where exactly should i change the code? i’m using deepstream-test5-app with deepstream 7

Yes. Because the current sample code does not assign the parsed license label value to the license of the NvDsVehicleObject.

Since you are using deepstream-test5-app, you can just assign the parsed license label value to the license of the NvDsVehicleObject in the schema_fill_sample_sgie_vehicle_metadata.

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

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