Introducing the Windows ML Samples Gallery

Numfor Mbiziwo-Tiapo

Learn how the Windows ML API can be used to create powerful ML experiences on Windows through the Windows ML Samples Gallery. The Gallery is a Windows 11 packaged desktop app built using the Windows App SDK (parts of the Gallery are backwards compatible to Windows 8.1). The initial release contains 5 interactive samples that showcase Windows ML through managed and native scenarios (more samples coming soon!). Each sample comes with the corresponding code.

 

Image Classification (GitHub)

Image Image Classification

Pick an image and display the most probable class predictions from 1000 possible categories in the image classification sample. Learn how to

  • Integrate models from the ONNX Model Zoo with Windows ML
  • Perform pre/post processing
    • Every model has its own steps for data pre and post processing (e.g. normalization, resizing, NCHW conversion, etc.)
    • This sample demonstrates how each model can be called in Windows ML by performing the needed pre-post processing in a hardware-platform agnostic way, while taking advantage of VideoFrame optimizations when available.

 

Image Effects (GitHub)

Image Image Effects

Pick an image and apply a variety of effects powered by Windows ML like blur, sharpen, and contrast in the image effects sample. Learn how to

  • Build dynamic models on the fly using the LearningModelBuild Experimental API
    • Some models in the model zoo expect data in a specific format, and these samples show you how to use the operators in Windows ML to convert your image data into a compatible format.
    • These dynamic models are built with known weights and parameters to do common operations that don’t require the model to be trained like the classification models.

 

Batched Inputs (GitHub)

Image Batched Inputs

Infer multiple inputs at once to increase runtime performance in the batching sample. Learn how to

  • Get better performance on GPU with large, batched inputs

Many models in the ONNX model zoo don’t have a free dimension to allow for batched inference, so you can edit models using WinMLDashboard.

 

OpenCV & ImageSharp Interop

Image OpenCVImageSharp

Use Windows ML to classify images that have been edited natively using OpenCV and ImageSharp in the OpenCV and ImageSharp Interop samples. Learn how to

  • Use Interop with other popular frameworks

View the OpenCV and ImageSharp Interop samples on GitHub.

Want to see an example of interop with your favorite framework? File a request on the GitHub issues page.

 

Try it out and stay involved

The Windows ML Samples Gallery can be downloaded from the Microsoft Store or from GitHub. We encourage you to try it out and give feedback by reporting issues or requesting new samples on the issues page.

Stay tuned to the Windows AI Blog for more updates and news!

 

Coming Soon

Real-time video inferencing samples and much more!

 

 

 

 

 

 

 

 

 

 

 

 

 

0 comments

Comments are closed. Login to edit/delete your existing comments