Error in NvDsPostProcess::initResource() <post_processor_instance_segment.cpp:208> : Custom parsing function not present specified

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) Jetson AGX Orin
• DeepStream Version 6.4
• JetPack Version (valid for Jetson only) 6.0-b52
• TensorRT Version 8.6.2
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs) Bug/question

Hi,

I’m trying to get a DeepStream 6.3 pipeline that will perform Mask RCNN inference and then visualize the masks.

I have the following Python code which creates a DeepStream pipeline:

   filesrc = create_gst_element_with_props("filesrc", "filesrc", "location", "test_images/original/train2.jpg")
    filesrc_filter = create_gst_capsfilter("image/jpeg,width=640,height=480,framerate=30/1", "filesrc_caps")
    nvjpegdec = create_gst_element_with_props("nvjpegdec", "nvjpegdec")
    imagefreeze = create_gst_element_with_props("imagefreeze", "imagefreeze", "is-live", True, "num-buffers", -1)

    videoconvert = create_gst_element("videoconvert", "videoconvert")
    videoconvert_filter = create_gst_capsfilter("video/x-raw,format=RGBA,memory=NVMM", "nvmm_caps")
    nvvideoconvert = create_gst_element_with_props("nvvideoconvert", "nvvideoconvert")

    nvstreammux = create_gst_element_with_props("nvstreammux", "nvstreammux",
                                                'width', 640, 'height', 480,
                                                'batch-size', 1, 'batched-push-timeout', MUXER_BATCH_TIMEOUT_USEC)

    nvinfer = create_gst_element_with_props("nvinfer", "nvinfer",
                                            'config-file-path', DETECTOR_CONFIG_FILE)
    
    nvdspostprocess = create_gst_element_with_props("nvdspostprocess", "nvdspostprocess", 
                                                    "postprocesslib-config-file", "config_mrcnn.yml",
                                                    "postprocesslib-name", "libpostprocess_impl.so")

    nvsegvisual = create_gst_element_with_props("nvsegvisual", "nvsegvisual", "width", 640, "height", 480)
    nvtracker = create_gst_element_with_props("nvtracker", "nvtracker",
                                              'll-lib-file', '/opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so',
                                              'll-config-file', '/home/simon/deepstream_python_apps/apps/embedding_bot/tracking/config_tracker_NvDCF_perf.yml',
                                              'tracker-width', 640, 'tracker-height', 480)
    nvvideoconvert2 = create_gst_element("nvvideoconvert", "nvvideoconvert2")
    nvdsosd = create_gst_element_with_props("nvdsosd", "nvdsosd", 'display-clock', 1, 'display-mask', True)
    nv3dsink = create_gst_element_with_props("nv3dsink", "nv3dsink", 'sync', False)

    pipeline = create_gst_pipeline("maskrcnn-image-display")

    gst_link_many(filesrc, filesrc_filter, nvjpegdec, imagefreeze, videoconvert, videoconvert_filter, 
                  nvvideoconvert)
    gst_link_pads(nvvideoconvert, nvstreammux, "src", "sink_0")              
    gst_link_many(nvstreammux, nvinfer, nvdspostprocess, nvsegvisual, nvtracker, nvvideoconvert2, nvdsosd, nv3dsink)

The gst_ functions are simple utility functions for creating GST elements, capability filters and the like. Everything runs perfectly well with variations on this pipeline.

Here are the configuration files for nvinfer and nvdspostprocess:
nvinfer_config.txt (2.0 KB)
and
config_mrcnn.yml.txt (491 Bytes)

The problem comes with NvDsPostProcess:

Starting pipeline 

gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
[NvMultiObjectTracker] Initialized
Error in NvDsPostProcess::initResource() <post_processor_instance_segment.cpp:208> : Custom parsing function  not present specified
[NvMultiObjectTracker] De-initialized
Error: gst-library-error-quark:  Library config file ./config_mrcnn.yml parsing failed (5): /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.cpp(307): gst_nvdspostprocess_start (): /GstPipeline:maskrcnn-image-display/GstNvDsPostProcess:nvdspostprocess:
Postprocess lib config file ./config_mrcnn.yml parsing failed

It seems like libpostprocess_impl.so doesn’t contain the function NvDsPostProcessParseCustomMrcnnTLTV2 Is that what’s going on?

