1

To package trained Onnx models with a WPF .Net Core 3.1 app, I'm wondering if there are any difference to these two methods: Microsoft.ML.OnnxRuntime and Microsoft.AI.MachineLearning (WinML)? OnnxRuntime seems to be easier to implement with C# while WinML's samples for desktop apps are in C++.

Are there any drawbacks to deploy Onnx models with OnnxRuntime for public users? Or does it require a specific environment for inference?

Why is there a need for Microsoft to maintain two different methods if they are essentially the same?

Lola
  • 68
  • 4
  • I believe WinML is Windows only whereas ML.NET is cross platform. Also, I'm not sure if they are actively supporting WinML anymore but ML.NET is still having features and bug fixes added. – Jon Dec 09 '20 at 11:05
  • I'm more interested in the comparison between ONNX and WinML though. – Lola Dec 10 '20 at 06:06

1 Answers1

5

Thanks for the great question. Using Microsoft.AI.MachineLearning gives you high-performance and reliable hardware acceleration for ML inferences on any Windows devices. The ONNX Runtime is focused on being a cross-platform inferencing engine. Microsoft.AI.MachineLearning actually utilizes the ONNX Runtime for optimized performance on CPUs, and the DirectML backend for optimized acceleration with GPUs. This diagram illustrates the full stack of Windows ML.

Adele
  • 51
  • 2