Image Clasiification using AMD WinML Extension#

This application implements a method to run WinML supported ONNX models using MIVisionX RunTime. This c/c++ implementation does image classification on live camera capture or pre-recorded video stream.

This application is a sample for developing windows application using MIVisionX WinML extension.

Build Instructions#

Pre-requisites#

Build using Visual Studio 2019 on 64-bit Windows 10 / 11#

  • Use apps/mivisonx_winml_classifier/winml_classifier.sln to build for x64 platform

Run#

Step 1. Get ONNX model#

  • Get the WinML supported Classification ONNX models from onnx github. ONNX version 1.3 is recommended.

  • The supported models are: inceptionV2, resnet50, vgg19, shufflenet, squeezenet, densenet121, zfnet512.

Step 2. Build the app using winml_classifier.sln on Visual Studio.#

Step 3. Run tests#

Usage:#

  • Use Command Prompt or Windows Powershell to run the app

 .\winml_classifier.exe --inception  <FULL_PATH_TO\inception_v2\model.onnx> [OPTIONAL]  
                        --resnet50   <FULL_PATH_TO\resnet50\model.onnx>     [OPTIONAL] 
                        --vgg19      <FULL_PATH_TO\vgg19\model.onnx>        [OPTIONAL] 
                        --shufflenet <FULL_PATH_TO\shufflenet\model.onnx>   [OPTIONAL] 
                        --squeezenet <FULL_PATH_TO\squeezenet\model.onnx>   [OPTIONAL] 
                        --densenet   <FULL_PATH_TO\densenet\model.onnx>     [OPTIONAL] 
                        --zfnet      <FULL_PATH_TO\zfnet\model.onnx>        [OPTIONAL] 
                        --label FULL_PATH_TO\amd_openvx_extensions\amd_winml\samples\data\Labels.txt [REQUIRED]
                        --capture 0/ --video <video file>  [REQUIRED]

MIVisionX Image Classification#

MIVisionX Image Classification

MIVisionX Image Classification using WinML#

MIVisionX Image Classification using WinML

Example:

 .\winml_classifier.exe --inception FULL_PATH_TO\inception_v2\model.onnx
                        --resnet50  FULL_PATH_TO\resnet50\model.onnx 
                        --zfnet FULL_PATH_TO\zfnet\model.onnx 
                        --label FULL_PATH_TO\MIVisionX\amd_openvx_extensions\amd_winml\samples\data\Labels.txt
                        --capture 0