Deepstream 5.0 segmentation - No valid frames found before end of stream

Hi everyone,

I am trying the segmentation example:

cd /opt/nvidia/deepstream/deepstream-5.0/sources/apps/sample_apps/deepstream-segmentation-test
sudo make clean && sudo make
sudo deepstream-segmentation-app ./dstest_segmentation_config_semantic.txt /opt/nvidia/deepstream/deepstream-5.0/samples/streams/sample_720p.h264

I am getting the following log:

INFO: [TRT]: Detected 1 inputs and 1 output network tensors.
0:00:28.742109088 11739 0x8b9da70 INFO nvinfer gstnvinfer.cpp:602:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1624> [UID = 1]: serialize cuda engine to file: /opt/nvidia/deepstream/deepstream-5.0/samples/models/Segmentation/semantic/unetres18_v4_pruned0.65_800_data.uff_b1_gpu0_fp16.engine successfully
INFO: [Implicit Engine Info]: layers num: 2
0 INPUT kFLOAT data 3x512x512
1 OUTPUT kFLOAT final_conv/BiasAdd 4x512x512

0:00:28.754142550 11739 0x8b9da70 INFO nvinfer gstnvinfer_impl.cpp:311:notifyLoadModelStatus: [UID 1]: Load new model:./dstest_segmentation_config_semantic.txt sucessfully
ERROR from element jpeg-parser: No valid frames found before end of stream
Error details: gstbaseparse.c(3603): gst_base_parse_loop (): /GstPipeline:dstest-image-decode-pipeline/GstBin:source-bin-00/GstJpegParse:jpeg-parser
Returned, stopping playback
Deleting pipeline

The only difference is the use of TensorRT 7 Open Source Software.
Is TensorRT 7 OSS causing the error ?
I know the original nvinfer is replaced by the one from TensorRT OSS.
And I need the TensorRT OSS because of another custom segmentation model.

My setup:
• Jetson AGX Xavier Development Kit
• DeepStream 5.0
• JetPack Version 4.4 DP
• TensorRT 7.1 and TensorRT 7 OSS


Here is the pipeline of deepstream-segmentation-test which illustrate in:

filesrc -> jpegparse -> nvv4l2decoder -> nvstreammux -> nvinfer/nvinferserver (segmentation)
nvsegvidsual -> nvmultistreamtiler -> (nvegltransform) -> nveglglessink

As you can see, the pipeline implement with filesrc and jpegparse.
So please feed jpeg or mjpeg as input rather than h264.

$ ./deepstream-segmentation-app dstest_segmentation_config_industrial.txt sample_industrial.jpg