DirectML Samples

Explore the capabilities of DirectML with these practical examples.

Featured Samples

Image of Image Classification Sample

Image Classification

Demonstrates how to perform image classification using a pre-trained convolutional neural network.

Computer Vision C++ DirectX
View Sample
Image of Text Generation Sample

Text Generation

Explore natural language processing with a recurrent neural network for text generation.

NLP C++ CUDA
View Sample
Image of Object Detection Sample

Object Detection

Implement real-time object detection on video streams using modern deep learning models.

Computer Vision C# DirectX
View Sample
Image of Style Transfer Sample

Style Transfer

Apply artistic styles to your images using neural style transfer techniques.

Creative AI C++ Vulkan
View Sample
Image of Upscaling Sample

Super Resolution

Enhance low-resolution images to high-resolution using deep learning upscaling models.

Image Enhancement C++ DirectX
View Sample
Image of Generative Adversarial Network Sample

GAN Generation

Generate new, realistic images using Generative Adversarial Networks (GANs).

Generative AI C# DirectX
View Sample

Getting Started

Each sample provides detailed instructions on setup, compilation, and execution. You can find the source code, required dependencies, and explanations of the underlying DirectML APIs used.

To build and run these samples, you'll typically need:

  • Windows 10/11
  • Visual Studio 2019 or later
  • DirectX Developer SDK
  • DirectML NuGet package

Dive into the code to understand how DirectML accelerates machine learning tasks on Windows hardware.