Error with inference pipeline on Jetson: NvBufSurfTransform failed with error -2 while converting buffer

• Hardware Platform (Jetson / GPU)
Jetson Xavier NX
• DeepStream Version
6.0
• JetPack Version (valid for Jetson only)
4.6
• TensorRT Version
8.0.1.6
• Issue Type( questions, new requirements, bugs)
Questions

Hi there, I’m trying to run a Gstreamer/Deepstream pipeline on Nvidia Jetson and getting the following error in the gst-nvinfer module which stops the pipeline from running:

ERROR: from element /GstPipeline:pipeline0/GstNvInfer:nvinfer0: NvBufSurfTransform failed with error -2 while converting buffer

The pipeline I’m trying to run is:

gst-launch-1.0 -v filesrc location=all.mp4 ! decodebin ! nvvideoconvert ! m.sink_0 nvstreammux name=m batch_size=1 width=1920 height=1080 ! nvvideoconvert src-crop="960:540:960:540" ! nvinfer config-file-path=vi_jetson_dstest3_pgie_config.txt ! nvvideoconvert ! nvvidconv ! nvv4l2h264enc ! h264parse ! mux.video_0 qtmux name=mux ! filesink location=test.mp4

If I take out the inference module then the pipeline runs okay, though it does throw a ton of the following warnings (these appear with and without the inference module):

0:00:06.229914624 4855 0x7f3400ca30 WARN bufferpool gstbufferpool.c:1239:default_reset_buffer:<nvv4l2decoder0:pool:sink> Buffer 0x7f3c02fd80 without the memory tag has maxsize (0) that is smaller than the configured buffer pool size (4194304). The buffer will be not be reused. This is most likely a bug in this GstBufferPool subclass

I’m not sure if this is impacting the inference module or not, and I haven’t been able to find a solution to this warning either. They both reference the buffer so maybe?

I’m able to run the following pipeline on a dGPU Linux machine with Deepstream in one of the Nvidia docker containers without issue:

gst-launch-1.0 -v filesrc location=/home/DockerVolumeMount/all.mp4 ! decodebin ! nvvideoconvert ! m.sink_0 nvstreammux name=m batch_size=1 width=1920 height=1080 ! nvvideoconvert src-crop="960:540:960:540" ! nvinfer config-file-path=vi_dstest3_pgie_config.yml ! nvvideoconvert ! ximagesink

The pipelines are very similar though I’ve changed the output since the Jetson doesn’t have an xdisplay to work with.

Any idea where I’m going wrong? I think I must have something off with the pipeline though it’s been hard to tell exactly what.

Thanks for the help

I am also getting the warning (maybe error):

/dvs/git/dirty/git-master_linux/nvutils/nvbufsurftransform/nvbufsurftransform.cpp:3885: => VIC Configuration failed image scale factor exceeds 16, use GPU for Transformation

This thread seems to hint that this might be my issue. My network size is 98x98.

My original image size is 1920x1080, which if resized down would give me this issue. Since I am cropping prior to the nvinfer instance with nvvideoconvert src-crop="960:540:960:540" I still don’t understand the issue however.

Yeah turns out that the sizing was the issue. The following pipeline worked:

gst-launch-1.0 -v filesrc location=all.mp4 ! decodebin ! nvvideoconvert ! m.sink_0 nvstreammux name=m batch_size=1 width=1920 height=1080 ! nvvideoconvert src-crop="960:540:960:540" ! 'video/x-raw(memory:NVMM),width=960,height=540' ! nvinfer config-file-path=vi_jetson_dstest3_pgie_config.txt ! nvvideoconvert ! nvvidconv ! nvv4l2h264enc ! h264parse ! mux.video_0 qtmux name=mux ! filesink location=test.mp4

where now I’ve added a 'video/x-raw(memory:NVMM),width=960,height=540' element after the cropping and before input into the inference module. I had thought that the nvvideoconvert module did that but I guess not. I guess that means it was also upscaling the cropped region of the frame back to 1920x1080 before the inference module then resized it back down to 98x98? Is that something that the nvvideoconvert module does, or is that a more general thing that a Deepstream pipeline does as it passes frame buffers between pads?

Would love an answer to those two questions if anyone knows and then feel free to close the ticket, thanks.

please refer to this FAQ.

using the following command-line, I can’t reproduce this issue on DS6.0. the differences are source, model and sink. please refer to log-1130.txt (49.7 KB). maybe it is related to your source and model. could you share the source file , model and vi_jetson_dstest3_pgie_config.txt. You can use forum private email. please click forum avatar-> personal messages->new message.
gst-launch-1.0 -v filesrc location=/opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.mp4 ! decodebin ! nvvideoconvert ! m.sink_0 nvstreammux name=m batch_size=1 width=1920 height=1080 ! nvvideoconvert src-crop=“960:540:960:540” ! nvinfer config-file-path=dstest1_pgie_config.txt ! nvvideoconvert ! nvvidconv ! nvv4l2h264enc ! h264parse ! mux.video_0 qtmux name=mux ! filesink location=test.mp4

Not sure setting input-object-min-height or input-object-min-width to any values would work here since this is a primary GIE and not a secondary one. At least according to the documentation it doesn’t seem like it will work. Regardless I solved the issue as I mentioned in my previous post.

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