How to access nvOCDR metadata while using nvdsvideotemplate in Deepstream 6.3

Please provide complete information as applicable to your setup.

• Hardware Platform: RTX-3060
• DeepStream Version: 6.3
• TensorRT Version: 8.5.3
• NVIDIA GPU Driver Version (valid for GPU only): 535.183.66
• Issue Type: question
I have a modified deepstream-test2 sgie for performing OCR (using nvdsvideotemplate instead on nvinfer). I am using nvOCDR and followed

deepstream-nvocdr-app
and
nvocdr_ds

I am unable to get any OCR output on OSD. How to access the metadata (OCR output) from nvocdr/nvdsvideotemplate in OSD probe?

What params of OCDR should i use so that it works onlly on pgie detector output?

Please refer to deepstream_tao_apps/apps/tao_others/deepstream-nvocdr-app at master · NVIDIA-AI-IOT/deepstream_tao_apps (github.com)

I am still not able to get OCR data

The nvOCR model is just a classifier. The output string is stored in the object meta label as the other classifiers. Nothing special.
NVIDIA-Optical-Character-Detection-and-Recognition-Solution/deepstream/nvocdrlib_impl.cpp at main · NVIDIA-AI-IOT/NVIDIA-Optical-Character-Detection-and-Recognition-Solution (github.com)

obj_meta.obj_label returns class label of my PGIE detector

Do you run the original deepstream_tao_apps/apps/tao_others/deepstream-nvocdr-app at master · NVIDIA-AI-IOT/deepstream_tao_apps · GitHub sample or some other customized app?

I modified deepstream-test2 sample app, instead of nvinfer I used nvvideotemplate element for sgie2 as mentioned in deepstream-tao-apps

sgie1 = Gst.ElementFactory.make("nvdsvideotemplate", "OCDR")
    if not sgie1:
        sys.stderr.write(" Unable to make sgie1 \n")
sgie1.set_property('customlib-name', "NVIDIA-Optical-Character-Detection-and-Recognition-Solution/deepstream/libnvocdr_impl.so")
sgie1.set_property("customlib-props", "ocdnet-engine-path:ocdnet.fp16.engine")
sgie1.set_property("customlib-props", "ocdnet-input-shape:3,736,1280") 
sgie1.set_property("customlib-props", "ocdnet-binarize-threshold:0.1") 
sgie1.set_property("customlib-props", "ocdnet-polygon-threshold:0.3") 
sgie1.set_property("customlib-props", "ocdnet-max-candidate:200") 
sgie1.set_property("customlib-props", "ocrnet-engine-path:ocrnet.fp16.engine") 
sgie1.set_property("customlib-props", "ocrnet-dict-path:/opt/nvidia/deepstream/deepstream-6.3/sources/deepstream_python_apps/apps/deepstream-npr/character_list.txt") 
sgie1.set_property("customlib-props", "ocrnet-input-shape:1,32,200")
sgie1.set_property("customlib-props", "ocrnet-decode:Attention")

My pipeline is as follows steammux->pgie>tracker->sgie1->nvvidconv->nvosd>->sink

where sgie1==nvocdr

and probe added to osd sink pad