ML.Net incorrect results with ONNX model
System information
- OS version/distro: Windows 10/11
- .NET Version (eg., dotnet --info): Dot Net versions 2.1/5/6 ML.Net_Onnx.zip
Issue
-
What did you do? I created a object detection model in Azure Custom Vision then exported it as ONNX and tried consuming it with ML.Net. I am using following ML package versions : Microsoft.ML (1.4.0), Microsoft.ML.ImageAnalytics (1.4.0). Microsoft.ML.OnnxTransformer (1.4.0)
-
What happened? ML.Net with ONNX model is giving me incorrect prediction results or no results or very poor confidence levels.
-
What did you expect? I am expecting correct results when working with ONNX model and ML.Net. To re-confirm the issue I consumed same ONNX model with Python code and it worked correct and prediction results were as expected. So there does not seem to be any issue with ONNX model file. The issue seems to be with ML.Net code in the way predictions are done
Source code / logs
I am attaching ML.Net source code which I am using to consume ONNX model
Please paste or attach the code or logs or traces that would be helpful to diagnose the issue you are reporting.
I also tested this issue with ML package versions : Microsoft.ML (1.7.1), Microsoft.ML.ImageAnalytics (1.7.1). Microsoft.ML.OnnxTransformer (1.7.1) but issue still exists.
Hi Team, Can you please have a look at this ticket, this is related to a production issue.
@crazyoutlook sorry for my delay. I'll take a look at it and get back to you shortly.
Hi Michael, Thank you for response. We can close this issue. I was able to resolve this by using ImagePixelExtractingEstimator of ML.Net pipeline.