How to export uff model for segmentation

I want to train my own segmentation model for unet. I don’t use the method provided by this How to train a new model for semantic segmentation. Rather than I train unet model with keras https://github.com/zhixuhao/unet.

The model chage is *.h5 -> *.pb -> *.uff. However when I run deepstream-segmentation-app with config of dstest_segmentation_config_industrial.txt, some errors happend.

ERROR: ../nvdsinfer/nvdsinfer_func_utils.cpp:31 [TRT]: UffParser: Validator error: up_sampling2d_4/ResizeNearestNeighbor: Unsupported operation _ResizeNearestNeighbor
ERROR: ../nvdsinfer/nvdsinfer_model_builder.cpp:370 Failed to parse UFF file: /home/nvidia/deepstream/model_v2.uff, incorrect file or incorrect input/output blob names
ERROR: ../nvdsinfer/nvdsinfer_model_builder.cpp:971 failed to build network since parsing model errors.
ERROR: ../nvdsinfer/nvdsinfer_model_builder.cpp:872 failed to build network.
0:00:00.561143716 20538 0x55d35236f0a0 ERROR                nvinfer     gstnvinfer.cpp:596:gst_nvinfer_logger:<primary-nvinference-engine> NvDsInferContext[UID     1]: Error in NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1611> [UID = 1]: build engine file failed
0:00:00.561168841 20538 0x55d35236f0a0 ERROR                nvinfer gstnvinfer.cpp:596:gst_nvinfer_logger:<primary-nvinference-engine> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1697> [UID = 1]: build backend context failed
0:00:00.561178701 20538 0x55d35236f0a0 ERROR                nvinfer gstnvinfer.cpp:596:gst_nvinfer_logger:<primary-nvinference-engine> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::initialize() <nvdsinfer_context_impl.cpp:1024> [UID = 1]: generate backend failed, check config file settings
0:00:00.561216181 20538 0x55d35236f0a0 WARN                 nvinfer gstnvinfer.cpp:781:gst_nvinfer_start:<primary-nvinference-engine> error: Failed to create NvDsInferContext instance
0:00:00.561222786 20538 0x55d35236f0a0 WARN                 nvinfer     gstnvinfer.cpp:781:gst_nvinfer_start:<primary-nvinference-engine> error: Config file path:     dstest_segmentation_config_industrial.txt, NvDsInfer Error: NVDSINFER_CONFIG_FAILED
Running...
ERROR from element primary-nvinference-engine: Failed to create NvDsInferContext instance
Error details: gstnvinfer.cpp(781): gst_nvinfer_start (): /GstPipeline:dstest-image-decode-pipeline/GstNvInfer:primary-nvinference-engine:
Config file path: dstest_segmentation_config_industrial.txt, NvDsInfer Error:     NVDSINFER_CONFIG_FAILED
Returned, stopping playback
Deleting pipeline

Can you tell me what correct method should I take for this purpose. My env is listed here.

• Hardware Platform (T4)
• DeepStream Version 5.0
• TensorRT Version 7.0
• NVIDIA GPU Driver Version 440.64

Hi,

The error indicates that there is a non-supported layer in your model:

ERROR: ... Unsupported operation _ResizeNearestNeighbor

But this layer is implemented in our open source software here:

You can replace the TensorRT plugin library with the OSS version to get the support.

Thanks.