Open ankitbko opened 3 years ago
I am adding another ask to same issue as it deals with same config class - Allow multiple input and output column names to be passed to OnnxModel
. The ApplyOnnxModel
accepts list of output and input names so OnnxModelConfiguration
should also accept a list along with shape data for each.
Thanks for flagging this! Agreed, the OnnxModel
and OnnxModelConfiguration
classes should be updated to allow for configuring lists of input/output names, and to enable the shapeDictionary parameter. The change seems relatively straightforward, and we would welcome a PR on this. Let us know if you plan to make this contribution. Otherwise we'll try to get to it in the near future.
Sure will be happy to contribute.
I was unable to run DB_TD500_resnet50.onnx model (https://docs.opencv.org/4.x/d4/d43/tutorial_dnn_text_spotting.html) using
OnnxModel
as it was throwing following error -Length of memory (1625088) must match product of dimensions (3)
.The only way to fix it was to duplicate
OnnxModel
locally and pass the correctshapeDictionary
when applying ONNX ModelRequest is to allow overriding
shapeDictionary
when creatingOnnxModel
. This overriding requirement also exist to run FasterRCNN model https://github.com/dotnet/machinelearning/pull/3963