Samples and Tools for Windows ML.
Перейти к файлу
Sheil Kumar 3f316af774 remove <u> 2021-10-21 20:32:41 -07:00
.github Create CODEOWNERS 2018-09-22 13:25:07 -07:00
Samples Uncomment large models 2021-10-18 16:07:10 -07:00
SharedContent Named Dimension Override Sample (#336) 2021-03-30 13:58:05 -07:00
Testing Add 19041 sdk 2021-04-19 10:35:47 -07:00
Tools no message 2021-09-10 11:45:49 -07:00
.gitignore Fix WinMLRunner stack overflow (#407) 2021-08-12 16:15:50 -07:00
.gitmodules Check in sample showcasing Rust projection of Winrt (#342) 2020-08-24 12:07:21 -07:00
LICENSE Initial commit 2018-03-01 12:07:51 -08:00
README.md remove <u> 2021-10-21 20:32:41 -07:00
appveyor.yml Fix build dir location in CI packaged app 2018-08-24 17:28:04 -07:00
azure-pipelines-samples.yml Update azure-pipelines-samples.yml for Azure Pipelines 2021-10-18 11:42:20 -07:00

README.md

Windows Machine Learning

Windows Machine Learning is a high-performance machine learning inference API that is powered by ONNX Runtime and DirectML.

Alt text

The Windows ML API is a Windows Runtime Component and is suitable for high-performance, low-latency applications such as frameworks, games, and other real-time applications as well as applications built with high-level languages.

This repo contains Windows Machine Learning samples and tools that demonstrate how to build machine learning powered scenarios into Windows applications.

For additional information on Windows ML, including step-by-step tutorials and how-to guides, please visit the Windows ML documentation.

Sample/Tool Status
All Samples Build Status
WinmlRunner Build Status
WinML Dashboard Build Status

Getting Started with Windows ML

Prerequisites

Windows ML offers machine learning inferencing via the inbox Windows SDK as well as a redistributable NuGet package. The table below highlights the availability, distribution, language support, servicing, and forward compatibility aspects of the In-Box and NuGet package for Windows ML.

In-Box NuGet
Availability Windows 10 - Build 17763 (RS5) or Newer
For more detailed information about version support, checkout our docs.
Windows 8.1 or Newer
NOTE: Some APIs (ie: VideoFrame) are not available on older OSes.
Windows SDK Windows SDK - Build 17763 (RS5) or Newer Windows SDK - Build 17763 (RS5) or Newer
Distribution Built into Windows Package and distribute as part of your application
Servicing Microsoft-driven (customers benefit automatically) Developer-driven
Forward compatibility Automatically rolls forward with new features Developer needs to update package manually

Learn mode here.

Model Samples

In this section you will find various model samples for a variety of scenarios across the different Windows ML API offerings.

Image Classification

A subdomain of computer vision in which an algorithm looks at an image and assigns it a tag from a collection of predefined tags or categories that it has been trained on.

Windows App Type
Distribution
UWP
In-Box
UWP
NuGet
Desktop
In-Box
Desktop
NuGet
AlexNet ✔️C# .NET5 - Samples Gallery
CaffeNet ✔️C# .NET5 - Samples Gallery
DenseNet ✔️C# .NET5 - Samples Gallery
EfficientNet ✔️C# .NET5 - Samples Gallery
Emoji8 ✔️C#
GoogleNet ✔️C# .NET5 - Samples Gallery
InceptionV1 ✔️C# .NET5 - Samples Gallery
InceptionV2 ✔️C# .NET5 - Samples Gallery
MNIST ✔️C++/CX
✔️C#
MobileNetV2 ✔️C# .NET5 - Samples Gallery
RCNN ✔️C# .NET5 - Samples Gallery
ResNet50 ✔️C# .NET5 - Samples Gallery
ShuffleNetV1 ✔️C# .NET5 - Samples Gallery
ShuffleNetV2 ✔️C# .NET5 - Samples Gallery
SqueezeNet ✔️C#
✔️JavaScript
✔️C++/WinRT
✔️C# .NET5
✔️C# .NET Core 2
✔️C++/WinRT
✔️C# .NET5 - Samples Gallery
VGG19 ✔️C# .NET5 - Samples Gallery
VGG19bn ✔️C# .NET5 - Samples Gallery
ZFNet512 ✔️C# .NET5 - Samples Gallery

Style Transfer

A computer vision technique that allows us to recompose the content of an image in the style of another.

Windows App Type
Distribution
UWP
In-Box
UWP
NuGet
Desktop
In-Box
Desktop
NuGet
FNSCandy ✔️C# - FNS Style Transfer
✔️C# - Real-Time Style Transfer

Advanced Scenario Samples

These advanced samples show how to use various binding and evaluation features feeds in Windows ML:

Developer Tools

  • Model Conversion

    Windows ML provides inferencing capabilities powered by the ONNX Runtime engine. As such, all models run in Windows ML must be converted to the ONNX Model format. Models built and trained in source frameworks like TensorFlow or PyTorch must be converted to ONNX. Check out the documentation for how to convert to an ONNX model:

  • Model Optimization

    Models may need further optimizations applied post conversion to support advanced features like batching and quantization. Check out the following tools for optimizig your model:

    • WinML Dashboard (Preview): a GUI-based tool for viewing, editing, converting, and validating machine learning models for Windows ML inference engine. This tool can be used to enable free dimensions on models that were built with fixed dimensions. Download Preview Version

    • Graph Optimizations: Graph optimizations are essentially graph-level transformations, ranging from small graph simplifications and node eliminations to more complex node fusions and layout optimizations.

    • Graph Quantization: Quantization in ONNX Runtime refers to 8 bit linear quantization of an ONNX model.

  • Model Validation

    • WinMLRunner: a command-line tool that can run .onnx or .pb models where the input and output variables are tensors or images. It is a very handy tool to quickly validate an ONNX model. It will attempt to load, bind, and evaluate a model and print out helpful messages. It also captures performance measurements.

      Download x64 Exe

  • Model Integration

Feedback

Contributing

We're always looking for your help to fix bugs and improve the samples. Create a pull request, and we'll be happy to take a look.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.