Nvdspreprocess + nvinfer(unet) ,model output error

Please provide complete information as applicable to your setup.

• Hardware Platform (dGPU)
• DeepStream Version (7.0)
• TensorRT Version(8.6.1)
• NVIDIA GPU Driver Version (545.29.02)
• Issue Type( questions)
• How to reproduce the issue ? (run in
Given the configuration files preprocess_config.txt, nvinfer.txt, run preprocess_unet.py in nvcr.io/nvidia/deepstream:7.0-samples-multiarch. I will give the specific code file below.)

• Requirement details( deepstream-segmentation&deepstream-preprocess mix)

My problem is to perform segmentation on part of the image, so I added nvdspreprocess element before nvinfer. Refer to Tao deploy. I set input-tensor-from-meta=1 and so on, but nvinfer has no output. If input-tensor-from-meta =0, nvinfer (argmax_1) has output.

Below is my running environment, running script, model and configuration file. I look forward to your reply, thank you.

container:
nvcr.io/nvidia/deepstream:7.0-samples-multiarch

script(The .py file cannot be uploaded, so it is named. txt)
preprocess_unet.txt (16.7 KB)

model(Uploading is not supported)
same as deepstream_tao_apps/models/unet/unet_resnet18.onnx

nvdspreprocess config file
config_preprocess.txt (1019 Bytes)

nvinfer config file
dstest1_pgie_configcopy.txt (784 Bytes)

Did your project work well before updating to the DeepStream 7.0? Could you attach your video source?

Thank you for your quick reply!

No, deepstream6.4 has the same problem.
File source: file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.mp4

log
input-tensor-from-meta=0
log_input-tensor-from-meta_equal0.log (444.1 KB)

input-tensor-from-meta=1
log_input-tensor-from-meta_equal1.log (444.1 KB)

How do you check if there is an output of nvinfer?

  masks = pyds.get_segmentation_masks(segmeta)
  masks = np.array(masks, copy=True, order='C')
  # map the obtained masks to colors of 2 classes.
  frame_image = map_mask_as_display_bgr(masks)
  cv2.imwrite("test" + "/" + str(frame_number) + ".jpg", frame_image)

When input-tensor-from-meta=1, i get nothing in the above code contained in seg_src_pad_buffer_probe,but input-tensor-from-meta=1, i get mask.

OK. If you use the preprocess, the metadata is attached to the batch_meta directly. You can refer to the l_user=batch_meta.batch_user_meta_list to get the metadata.

Thanks for your reply, I will try it.

My problem is that using nvdspreprocess for pre-processing and setting input-tensor-from-meta=1, nvinfer will not pre-process the data but directly use the data output by nvdspreprocess. I have set all nvinfer data preprocessing items in nvdspreprocess, why does nvinfer not output mask?

I have attached the reason. Please change your code: l_user = frame_meta.frame_user_meta_list to the l_user=batch_meta.batch_user_meta_list I attached.

Thank you! Have a nice day@yuweiw

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