I followed the instructions here: Gst-nvdspostprocess in DeepStream — DeepStream documentation 6.4 documentation

Any help would be appreciated. Thanks,

Simon

Here is a version just using GST-LAUNCH, with no Python:

gst-launch-1.0 filesrc location=test_images/original/train2.jpg ! image/jpeg,width=640,height=480,framerate=30/1 ! nvjpegdec ! imagefreeze is-live=1 num-buffers=-1 ! nvvideoconvert ! video/x-raw,format=RGBA,memory=NVMM ! s.sink_0 nvstreammux name=s width=640 height=480 batch-size=1 batched-push-timeout=33000 ! nvinfer config-file-path=nvinfer_config.txt ! nvdspostprocess postprocesslib-config-file=config_mrcnn.yml postprocesslib-name=libpostprocess_impl.so ! nvsegvisual width=640 height=480 ! nvtracker ll-lib-file=/opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so ll-config-file=/home/simon/deepstream_python_apps/apps/embedding_bot/tracking/config_tracker_NvDCF_perf.yml tracker-width=640 tracker-height=480 ! nvvideoconvert ! nvdsosd display-mask=1 ! nv3dsink sync=0

The error is the same:

Setting pipeline to PAUSED ...
gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
[NvMultiObjectTracker] Initialized
Error in NvDsPostProcess::initResource() <post_processor_instance_segment.cpp:208> : Custom parsing function  not present specified
ERROR: from element /GstPipeline:pipeline0/GstNvDsPostProcess:nvdspostprocess0:  Library config file config_mrcnn.yml parsing failed
Additional debug info:
/dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.cpp(307): gst_nvdspostprocess_start (): /GstPipeline:pipeline0/GstNvDsPostProcess:nvdspostprocess0:
Postprocess lib config file config_mrcnn.yml parsing failed
ERROR: pipeline doesn't want to preroll.
[NvMultiObjectTracker] De-initialized
Failed to set pipeline to PAUSED.
Setting pipeline to NULL ...
Freeing pipeline ...

Hopefully that clarifies things.

…and the same with the demo at https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_postprocessing_plugin.html.

I followed the instructions, changing only nveglglessink to nv3dsink. Launching:

gst-launch-1.0 filesrc location=/opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4 ! decodebin !   m.sink_0 nvstreammux name=m batch-size=1 width=1920 height=1080 ! nvinfer config-file-path= config_infer_primary_peopleSegNet.txt ! nvdspostprocess postprocesslib-name=/opt/nvidia/deepstream/deepstream/lib/libpostprocess_impl.so postprocesslib-config-file= config_mrcnn.yml  !   nvvideoconvert ! nvdsosd display-mask=1 process-mode=0 ! nv3dsink sync=0

gives:

Setting pipeline to PAUSED ...
Error in NvDsPostProcess::initResource() <post_processor_instance_segment.cpp:208> : Custom parsing function  not present specified
ERROR: from element /GstPipeline:pipeline0/GstNvDsPostProcess:nvdspostprocess0:  Library config file config_mrcnn.yml parsing failed
Additional debug info:
/dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvdspostprocess/gstnvdspostprocess.cpp(307): gst_nvdspostprocess_start (): /GstPipeline:pipeline0/GstNvDsPostProcess:nvdspostprocess0:
Postprocess lib config file config_mrcnn.yml parsing failed
ERROR: pipeline doesn't want to preroll.
Failed to set pipeline to PAUSED.
Setting pipeline to NULL ...
Freeing pipeline ...

config_infer_primary_peopleSegNet_modified.txt (2.2 KB)
config_mrcnn.yml.txt (494 Bytes)

A problem with the library opt/nvidia/deepstream/deepstream/lib/libpostprocess_impl.so ?

it is because parse-bbox-instance-mask-func-name in nvdspostprocess configuration file config_mrcnn.yml.txt failed to parse. please use NvDsInferParseCustomMrcnnTLTV2.
nvdspostprocess is opensource. Here is the path: opt\nvidia\deepstream\deepstream\sources\gst-plugins\gst-nvdspostprocess\postprocesslib_impl\postprocesslib_impl.cpp

Thanks! That did it. You might want to update the documentation at https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_postprocessing_plugin.html as the example code shows the wrong parsing function name.

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