Skip to content

Commit aa5b5b8

Browse files
author
Ori Levari
authored
Named Dimension Override Sample (microsoft#336)
1 parent 86d6c03 commit aa5b5b8

File tree

10 files changed

+611
-173
lines changed

10 files changed

+611
-173
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.30204.135
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NamedDimensionOverrides", "NamedDimensionOverrides\NamedDimensionOverrides.vcxproj", "{99F8F52B-6B12-48ED-8633-F4AAA6F891D1}"
7+
EndProject
8+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SampleSharedLib", "..\SampleSharedLib\SampleSharedLib\SampleSharedLib.vcxproj", "{12103A5B-677A-4286-83D2-54EAB9010C16}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|x64 = Debug|x64
13+
Debug|x86 = Debug|x86
14+
Release|x64 = Release|x64
15+
Release|x86 = Release|x86
16+
EndGlobalSection
17+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
18+
{99F8F52B-6B12-48ED-8633-F4AAA6F891D1}.Debug|x64.ActiveCfg = Debug|x64
19+
{99F8F52B-6B12-48ED-8633-F4AAA6F891D1}.Debug|x64.Build.0 = Debug|x64
20+
{99F8F52B-6B12-48ED-8633-F4AAA6F891D1}.Debug|x86.ActiveCfg = Debug|Win32
21+
{99F8F52B-6B12-48ED-8633-F4AAA6F891D1}.Debug|x86.Build.0 = Debug|Win32
22+
{99F8F52B-6B12-48ED-8633-F4AAA6F891D1}.Release|x64.ActiveCfg = Release|x64
23+
{99F8F52B-6B12-48ED-8633-F4AAA6F891D1}.Release|x64.Build.0 = Release|x64
24+
{99F8F52B-6B12-48ED-8633-F4AAA6F891D1}.Release|x86.ActiveCfg = Release|Win32
25+
{99F8F52B-6B12-48ED-8633-F4AAA6F891D1}.Release|x86.Build.0 = Release|Win32
26+
{12103A5B-677A-4286-83D2-54EAB9010C16}.Debug|x64.ActiveCfg = Debug|x64
27+
{12103A5B-677A-4286-83D2-54EAB9010C16}.Debug|x64.Build.0 = Debug|x64
28+
{12103A5B-677A-4286-83D2-54EAB9010C16}.Debug|x86.ActiveCfg = Debug|Win32
29+
{12103A5B-677A-4286-83D2-54EAB9010C16}.Debug|x86.Build.0 = Debug|Win32
30+
{12103A5B-677A-4286-83D2-54EAB9010C16}.Release|x64.ActiveCfg = Release|x64
31+
{12103A5B-677A-4286-83D2-54EAB9010C16}.Release|x64.Build.0 = Release|x64
32+
{12103A5B-677A-4286-83D2-54EAB9010C16}.Release|x86.ActiveCfg = Release|Win32
33+
{12103A5B-677A-4286-83D2-54EAB9010C16}.Release|x86.Build.0 = Release|Win32
34+
EndGlobalSection
35+
GlobalSection(SolutionProperties) = preSolution
36+
HideSolutionNode = FALSE
37+
EndGlobalSection
38+
GlobalSection(ExtensibilityGlobals) = postSolution
39+
SolutionGuid = {E243C68B-A67B-4FB9-B5B1-C106FFE74869}
40+
EndGlobalSection
41+
EndGlobal
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// NamedDimensionOverrides.cpp : This file contains the 'main' function. Program execution begins and ends there.
2+
//
3+
#include "pch.h"
4+
5+
using namespace winrt;
6+
using namespace Microsoft::AI::MachineLearning;
7+
using namespace Windows::Media;
8+
using namespace Windows::Graphics::Imaging;
9+
using namespace std;
10+
11+
int main()
12+
{
13+
std::wstring modulePath = FileHelper::GetModulePath().c_str();
14+
std::wstring modelPath = modulePath + L"candy.onnx";
15+
16+
// load model with variadic inputs
17+
printf("Loading modelfile '%ws' on the CPU\n", modelPath.c_str());
18+
auto model = LearningModel::LoadFromFilePath(modelPath);
19+
20+
LearningModelDevice device(LearningModelDeviceKind::Default);
21+
22+
std::vector<hstring> imageNames = { L"fish.png", L"kitten_224.png", L"fish.png" };
23+
24+
// use session options to override to the exact dimension that will be input to the model
25+
LearningModelSessionOptions options;
26+
options.OverrideNamedDimension(L"None", static_cast<uint32_t>(imageNames.size()));
27+
28+
LearningModelSession session = LearningModelSession(model, device, options);
29+
30+
printf("Binding...\n");
31+
// Load input that match the overriden dimension
32+
std::vector<VideoFrame> inputFrames = {};
33+
for (hstring imageName : imageNames) {
34+
auto imagePath = static_cast<hstring>(FileHelper::GetModulePath().c_str()) + imageName;
35+
auto imageFrame = FileHelper::LoadImageFile(imagePath);
36+
inputFrames.emplace_back(imageFrame);
37+
}
38+
39+
// bind the inputs to the session
40+
LearningModelBinding binding(session);
41+
auto inputFeatureDescriptor = model.InputFeatures().First();
42+
binding.Bind(inputFeatureDescriptor.Current().Name(), winrt::single_threaded_vector(std::move(inputFrames)));
43+
44+
// create the output frames
45+
std::vector<VideoFrame> outputFrames = {};
46+
for (int i = 0; i < imageNames.size(); i++) {
47+
VideoFrame outputFrame(BitmapPixelFormat::Bgra8, 720, 720);
48+
outputFrames.emplace_back(outputFrame);
49+
}
50+
51+
// bind the outputs to the session
52+
binding.Bind(L"outputImage", winrt::single_threaded_vector(std::move(outputFrames)));
53+
54+
// run the model
55+
printf("Running the model...\n");
56+
DWORD ticks = GetTickCount();
57+
auto results = session.EvaluateAsync(binding, L"RunId").get();
58+
ticks = GetTickCount() - ticks;
59+
printf("model run took %d ticks\n", ticks);
60+
}
61+
Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="..\packages\Microsoft.AI.MachineLearning.1.5.2\build\native\Microsoft.AI.MachineLearning.props" Condition="Exists('..\packages\Microsoft.AI.MachineLearning.1.5.2\build\native\Microsoft.AI.MachineLearning.props')" />
4+
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.200729.8\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.200729.8\build\native\Microsoft.Windows.CppWinRT.props')" />
5+
<ItemGroup Label="ProjectConfigurations">
6+
<ProjectConfiguration Include="Debug|Win32">
7+
<Configuration>Debug</Configuration>
8+
<Platform>Win32</Platform>
9+
</ProjectConfiguration>
10+
<ProjectConfiguration Include="Release|Win32">
11+
<Configuration>Release</Configuration>
12+
<Platform>Win32</Platform>
13+
</ProjectConfiguration>
14+
<ProjectConfiguration Include="Debug|x64">
15+
<Configuration>Debug</Configuration>
16+
<Platform>x64</Platform>
17+
</ProjectConfiguration>
18+
<ProjectConfiguration Include="Release|x64">
19+
<Configuration>Release</Configuration>
20+
<Platform>x64</Platform>
21+
</ProjectConfiguration>
22+
</ItemGroup>
23+
<PropertyGroup Label="Globals">
24+
<VCProjectVersion>16.0</VCProjectVersion>
25+
<Keyword>Win32Proj</Keyword>
26+
<ProjectGuid>{99f8f52b-6b12-48ed-8633-f4aaa6f891d1}</ProjectGuid>
27+
<RootNamespace>NamedDimensionOverrides</RootNamespace>
28+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
29+
</PropertyGroup>
30+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
31+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
32+
<ConfigurationType>Application</ConfigurationType>
33+
<UseDebugLibraries>true</UseDebugLibraries>
34+
<PlatformToolset>v142</PlatformToolset>
35+
<CharacterSet>Unicode</CharacterSet>
36+
</PropertyGroup>
37+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
38+
<ConfigurationType>Application</ConfigurationType>
39+
<UseDebugLibraries>false</UseDebugLibraries>
40+
<PlatformToolset>v142</PlatformToolset>
41+
<WholeProgramOptimization>true</WholeProgramOptimization>
42+
<CharacterSet>Unicode</CharacterSet>
43+
</PropertyGroup>
44+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
45+
<ConfigurationType>Application</ConfigurationType>
46+
<UseDebugLibraries>true</UseDebugLibraries>
47+
<PlatformToolset>v142</PlatformToolset>
48+
<CharacterSet>Unicode</CharacterSet>
49+
</PropertyGroup>
50+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
51+
<ConfigurationType>Application</ConfigurationType>
52+
<UseDebugLibraries>false</UseDebugLibraries>
53+
<PlatformToolset>v142</PlatformToolset>
54+
<WholeProgramOptimization>true</WholeProgramOptimization>
55+
<CharacterSet>Unicode</CharacterSet>
56+
</PropertyGroup>
57+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
58+
<ImportGroup Label="ExtensionSettings">
59+
</ImportGroup>
60+
<ImportGroup Label="Shared">
61+
</ImportGroup>
62+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
63+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
64+
</ImportGroup>
65+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
66+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
67+
</ImportGroup>
68+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
69+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
70+
</ImportGroup>
71+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
72+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
73+
</ImportGroup>
74+
<PropertyGroup Label="UserMacros" />
75+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
76+
<LinkIncremental>true</LinkIncremental>
77+
</PropertyGroup>
78+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
79+
<LinkIncremental>false</LinkIncremental>
80+
</PropertyGroup>
81+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
82+
<LinkIncremental>true</LinkIncremental>
83+
</PropertyGroup>
84+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
85+
<LinkIncremental>false</LinkIncremental>
86+
</PropertyGroup>
87+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
88+
<ClCompile>
89+
<WarningLevel>Level3</WarningLevel>
90+
<SDLCheck>true</SDLCheck>
91+
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
92+
<ConformanceMode>true</ConformanceMode>
93+
<PrecompiledHeader>Use</PrecompiledHeader>
94+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
95+
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
96+
<AdditionalIncludeDirectories>..\..\SampleSharedLib\SampleSharedLib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
97+
</ClCompile>
98+
<Link>
99+
<SubSystem>Console</SubSystem>
100+
<GenerateDebugInformation>true</GenerateDebugInformation>
101+
<AdditionalDependencies>$(OutDir)\SampleSharedLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
102+
</Link>
103+
</ItemDefinitionGroup>
104+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
105+
<ClCompile>
106+
<WarningLevel>Level3</WarningLevel>
107+
<FunctionLevelLinking>true</FunctionLevelLinking>
108+
<IntrinsicFunctions>true</IntrinsicFunctions>
109+
<SDLCheck>true</SDLCheck>
110+
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
111+
<ConformanceMode>true</ConformanceMode>
112+
<AdditionalIncludeDirectories>..\..\SampleSharedLib\SampleSharedLib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
113+
</ClCompile>
114+
<Link>
115+
<SubSystem>Console</SubSystem>
116+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
117+
<OptimizeReferences>true</OptimizeReferences>
118+
<GenerateDebugInformation>true</GenerateDebugInformation>
119+
<AdditionalDependencies>$(OutDir)\SampleSharedLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
120+
</Link>
121+
</ItemDefinitionGroup>
122+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
123+
<ClCompile>
124+
<WarningLevel>Level3</WarningLevel>
125+
<SDLCheck>true</SDLCheck>
126+
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
127+
<ConformanceMode>true</ConformanceMode>
128+
<LanguageStandard>stdcpp17</LanguageStandard>
129+
<AdditionalIncludeDirectories>..\..\SampleSharedLib\SampleSharedLib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
130+
</ClCompile>
131+
<Link>
132+
<SubSystem>Console</SubSystem>
133+
<GenerateDebugInformation>true</GenerateDebugInformation>
134+
<AdditionalDependencies>$(OutDir)\SampleSharedLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
135+
</Link>
136+
</ItemDefinitionGroup>
137+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
138+
<ClCompile>
139+
<WarningLevel>Level3</WarningLevel>
140+
<FunctionLevelLinking>true</FunctionLevelLinking>
141+
<IntrinsicFunctions>true</IntrinsicFunctions>
142+
<SDLCheck>true</SDLCheck>
143+
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
144+
<ConformanceMode>true</ConformanceMode>
145+
<AdditionalIncludeDirectories>..\..\SampleSharedLib\SampleSharedLib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
146+
</ClCompile>
147+
<Link>
148+
<SubSystem>Console</SubSystem>
149+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
150+
<OptimizeReferences>true</OptimizeReferences>
151+
<GenerateDebugInformation>true</GenerateDebugInformation>
152+
<AdditionalDependencies>$(OutDir)\SampleSharedLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
153+
</Link>
154+
</ItemDefinitionGroup>
155+
<ItemGroup>
156+
<ClCompile Include="NamedDimensionOverrides.cpp" />
157+
<ClCompile Include="pch.cpp" />
158+
</ItemGroup>
159+
<ItemGroup>
160+
<ClInclude Include="pch.h" />
161+
</ItemGroup>
162+
<ItemGroup>
163+
<CopyFileToFolders Include="..\..\..\SharedContent\models\candy.onnx">
164+
<DeploymentContent>true</DeploymentContent>
165+
<FileType>Document</FileType>
166+
</CopyFileToFolders>
167+
<None Include="packages.config" />
168+
</ItemGroup>
169+
<ItemGroup>
170+
<CopyFileToFolders Include="..\..\..\SharedContent\media\fish.png">
171+
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</DeploymentContent>
172+
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
173+
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
174+
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
175+
</CopyFileToFolders>
176+
<CopyFileToFolders Include="..\..\..\SharedContent\media\kitten_224.png">
177+
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</DeploymentContent>
178+
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</DeploymentContent>
179+
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</DeploymentContent>
180+
<DeploymentContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</DeploymentContent>
181+
</CopyFileToFolders>
182+
</ItemGroup>
183+
<ItemGroup>
184+
<ProjectReference Include="..\..\SampleSharedLib\SampleSharedLib\SampleSharedLib.vcxproj">
185+
<Project>{12103a5b-677a-4286-83d2-54eab9010c16}</Project>
186+
</ProjectReference>
187+
</ItemGroup>
188+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
189+
<ImportGroup Label="ExtensionTargets">
190+
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.200729.8\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.200729.8\build\native\Microsoft.Windows.CppWinRT.targets')" />
191+
<Import Project="..\packages\Microsoft.AI.MachineLearning.1.5.2\build\native\Microsoft.AI.MachineLearning.targets" Condition="Exists('..\packages\Microsoft.AI.MachineLearning.1.5.2\build\native\Microsoft.AI.MachineLearning.targets')" />
192+
</ImportGroup>
193+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
194+
<PropertyGroup>
195+
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
196+
</PropertyGroup>
197+
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.200729.8\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.200729.8\build\native\Microsoft.Windows.CppWinRT.props'))" />
198+
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.200729.8\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.200729.8\build\native\Microsoft.Windows.CppWinRT.targets'))" />
199+
<Error Condition="!Exists('..\packages\Microsoft.AI.MachineLearning.1.5.2\build\native\Microsoft.AI.MachineLearning.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.AI.MachineLearning.1.5.2\build\native\Microsoft.AI.MachineLearning.props'))" />
200+
<Error Condition="!Exists('..\packages\Microsoft.AI.MachineLearning.1.5.2\build\native\Microsoft.AI.MachineLearning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.AI.MachineLearning.1.5.2\build\native\Microsoft.AI.MachineLearning.targets'))" />
201+
</Target>
202+
</Project>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Source Files">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;c++;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Header Files">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Resource Files">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
</ItemGroup>
17+
<ItemGroup>
18+
<ClCompile Include="NamedDimensionOverrides.cpp">
19+
<Filter>Source Files</Filter>
20+
</ClCompile>
21+
<ClCompile Include="pch.cpp">
22+
<Filter>Source Files</Filter>
23+
</ClCompile>
24+
</ItemGroup>
25+
<ItemGroup>
26+
<ClInclude Include="pch.h">
27+
<Filter>Header Files</Filter>
28+
</ClInclude>
29+
</ItemGroup>
30+
<ItemGroup>
31+
<None Include="packages.config" />
32+
</ItemGroup>
33+
<ItemGroup>
34+
<CopyFileToFolders Include="..\..\..\SharedContent\models\candy.onnx" />
35+
<CopyFileToFolders Include="..\..\..\SharedContent\media\fish.png">
36+
<Filter>Resource Files</Filter>
37+
</CopyFileToFolders>
38+
<CopyFileToFolders Include="..\..\..\SharedContent\media\kitten_224.png">
39+
<Filter>Resource Files</Filter>
40+
</CopyFileToFolders>
41+
</ItemGroup>
42+
</Project>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="Microsoft.AI.MachineLearning" version="1.5.2" targetFramework="native" />
4+
<package id="Microsoft.Windows.CppWinRT" version="2.0.200729.8" targetFramework="native" />
5+
</packages>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "pch.h"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#pragma once
2+
3+
#include "winrt/Microsoft.AI.MachineLearning.h"
4+
#include "winrt/Windows.Foundation.h"
5+
#include <winrt/Windows.Foundation.Collections.h>
6+
#include <winrt/Windows.Graphics.Imaging.h>
7+
#include <winrt/Windows.Media.h>
8+
#include "FileHelper.h"

0 commit comments

Comments
 (0)