Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
onnxruntime_v14
Commits
a144865d
Commit
a144865d
authored
Jul 25, 2023
by
gaoqiong
Browse files
update v1.14.0
parent
cf1acfd2
Changes
409
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
468 additions
and
0 deletions
+468
-0
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Forms/App.xaml
...e/Microsoft.ML.OnnxRuntime.InferenceSample.Forms/App.xaml
+8
-0
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Forms/App.xaml.cs
...icrosoft.ML.OnnxRuntime.InferenceSample.Forms/App.xaml.cs
+20
-0
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Forms/AssemblyInfo.cs
...soft.ML.OnnxRuntime.InferenceSample.Forms/AssemblyInfo.cs
+3
-0
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Forms/MainPage.xaml
...rosoft.ML.OnnxRuntime.InferenceSample.Forms/MainPage.xaml
+15
-0
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Forms/MainPage.xaml.cs
...oft.ML.OnnxRuntime.InferenceSample.Forms/MainPage.xaml.cs
+88
-0
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Forms/Microsoft.ML.OnnxRuntime.InferenceSample.Forms.csproj
...rms/Microsoft.ML.OnnxRuntime.InferenceSample.Forms.csproj
+21
-0
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/App.xaml
...le/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/App.xaml
+14
-0
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/App.xaml.cs
...Microsoft.ML.OnnxRuntime.InferenceSample.Maui/App.xaml.cs
+11
-0
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/AppShell.xaml
...crosoft.ML.OnnxRuntime.InferenceSample.Maui/AppShell.xaml
+14
-0
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/AppShell.xaml.cs
...soft.ML.OnnxRuntime.InferenceSample.Maui/AppShell.xaml.cs
+9
-0
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/MainPage.xaml
...crosoft.ML.OnnxRuntime.InferenceSample.Maui/MainPage.xaml
+15
-0
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/MainPage.xaml.cs
...soft.ML.OnnxRuntime.InferenceSample.Maui/MainPage.xaml.cs
+84
-0
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/MauiProgram.cs
...rosoft.ML.OnnxRuntime.InferenceSample.Maui/MauiProgram.cs
+18
-0
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/Microsoft.ML.OnnxRuntime.InferenceSample.Maui.csproj
...Maui/Microsoft.ML.OnnxRuntime.InferenceSample.Maui.csproj
+75
-0
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/Microsoft.ML.OnnxRuntime.InferenceSample.Maui.sln
...le.Maui/Microsoft.ML.OnnxRuntime.InferenceSample.Maui.sln
+27
-0
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/Platforms/Android/AndroidManifest.xml
...nferenceSample.Maui/Platforms/Android/AndroidManifest.xml
+6
-0
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/Platforms/Android/MainActivity.cs
...me.InferenceSample.Maui/Platforms/Android/MainActivity.cs
+10
-0
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/Platforms/Android/MainApplication.cs
...InferenceSample.Maui/Platforms/Android/MainApplication.cs
+15
-0
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/Platforms/Android/Resources/values/colors.xml
...Sample.Maui/Platforms/Android/Resources/values/colors.xml
+6
-0
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/Platforms/MacCatalyst/AppDelegate.cs
...InferenceSample.Maui/Platforms/MacCatalyst/AppDelegate.cs
+9
-0
No files found.
Too many changes to show.
To preserve performance only
409 of 409+
files are displayed.
Plain diff
Email patch
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Forms/App.xaml
0 → 100755
View file @
a144865d
<?xml version="1.0" encoding="utf-8" ?>
<Application
xmlns=
"http://xamarin.com/schemas/2014/forms"
xmlns:x=
"http://schemas.microsoft.com/winfx/2009/xaml"
x:Class=
"Microsoft.ML.OnnxRuntime.InferenceSample.Forms.App"
>
<Application.Resources>
</Application.Resources>
</Application>
\ No newline at end of file
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Forms/App.xaml.cs
0 → 100755
View file @
a144865d
using
Xamarin.Forms
;
namespace
Microsoft.ML.OnnxRuntime.InferenceSample.Forms
{
public
partial
class
App
:
Application
{
public
App
()
{
InitializeComponent
();
MainPage
=
new
MainPage
();
}
protected
override
void
OnStart
()
{}
protected
override
void
OnSleep
()
{}
protected
override
void
OnResume
()
{}
}
}
\ No newline at end of file
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Forms/AssemblyInfo.cs
0 → 100755
View file @
a144865d
using
Xamarin.Forms.Xaml
;
[
assembly
:
XamlCompilation
(
XamlCompilationOptions
.
Compile
)]
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Forms/MainPage.xaml
0 → 100755
View file @
a144865d
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
xmlns=
"http://xamarin.com/schemas/2014/forms"
xmlns:x=
"http://schemas.microsoft.com/winfx/2009/xaml"
x:Class=
"Microsoft.ML.OnnxRuntime.InferenceSample.Forms.MainPage"
>
<StackLayout>
<Frame
BackgroundColor=
"#2196F3"
Padding=
"24"
CornerRadius=
"0"
>
<Label
Text=
"Inference Sample"
HorizontalTextAlignment=
"Center"
TextColor=
"White"
FontSize=
"36"
/>
</Frame>
<Label
Text=
"ONNX Runtime"
FontSize=
"Title"
Padding=
"30,10,30,10"
/>
<Button
x:Name=
"Start"
Text=
"Run tests"
Clicked=
"Start_Clicked"
FontSize=
"Large"
/>
<Label
x:Name=
"OutputLabel"
Text=
"Output"
FontSize=
"Small"
/>
</StackLayout>
</ContentPage>
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Forms/MainPage.xaml.cs
0 → 100755
View file @
a144865d
using
System
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
Xamarin.Essentials
;
using
Xamarin.Forms
;
namespace
Microsoft.ML.OnnxRuntime.InferenceSample.Forms
{
public
partial
class
MainPage
:
ContentPage
{
public
MainPage
()
{
InitializeComponent
();
// in general create the inference session (which loads and optimizes the model) once and not per inference
// as it can be expensive and time consuming.
inferenceSampleApi
=
new
InferenceSampleApi
();
}
protected
override
void
OnAppearing
()
{
base
.
OnAppearing
();
OutputLabel
.
Text
=
"Press 'Run Tests'.\n"
;
}
private
readonly
InferenceSampleApi
inferenceSampleApi
;
private
async
Task
ExecuteTests
()
{
Action
<
Label
,
string
>
addOutput
=
(
label
,
text
)
=>
{
Device
.
BeginInvokeOnMainThread
(()
=>
{
label
.
Text
+=
text
;
});
Console
.
Write
(
text
);
};
OutputLabel
.
Text
=
"Testing execution\nComplete output is written to Console in this trivial example.\n\n"
;
// run the testing in a background thread so updates to the UI aren't blocked
await
Task
.
Run
(()
=>
{
addOutput
(
OutputLabel
,
"Testing using default platform-specific session options... "
);
inferenceSampleApi
.
Execute
();
addOutput
(
OutputLabel
,
"done.\n"
);
Thread
.
Sleep
(
1000
);
// artificial delay so the UI updates gradually
// demonstrate a range of usages by recreating the inference session with different session options.
addOutput
(
OutputLabel
,
"Testing using default platform-specific session options... "
);
inferenceSampleApi
.
CreateInferenceSession
(
SessionOptionsContainer
.
Create
());
inferenceSampleApi
.
Execute
();
addOutput
(
OutputLabel
,
"done.\n"
);
Thread
.
Sleep
(
1000
);
addOutput
(
OutputLabel
,
"Testing using named platform-specific session options... "
);
inferenceSampleApi
.
CreateInferenceSession
(
SessionOptionsContainer
.
Create
(
"ort_with_npu"
));
inferenceSampleApi
.
Execute
();
addOutput
(
OutputLabel
,
"done.\n"
);
Thread
.
Sleep
(
1000
);
addOutput
(
OutputLabel
,
"Testing using default platform-specific session options via ApplyConfiguration extension... "
);
inferenceSampleApi
.
CreateInferenceSession
(
new
SessionOptions
().
ApplyConfiguration
());
inferenceSampleApi
.
Execute
();
addOutput
(
OutputLabel
,
"done.\n"
);
Thread
.
Sleep
(
1000
);
addOutput
(
OutputLabel
,
"Testing using named platform-specific session options via ApplyConfiguration extension... "
);
inferenceSampleApi
.
CreateInferenceSession
(
new
SessionOptions
().
ApplyConfiguration
(
"ort_with_npu"
));
inferenceSampleApi
.
Execute
();
addOutput
(
OutputLabel
,
"done.\n\n"
);
Thread
.
Sleep
(
1000
);
});
addOutput
(
OutputLabel
,
"Testing successfully completed! See the Console log for more info."
);
}
private
async
void
Start_Clicked
(
object
sender
,
EventArgs
e
)
{
await
ExecuteTests
()
.
ContinueWith
(
(
task
)
=>
{
if
(
task
.
IsFaulted
)
MainThread
.
BeginInvokeOnMainThread
(()
=>
DisplayAlert
(
"Error"
,
task
.
Exception
.
Message
,
"OK"
));
})
.
ConfigureAwait
(
false
);
}
}
}
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Forms/Microsoft.ML.OnnxRuntime.InferenceSample.Forms.csproj
0 → 100755
View file @
a144865d
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2083" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.ML.OnnxRuntime.InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample.csproj" />
<ProjectReference Include="..\..\..\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj" />
</ItemGroup>
</Project>
\ No newline at end of file
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/App.xaml
0 → 100755
View file @
a144865d
<?xml version = "1.0" encoding = "UTF-8" ?>
<Application
xmlns=
"http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x=
"http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local=
"clr-namespace:Microsoft.ML.OnnxRuntime.InferenceSample.Maui"
x:Class=
"Microsoft.ML.OnnxRuntime.InferenceSample.Maui.App"
>
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary
Source=
"Resources/Styles/Colors.xaml"
/>
<ResourceDictionary
Source=
"Resources/Styles/Styles.xaml"
/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/App.xaml.cs
0 → 100755
View file @
a144865d
namespace
Microsoft.ML.OnnxRuntime.InferenceSample.Maui
;
public
partial
class
App
:
Application
{
public
App
()
{
InitializeComponent
();
MainPage
=
new
AppShell
();
}
}
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/AppShell.xaml
0 → 100755
View file @
a144865d
<?xml version="1.0" encoding="UTF-8" ?>
<Shell
x:Class=
"Microsoft.ML.OnnxRuntime.InferenceSample.Maui.AppShell"
xmlns=
"http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x=
"http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local=
"clr-namespace:Microsoft.ML.OnnxRuntime.InferenceSample.Maui"
Shell.FlyoutBehavior=
"Disabled"
>
<ShellContent
Title=
"Home"
ContentTemplate=
"{DataTemplate local:MainPage}"
Route=
"MainPage"
/>
</Shell>
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/AppShell.xaml.cs
0 → 100755
View file @
a144865d
namespace
Microsoft.ML.OnnxRuntime.InferenceSample.Maui
;
public
partial
class
AppShell
:
Shell
{
public
AppShell
()
{
InitializeComponent
();
}
}
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/MainPage.xaml
0 → 100755
View file @
a144865d
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
xmlns=
"http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x=
"http://schemas.microsoft.com/winfx/2009/xaml"
x:Class=
"Microsoft.ML.OnnxRuntime.InferenceSample.Maui.MainPage"
>
<StackLayout>
<Frame
BackgroundColor=
"#2196F3"
Padding=
"24"
CornerRadius=
"0"
>
<Label
Text=
"Inference Sample"
HorizontalTextAlignment=
"Center"
TextColor=
"White"
FontSize=
"36"
/>
</Frame>
<Label
Text=
"ONNX Runtime"
FontSize=
"Title"
Padding=
"30,10,30,10"
/>
<Button
x:Name=
"Start"
Text=
"Run tests"
Clicked=
"Start_Clicked"
FontSize=
"Large"
/>
<Label
x:Name=
"OutputLabel"
Text=
"Output"
FontSize=
"Small"
/>
</StackLayout>
</ContentPage>
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/MainPage.xaml.cs
0 → 100755
View file @
a144865d
namespace
Microsoft.ML.OnnxRuntime.InferenceSample.Maui
;
//using Microsoft.Maui.Controls;
public
partial
class
MainPage
:
ContentPage
{
public
MainPage
()
{
InitializeComponent
();
// Best Practice: create the inference session (which loads and optimizes the model) once and not per inference
// as it can be expensive and time consuming.
inferenceSampleApi
=
new
InferenceSampleApi
();
}
protected
override
void
OnAppearing
()
{
base
.
OnAppearing
();
OutputLabel
.
Text
=
"Press 'Run Tests'.\n"
;
}
private
readonly
InferenceSampleApi
inferenceSampleApi
;
private
async
Task
ExecuteTests
()
{
Action
<
Label
,
string
>
addOutput
=
(
label
,
text
)
=>
{
Application
.
Current
.
Dispatcher
.
Dispatch
(()
=>
{
label
.
Text
+=
text
;
});
//Device.BeginInvokeOnMainThread(() => { label.Text += text; });
Console
.
Write
(
text
);
};
OutputLabel
.
Text
=
"Testing execution\nComplete output is written to Console in this trivial example.\n\n"
;
// run the testing in a background thread so updates to the UI aren't blocked
await
Task
.
Run
(()
=>
{
addOutput
(
OutputLabel
,
"Testing using default platform-specific session options... "
);
inferenceSampleApi
.
Execute
();
addOutput
(
OutputLabel
,
"done.\n"
);
Thread
.
Sleep
(
1000
);
// artificial delay so the UI updates gradually
// demonstrate a range of usages by recreating the inference session with different session options.
addOutput
(
OutputLabel
,
"Testing using default platform-specific session options... "
);
inferenceSampleApi
.
CreateInferenceSession
(
SessionOptionsContainer
.
Create
());
inferenceSampleApi
.
Execute
();
addOutput
(
OutputLabel
,
"done.\n"
);
Thread
.
Sleep
(
1000
);
addOutput
(
OutputLabel
,
"Testing using named platform-specific session options... "
);
inferenceSampleApi
.
CreateInferenceSession
(
SessionOptionsContainer
.
Create
(
"ort_with_npu"
));
inferenceSampleApi
.
Execute
();
addOutput
(
OutputLabel
,
"done.\n"
);
Thread
.
Sleep
(
1000
);
addOutput
(
OutputLabel
,
"Testing using default platform-specific session options via ApplyConfiguration extension... "
);
inferenceSampleApi
.
CreateInferenceSession
(
new
SessionOptions
().
ApplyConfiguration
());
inferenceSampleApi
.
Execute
();
addOutput
(
OutputLabel
,
"done.\n"
);
Thread
.
Sleep
(
1000
);
addOutput
(
OutputLabel
,
"Testing using named platform-specific session options via ApplyConfiguration extension... "
);
inferenceSampleApi
.
CreateInferenceSession
(
new
SessionOptions
().
ApplyConfiguration
(
"ort_with_npu"
));
inferenceSampleApi
.
Execute
();
addOutput
(
OutputLabel
,
"done.\n\n"
);
Thread
.
Sleep
(
1000
);
});
addOutput
(
OutputLabel
,
"Testing successfully completed! See the Console log for more info."
);
}
private
async
void
Start_Clicked
(
object
sender
,
EventArgs
e
)
{
await
ExecuteTests
()
.
ContinueWith
(
(
task
)
=>
{
if
(
task
.
IsFaulted
)
MainThread
.
BeginInvokeOnMainThread
(()
=>
DisplayAlert
(
"Error"
,
task
.
Exception
.
Message
,
"OK"
));
})
.
ConfigureAwait
(
false
);
}
}
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/MauiProgram.cs
0 → 100755
View file @
a144865d
namespace
Microsoft.ML.OnnxRuntime.InferenceSample.Maui
;
public
static
class
MauiProgram
{
public
static
MauiApp
CreateMauiApp
()
{
var
builder
=
MauiApp
.
CreateBuilder
();
builder
.
UseMauiApp
<
App
>()
.
ConfigureFonts
(
fonts
=>
{
fonts
.
AddFont
(
"OpenSans-Regular.ttf"
,
"OpenSansRegular"
);
fonts
.
AddFont
(
"OpenSans-Semibold.ttf"
,
"OpenSansSemibold"
);
});
return
builder
.
Build
();
}
}
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/Microsoft.ML.OnnxRuntime.InferenceSample.Maui.csproj
0 → 100755
View file @
a144865d
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- note net6.0-maccatalyst is not supported currently. requires a new native build to be added. -->
<TargetFrameworks>net6.0-android;net6.0-ios</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>Microsoft.ML.OnnxRuntime.InferenceSample.Maui</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<!-- Display name -->
<ApplicationTitle>InferenceSample_Maui</ApplicationTitle>
<!-- App Identifier -->
<ApplicationId>com.microsoft.ml.onnxruntime.inferencesample.maui</ApplicationId>
<ApplicationIdGuid>58af3884-1c25-42b7-b78b-30a65fb3cf69</ApplicationIdGuid>
<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
<DefaultLanguage>en</DefaultLanguage>
</PropertyGroup>
<!-- set ORT SelectedTargets to include .net6 target frameworks -->
<PropertyGroup>
<SelectedTargets>All</SelectedTargets>
</PropertyGroup>
<ItemGroup>
<!-- NOTE:
You need to manually put builds from other platforms such as Android in the correct place for this to work for cross-platform
builds such as running in the Android simulator.
The 'correct' place is defined by the OnnxRuntimeBuildDirectory property in Microsoft.ML.OnnxRuntime.csproj
-->
<ProjectReference Include="..\..\..\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj" />
<ProjectReference Include="..\Microsoft.ML.OnnxRuntime.InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample.csproj" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="..\..\..\testdata\bench.in">
<Link>TestData\bench.in</Link>
</EmbeddedResource>
<EmbeddedResource Include="..\..\..\testdata\squeezenet.onnx">
<Link>TestData\squeezenet.onnx</Link>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
<!-- Images -->
<MauiImage Include="Resources\Images\*" />
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />
<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />
<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>
</Project>
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/Microsoft.ML.OnnxRuntime.InferenceSample.Maui.sln
0 → 100755
View file @
a144865d
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31611.283
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.OnnxRuntime.InferenceSample.Maui", "Microsoft.ML.OnnxRuntime.InferenceSample.Maui.csproj", "{00338B12-B291-43A6-9F54-0174660FB70E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{00338B12-B291-43A6-9F54-0174660FB70E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{00338B12-B291-43A6-9F54-0174660FB70E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{00338B12-B291-43A6-9F54-0174660FB70E}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{00338B12-B291-43A6-9F54-0174660FB70E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{00338B12-B291-43A6-9F54-0174660FB70E}.Release|Any CPU.Build.0 = Release|Any CPU
{00338B12-B291-43A6-9F54-0174660FB70E}.Release|Any CPU.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572}
EndGlobalSection
EndGlobal
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/Platforms/Android/AndroidManifest.xml
0 → 100755
View file @
a144865d
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<application
android:allowBackup=
"true"
android:icon=
"@mipmap/appicon"
android:roundIcon=
"@mipmap/appicon_round"
android:supportsRtl=
"true"
></application>
<uses-permission
android:name=
"android.permission.ACCESS_NETWORK_STATE"
/>
<uses-permission
android:name=
"android.permission.INTERNET"
/>
</manifest>
\ No newline at end of file
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/Platforms/Android/MainActivity.cs
0 → 100755
View file @
a144865d
using
Android.App
;
using
Android.Content.PM
;
using
Android.OS
;
namespace
Microsoft.ML.OnnxRuntime.InferenceSample.Maui
;
[
Activity
(
Theme
=
"@style/Maui.SplashTheme"
,
MainLauncher
=
true
,
ConfigurationChanges
=
ConfigChanges
.
ScreenSize
|
ConfigChanges
.
Orientation
|
ConfigChanges
.
UiMode
|
ConfigChanges
.
ScreenLayout
|
ConfigChanges
.
SmallestScreenSize
|
ConfigChanges
.
Density
)]
public
class
MainActivity
:
MauiAppCompatActivity
{
}
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/Platforms/Android/MainApplication.cs
0 → 100755
View file @
a144865d
using
Android.App
;
using
Android.Runtime
;
namespace
Microsoft.ML.OnnxRuntime.InferenceSample.Maui
;
[
Application
]
public
class
MainApplication
:
MauiApplication
{
public
MainApplication
(
IntPtr
handle
,
JniHandleOwnership
ownership
)
:
base
(
handle
,
ownership
)
{
}
protected
override
MauiApp
CreateMauiApp
()
=>
MauiProgram
.
CreateMauiApp
();
}
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/Platforms/Android/Resources/values/colors.xml
0 → 100755
View file @
a144865d
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color
name=
"colorPrimary"
>
#512BD4
</color>
<color
name=
"colorPrimaryDark"
>
#2B0B98
</color>
<color
name=
"colorAccent"
>
#2B0B98
</color>
</resources>
\ No newline at end of file
csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/Platforms/MacCatalyst/AppDelegate.cs
0 → 100755
View file @
a144865d
using
Foundation
;
namespace
Microsoft.ML.OnnxRuntime.InferenceSample.Maui
;
[
Register
(
"AppDelegate"
)]
public
class
AppDelegate
:
MauiUIApplicationDelegate
{
protected
override
MauiApp
CreateMauiApp
()
=>
MauiProgram
.
CreateMauiApp
();
}
Prev
1
…
8
9
10
11
12
13
14
15
16
…
21
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment