Windows-Machine-Learning
Windows-Machine-Learning copied to clipboard
Add sample to showcase binding and inferencing on DX resources using ORT
This PR adds a sample that showcases how to bind and inference on DX resources using ORT.
3 images (cat, dog, hummingbird) are repeatedly displayed in an HWND and their corresponding resource is passed to ORT for evaluation using EfficentNet.
Important Files to look at:
-
DXResourceBinding.cpp
- Main implementation file
-
ORTHelpers.cpp
- Handles all ORT preprocessing and evaluation
- CreateTensorValueFromD3DResource function demonstrates the main functionality of the sample.
-
D3D12Quad.cpp
- Handles all D3D-related functionality
- CopyTextureIntoCurrentBuffer is the conversion from a texture 2d into a resource dimension buffer