onnxruntime_backend icon indicating copy to clipboard operation
onnxruntime_backend copied to clipboard

Inference error when yolov7 model cant detect anything

Open LeDuySon opened this issue 3 years ago • 0 comments
trafficstars

Description I exported yolov7 detection model to onnx using this code https://github.com/WongKinYiu/yolov7/blob/main/export.py and deployed it to triton. It worked really well in normal case, but when model cant detect anything in image triton returned this error "tritonclient.utils.InferenceServerException: [StatusCode.UNIMPLEMENTED] failed to split the output tensor 'output' in responses: expected batch size of atleast 1 in model output, got 0".

Triton Information What version of Triton are you using? nvcr.io/nvidia/tritonserver-22.06-py3

Are you using the Triton container or did you build it yourself? Im using triton container To Reproduce

If the problem appears to be a bug in the execution of the model itself, first attempt to run the model directly in ONNX Runtime. What is the output from loading and running the model in ORT directly?

  • It worked well in onnxruntime. When model cant detect anything, it returned "[ ]"

If the problem appears to be in Triton itself, provide detailed steps to reproduce the behavior in Triton.

Describe the models (framework, inputs, outputs), ideally include the model configuration file (if using an ensemble include the model configuration file for that as well).

  • Config:
name: "yolov7lp_det_onnx"
platform: "onnxruntime_onnx"
max_batch_size: 4

input [
{
    name: "images"
    data_type: TYPE_FP32   
    dims: [ 3, 416, 416 ]
}
]
 
output [
{
    name: "output"
    data_type: TYPE_FP32
    dims: [ -1 ]
}
]

Expected behavior It returned like in onnxruntime

LeDuySon avatar Nov 15 '22 09:11 LeDuySon