kotlindl
kotlindl copied to clipboard
Add validation of input shape during onnx model inference
Currently, if an onnx model requires a 3-channel image but the input provided has only one channel internal onnx library exception will be thrown.
ai.onnxruntime.OrtException: Shape [1, 512, 512, 3], requires 786432 elements but the buffer has 262144 elements.