DS6.4 got an Division by 0 detected in the shape graph error

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
GPU RTX3080TI
• DeepStream Version
6.4
• TensorRT Version
8.6.1.6-1+cuda12.0
• NVIDIA GPU Driver Version (valid for GPU only)
535.104.12
• Issue Type( questions, new requirements, bugs)
questions
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
i’v been convert a yolov8x-seg.onnx model by GitHub - marcoslucianops/DeepStream-Yolo-Seg: NVIDIA DeepStream SDK 6.3 / 6.2 / 6.1.1 / 6.1 / 6.0.1 / 6.0 implementation for YOLO-Segmentation models;

this model works fine when i use deepstream-app with this config file !!!
config_infer_primary_yoloV8_seg.txt (696 Bytes)

but when i use it in python app , it shows error like:
ERROR: [TRT]: 1: [runner.cpp::shapeChangeHelper::621] Error Code 1: Myelin (Division by 0 detected in the shape graph. Tensor (Divisor) “sp__mye3” is equal to 0.; )
ERROR: nvdsinfer_backend.cpp:506 Failed to enqueue trt inference batch
ERROR: nvdsinfer_context_impl.cpp:1821 Infer context enqueue buffer failed, nvinfer error:NVDSINFER_TENSORRT_ERROR
0:00:07.156768321 256 0x5634669fe1e0 WARN nvinfer gstnvinfer.cpp:1404:gst_nvinfer_input_queue_loop: error: Failed to queue input batch for inferencing

here is my python code:
deepstream_test1_rtsp_in_rtsp_out.txt (18.2 KB)

Could you attach your yolov8x-seg.onnx model and the config file of the deepstream-app so that I can repro that on my side?

here is onnx model file: yolov8x-seg.onnx - Google Drive
and this is deepstream-app config file
deepstream_app_config.txt (854 Bytes)

thanks a lot

I have tried to run with your model and config file by deepstream-app. It still reported error info like:

ERROR: [TRT]: 1: [runner.cpp::shapeChangeHelper::621] Error Code 1: Myelin (Division by 0 detected in the shape graph. Tensor (Divisor) "sp__mye3" is equal to 0.; )
ERROR: nvdsinfer_backend.cpp:506 Failed to enqueue trt inference batch
ERROR: nvdsinfer_context_impl.cpp:1821 Infer context enqueue buffer failed, nvinfer error:NVDSINFER_TENSORRT_ERROR

So maybe there’s something wrong with your model. You can also file the issue to the owner of that project.

would you please use this video file and try it again record_221.mp4 - Google Drive
change deepstream config file like this

type=3
uri=file:///opt/nvidia/deepstream/deepstream/sources/deepstream_python_apps/apps/deepstream-rtsp-in-rtsp-out/record_221.mp4

When I run that a few times, it won’t report the Division 0 error. About the Division by 0 error, there is already a similar topic 273902.
We will fix that in the next version of TRT.