Add Xamarin support (#9436)
Add Xamarin support to the ORT nuget packages. - Update C# code to support Xamarin builds for iOS and Android - refactor some things to split out common code - include iOS and Android ORT native shared library in native nuget package
1
.gitignore
vendored
|
|
@ -58,3 +58,4 @@ onnxruntime/python/version_info.py
|
|||
# direnv, posh-direnv
|
||||
.envrc
|
||||
.psenvrc
|
||||
*.csproj.user
|
||||
|
|
|
|||
|
|
@ -3,7 +3,11 @@
|
|||
|
||||
if(UNIX)
|
||||
set(SYMBOL_FILE ${CMAKE_CURRENT_BINARY_DIR}/onnxruntime.lds)
|
||||
set(OUTPUT_STYLE gcc)
|
||||
if(APPLE)
|
||||
set(OUTPUT_STYLE xcode)
|
||||
else()
|
||||
set(OUTPUT_STYLE gcc)
|
||||
endif()
|
||||
else()
|
||||
set(SYMBOL_FILE ${CMAKE_CURRENT_BINARY_DIR}/onnxruntime_dll.def)
|
||||
set(OUTPUT_STYLE vc)
|
||||
|
|
@ -114,6 +118,7 @@ endif()
|
|||
|
||||
if (NOT WIN32)
|
||||
if (APPLE OR ${CMAKE_SYSTEM_NAME} MATCHES "^iOS")
|
||||
set(ONNXRUNTIME_SO_LINK_FLAG " -Wl,-exported_symbols_list,${SYMBOL_FILE}")
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL "iOS")
|
||||
set_target_properties(onnxruntime PROPERTIES
|
||||
SOVERSION ${ORT_VERSION}
|
||||
|
|
@ -121,7 +126,6 @@ if (NOT WIN32)
|
|||
INSTALL_RPATH_USE_LINK_PATH FALSE
|
||||
BUILD_WITH_INSTALL_NAME_DIR TRUE
|
||||
INSTALL_NAME_DIR @rpath)
|
||||
set(ONNXRUNTIME_SO_LINK_FLAG " -Wl,-exported_symbols_list,${SYMBOL_FILE}")
|
||||
else()
|
||||
set_target_properties(onnxruntime PROPERTIES INSTALL_RPATH "@loader_path")
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -11,67 +11,43 @@ else()
|
|||
endif()
|
||||
|
||||
if (onnxruntime_USE_CUDA)
|
||||
STRING(APPEND CSHARP_PREPROCESSOR_DEFINES "USE_CUDA,")
|
||||
STRING(APPEND CSHARP_PREPROCESSOR_DEFINES "USE_CUDA;")
|
||||
endif()
|
||||
|
||||
if (onnxruntime_USE_DNNL)
|
||||
STRING(APPEND CSHARP_PREPROCESSOR_DEFINES "USE_DNNL,")
|
||||
STRING(APPEND CSHARP_PREPROCESSOR_DEFINES "USE_DNNL;")
|
||||
endif()
|
||||
|
||||
if (onnxruntime_USE_DML)
|
||||
STRING(APPEND CSHARP_PREPROCESSOR_DEFINES "USE_DML,")
|
||||
STRING(APPEND CSHARP_PREPROCESSOR_DEFINES "USE_DML;")
|
||||
endif()
|
||||
|
||||
if (onnxruntime_USE_MIGRAPHX)
|
||||
STRING(APPEND CSHARP_PREPROCESSOR_DEFINES "USE_MIGRAPHX,")
|
||||
STRING(APPEND CSHARP_PREPROCESSOR_DEFINES "USE_MIGRAPHX;")
|
||||
endif()
|
||||
|
||||
if (onnxruntime_USE_NNAPI_BUILTIN)
|
||||
STRING(APPEND CSHARP_PREPROCESSOR_DEFINES "USE_NNAPI,")
|
||||
STRING(APPEND CSHARP_PREPROCESSOR_DEFINES "USE_NNAPI;")
|
||||
endif()
|
||||
|
||||
if (onnxruntime_USE_NUPHAR)
|
||||
STRING(APPEND CSHARP_PREPROCESSOR_DEFINES "USE_NUPHAR,")
|
||||
STRING(APPEND CSHARP_PREPROCESSOR_DEFINES "USE_NUPHAR;")
|
||||
endif()
|
||||
|
||||
if (onnxruntime_USE_OPENVINO)
|
||||
STRING(APPEND CSHARP_PREPROCESSOR_DEFINES "USE_OPENVINO,")
|
||||
STRING(APPEND CSHARP_PREPROCESSOR_DEFINES "USE_OPENVINO;")
|
||||
endif()
|
||||
|
||||
if (onnxruntime_USE_ROCM)
|
||||
STRING(APPEND CSHARP_PREPROCESSOR_DEFINES "USE_ROCM,")
|
||||
STRING(APPEND CSHARP_PREPROCESSOR_DEFINES "USE_ROCM;")
|
||||
endif()
|
||||
|
||||
if (onnxruntime_USE_TENSORRT)
|
||||
STRING(APPEND CSHARP_PREPROCESSOR_DEFINES "USE_TENSORRT,")
|
||||
STRING(APPEND CSHARP_PREPROCESSOR_DEFINES "USE_TENSORRT;")
|
||||
endif()
|
||||
|
||||
include(CSharpUtilities)
|
||||
|
||||
include_external_msproject(Microsoft.ML.OnnxRuntime
|
||||
${CSHARP_ROOT}/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.csproj
|
||||
${CSHARP_DEPENDS}
|
||||
)
|
||||
|
||||
include_external_msproject(Microsoft.ML.OnnxRuntime.InferenceSample
|
||||
${CSHARP_ROOT}/sample/Microsoft.ML.OnnxRuntime.InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.csproj
|
||||
${CSHARP_DEPENDS}
|
||||
)
|
||||
include_external_msproject(Microsoft.ML.OnnxRuntime.Tests
|
||||
${CSHARP_ROOT}/test/Microsoft.ML.OnnxRuntime.Tests/Microsoft.ML.OnnxRuntime.Tests.csproj
|
||||
${CSHARP_DEPENDS}
|
||||
)
|
||||
include_external_msproject(Microsoft.ML.OnnxRuntime.PerfTool
|
||||
${CSHARP_ROOT}/tools/Microsoft.ML.OnnxRuntime.PerfTool/Microsoft.ML.OnnxRuntime.PerfTool.csproj
|
||||
${CSHARP_DEPENDS}
|
||||
)
|
||||
|
||||
#Exclude them from the ALL_BUILD target, otherwise it will trigger errors like:
|
||||
#"Error : Project 'cmake\..\csharp\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj' targets 'netstandard1.1'. It cannot be referenced by a project that targets '.NETFramework,Version=v4.0'."
|
||||
#We can't fix it because cmake only supports the "TargetFrameworkVersion" property, not "TargetFramework".
|
||||
set_target_properties(Microsoft.ML.OnnxRuntime Microsoft.ML.OnnxRuntime.InferenceSample Microsoft.ML.OnnxRuntime.Tests
|
||||
Microsoft.ML.OnnxRuntime.PerfTool PROPERTIES EXCLUDE_FROM_ALL 1)
|
||||
|
||||
# generate Directory.Build.props
|
||||
set(DIRECTORY_BUILD_PROPS_COMMENT "WARNING: This is a generated file, please do not check it in!")
|
||||
configure_file(${CSHARP_ROOT}/Directory.Build.props.in
|
||||
|
|
|
|||
15
csharp/.clang-format
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
# clang-format settings for the C# code
|
||||
BasedOnStyle: Microsoft
|
||||
|
||||
BreakBeforeBraces: Custom
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: true
|
||||
BeforeWhile: true
|
||||
SplitEmptyFunction: false
|
||||
SplitEmptyRecord: false
|
||||
# unfortunately there's no config option for handling the 'get' or 'set' of properties
|
||||
|
||||
IndentCaseLabels: true
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
SpacesInContainerLiterals: false
|
||||
|
|
@ -50,7 +50,7 @@ CMake creates a target to this project
|
|||
Targets="Restore"
|
||||
Properties="Platform=AnyCPU"
|
||||
/>
|
||||
<MSBuild Projects="test\Microsoft.ML.OnnxRuntime.Tests\Microsoft.ML.OnnxRuntime.Tests.csproj"
|
||||
<MSBuild Projects="test\Microsoft.ML.OnnxRuntime.Tests.Common\Microsoft.ML.OnnxRuntime.Tests.Common.csproj"
|
||||
Targets="Restore"
|
||||
Properties="ProtocDirectory=$(ProtocDirectory)"
|
||||
/>
|
||||
|
|
@ -70,7 +70,7 @@ CMake creates a target to this project
|
|||
Targets="Build"
|
||||
Properties="Platform=AnyCPU"
|
||||
/>
|
||||
<MSBuild Projects="test\Microsoft.ML.OnnxRuntime.Tests\Microsoft.ML.OnnxRuntime.Tests.csproj"
|
||||
<MSBuild Projects="test\Microsoft.ML.OnnxRuntime.Tests.Common\Microsoft.ML.OnnxRuntime.Tests.Common.csproj"
|
||||
Targets="Build"
|
||||
/>
|
||||
<MSBuild Projects="tools\Microsoft.ML.OnnxRuntime.PerfTool\Microsoft.ML.OnnxRuntime.PerfTool.csproj"
|
||||
|
|
|
|||
|
|
@ -1,50 +1,367 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28010.2003
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.31613.86
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "OnnxRuntime", "OnnxRuntime", "{6EFBFAB8-C606-4BA4-9604-BBAF3788520D}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.OnnxRuntime", "src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj", "{584B53B3-359D-4DC2-BCD8-530B5D4685AD}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.OnnxRuntime.InferenceSample", "sample\Microsoft.ML.OnnxRuntime.InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample.csproj", "{1AA14958-9246-4163-9403-F650E65ADCBC}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sample", "Sample", "{02AADD56-0FD4-4F03-A56C-30529A36B0C0}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.OnnxRuntime.Tests", "test\Microsoft.ML.OnnxRuntime.Tests\Microsoft.ML.OnnxRuntime.Tests.csproj", "{50173D13-DF29-42E7-A30B-8B12D36C77B1}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.OnnxRuntime.InferenceSample", "sample\InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample.csproj", "{2E295930-42B1-422D-925D-F07947AD8EFF}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.OnnxRuntime.InferenceSample.Forms", "sample\InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample.Forms\Microsoft.ML.OnnxRuntime.InferenceSample.Forms.csproj", "{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.OnnxRuntime.InferenceSample.Forms.Android", "sample\InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample.Forms.Android\Microsoft.ML.OnnxRuntime.InferenceSample.Forms.Android.csproj", "{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.OnnxRuntime.InferenceSample.Forms.iOS", "sample\InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample.Forms.iOS\Microsoft.ML.OnnxRuntime.InferenceSample.Forms.iOS.csproj", "{97B32648-1B4A-4E35-8058-B2AD7373B6E6}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.OnnxRuntime.InferenceSample.NetCoreApp", "sample\InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample.NetCoreApp\Microsoft.ML.OnnxRuntime.InferenceSample.NetCoreApp.csproj", "{1AA14958-9246-4163-9403-F650E65ADCBC}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Perf", "Perf", "{05C85C92-A377-4F69-9EF4-44A94C9B089D}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.OnnxRuntime.PerfTool", "tools\Microsoft.ML.OnnxRuntime.PerfTool\Microsoft.ML.OnnxRuntime.PerfTool.csproj", "{310506FD-6E78-4D62-989B-25D69A85E8CF}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{6782763B-8097-457C-AEA3-67678621DBE0}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.OnnxRuntime.Tests.Common", "test\Microsoft.ML.OnnxRuntime.Tests.Common\Microsoft.ML.OnnxRuntime.Tests.Common.csproj", "{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.OnnxRuntime.Tests.NetCoreApp", "test\Microsoft.ML.OnnxRuntime.Tests.NetCoreApp\Microsoft.ML.OnnxRuntime.Tests.NetCoreApp.csproj", "{50173D13-DF29-42E7-A30B-8B12D36C77B1}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.OnnxRuntime.Tests.iOS", "test\Microsoft.ML.OnnxRuntime.Tests.iOS\Microsoft.ML.OnnxRuntime.Tests.iOS.csproj", "{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.OnnxRuntime.Tests.Droid", "test\Microsoft.ML.OnnxRuntime.Tests.Droid\Microsoft.ML.OnnxRuntime.Tests.Droid.csproj", "{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.OnnxRuntime.Tests.Devices", "test\Microsoft.ML.OnnxRuntime.Tests.Devices\Microsoft.ML.OnnxRuntime.Tests.Devices.csproj", "{30431891-3929-4394-8049-75055B92315F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|iPhone = Debug|iPhone
|
||||
Debug|iPhoneSimulator = Debug|iPhoneSimulator
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|iPhone = Release|iPhone
|
||||
Release|iPhoneSimulator = Release|iPhoneSimulator
|
||||
Release|x86 = Release|x86
|
||||
RelWithDebInfo|Any CPU = RelWithDebInfo|Any CPU
|
||||
RelWithDebInfo|iPhone = RelWithDebInfo|iPhone
|
||||
RelWithDebInfo|iPhoneSimulator = RelWithDebInfo|iPhoneSimulator
|
||||
RelWithDebInfo|x86 = RelWithDebInfo|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD}.Debug|x86.Build.0 = Debug|x86
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD}.Release|x86.ActiveCfg = Release|x86
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD}.Release|x86.Build.0 = Release|x86
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD}.RelWithDebInfo|Any CPU.ActiveCfg = RelWithDebInfo|Any CPU
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD}.RelWithDebInfo|Any CPU.Build.0 = RelWithDebInfo|Any CPU
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD}.RelWithDebInfo|iPhone.ActiveCfg = RelWithDebInfo|Any CPU
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD}.RelWithDebInfo|iPhone.Build.0 = RelWithDebInfo|Any CPU
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD}.RelWithDebInfo|iPhoneSimulator.ActiveCfg = RelWithDebInfo|Any CPU
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD}.RelWithDebInfo|iPhoneSimulator.Build.0 = RelWithDebInfo|Any CPU
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.Release|x86.Build.0 = Release|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.RelWithDebInfo|iPhone.ActiveCfg = Release|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.RelWithDebInfo|iPhone.Build.0 = Release|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.RelWithDebInfo|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.RelWithDebInfo|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.RelWithDebInfo|x86.ActiveCfg = Debug|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.RelWithDebInfo|x86.Build.0 = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Release|x86.Build.0 = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.RelWithDebInfo|iPhone.ActiveCfg = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.RelWithDebInfo|iPhone.Build.0 = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.RelWithDebInfo|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.RelWithDebInfo|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.RelWithDebInfo|x86.ActiveCfg = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.RelWithDebInfo|x86.Build.0 = Debug|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Release|x86.Build.0 = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.RelWithDebInfo|iPhone.ActiveCfg = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.RelWithDebInfo|iPhone.Build.0 = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.RelWithDebInfo|iPhone.Deploy.0 = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.RelWithDebInfo|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.RelWithDebInfo|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.RelWithDebInfo|iPhoneSimulator.Deploy.0 = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.RelWithDebInfo|x86.ActiveCfg = Debug|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.RelWithDebInfo|x86.Build.0 = Debug|Any CPU
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Debug|iPhone.ActiveCfg = Debug|iPhone
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Debug|iPhone.Build.0 = Debug|iPhone
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Debug|x86.ActiveCfg = Debug|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Debug|x86.Build.0 = Debug|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Release|Any CPU.Build.0 = Release|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Release|iPhone.ActiveCfg = Release|iPhone
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Release|iPhone.Build.0 = Release|iPhone
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Release|x86.ActiveCfg = Release|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Release|x86.Build.0 = Release|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.RelWithDebInfo|Any CPU.Build.0 = Debug|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.RelWithDebInfo|iPhone.ActiveCfg = Release|iPhone
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.RelWithDebInfo|iPhone.Build.0 = Release|iPhone
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.RelWithDebInfo|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.RelWithDebInfo|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.RelWithDebInfo|x86.ActiveCfg = Debug|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.RelWithDebInfo|x86.Build.0 = Debug|iPhoneSimulator
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.Debug|x86.Build.0 = Debug|x86
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.Release|x86.ActiveCfg = Release|x86
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.Release|x86.Build.0 = Release|x86
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.RelWithDebInfo|Any CPU.ActiveCfg = RelWithDebInfo|Any CPU
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.RelWithDebInfo|Any CPU.Build.0 = RelWithDebInfo|Any CPU
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.RelWithDebInfo|Any CPU.ActiveCfg = RelWithDebInfo|Any CPU
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.RelWithDebInfo|Any CPU.Build.0 = RelWithDebInfo|Any CPU
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.RelWithDebInfo|iPhone.ActiveCfg = RelWithDebInfo|Any CPU
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.RelWithDebInfo|iPhone.Build.0 = RelWithDebInfo|Any CPU
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.RelWithDebInfo|iPhoneSimulator.ActiveCfg = RelWithDebInfo|Any CPU
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.RelWithDebInfo|iPhoneSimulator.Build.0 = RelWithDebInfo|Any CPU
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF}.Debug|x86.Build.0 = Debug|x86
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF}.Release|x86.ActiveCfg = Release|x86
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF}.Release|x86.Build.0 = Release|x86
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF}.RelWithDebInfo|Any CPU.ActiveCfg = RelWithDebInfo|Any CPU
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF}.RelWithDebInfo|Any CPU.Build.0 = RelWithDebInfo|Any CPU
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF}.RelWithDebInfo|iPhone.ActiveCfg = RelWithDebInfo|Any CPU
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF}.RelWithDebInfo|iPhone.Build.0 = RelWithDebInfo|Any CPU
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF}.RelWithDebInfo|iPhoneSimulator.ActiveCfg = RelWithDebInfo|Any CPU
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF}.RelWithDebInfo|iPhoneSimulator.Build.0 = RelWithDebInfo|Any CPU
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6}.Debug|x86.Build.0 = Debug|x86
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6}.Release|x86.ActiveCfg = Release|x86
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6}.Release|x86.Build.0 = Release|x86
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6}.RelWithDebInfo|Any CPU.ActiveCfg = RelWithDebInfo|Any CPU
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6}.RelWithDebInfo|Any CPU.Build.0 = RelWithDebInfo|Any CPU
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6}.RelWithDebInfo|iPhone.ActiveCfg = RelWithDebInfo|Any CPU
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6}.RelWithDebInfo|iPhone.Build.0 = RelWithDebInfo|Any CPU
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6}.RelWithDebInfo|iPhoneSimulator.ActiveCfg = RelWithDebInfo|Any CPU
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6}.RelWithDebInfo|iPhoneSimulator.Build.0 = RelWithDebInfo|Any CPU
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.Debug|x86.Build.0 = Debug|x86
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.Release|x86.ActiveCfg = Release|x86
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.Release|x86.Build.0 = Release|x86
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.RelWithDebInfo|Any CPU.ActiveCfg = RelWithDebInfo|Any CPU
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.RelWithDebInfo|Any CPU.Build.0 = RelWithDebInfo|Any CPU
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.RelWithDebInfo|iPhone.ActiveCfg = RelWithDebInfo|Any CPU
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.RelWithDebInfo|iPhone.Build.0 = RelWithDebInfo|Any CPU
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.RelWithDebInfo|iPhoneSimulator.ActiveCfg = RelWithDebInfo|Any CPU
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.RelWithDebInfo|iPhoneSimulator.Build.0 = RelWithDebInfo|Any CPU
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86
|
||||
{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
|
||||
{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
|
||||
{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4}.Debug|iPhone.ActiveCfg = Debug|iPhone
|
||||
{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4}.Debug|iPhone.Build.0 = Debug|iPhone
|
||||
{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
|
||||
{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
|
||||
{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4}.Debug|x86.ActiveCfg = Debug|iPhoneSimulator
|
||||
{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4}.Debug|x86.Build.0 = Debug|iPhoneSimulator
|
||||
{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
|
||||
{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4}.Release|Any CPU.Build.0 = Release|iPhoneSimulator
|
||||
{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4}.Release|iPhone.ActiveCfg = Release|iPhone
|
||||
{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4}.Release|iPhone.Build.0 = Release|iPhone
|
||||
{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
|
||||
{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
|
||||
{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4}.Release|x86.ActiveCfg = Release|iPhoneSimulator
|
||||
{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4}.Release|x86.Build.0 = Release|iPhoneSimulator
|
||||
{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|iPhoneSimulator
|
||||
{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4}.RelWithDebInfo|Any CPU.Build.0 = Debug|iPhoneSimulator
|
||||
{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4}.RelWithDebInfo|iPhone.ActiveCfg = Release|iPhone
|
||||
{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4}.RelWithDebInfo|iPhone.Build.0 = Release|iPhone
|
||||
{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4}.RelWithDebInfo|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
|
||||
{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4}.RelWithDebInfo|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
|
||||
{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4}.RelWithDebInfo|x86.ActiveCfg = Debug|iPhoneSimulator
|
||||
{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4}.RelWithDebInfo|x86.Build.0 = Debug|iPhoneSimulator
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.Release|x86.Build.0 = Release|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.RelWithDebInfo|Any CPU.Build.0 = Debug|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.RelWithDebInfo|iPhone.ActiveCfg = Release|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.RelWithDebInfo|iPhone.Build.0 = Release|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.RelWithDebInfo|iPhone.Deploy.0 = Release|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.RelWithDebInfo|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.RelWithDebInfo|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.RelWithDebInfo|iPhoneSimulator.Deploy.0 = Release|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.RelWithDebInfo|x86.ActiveCfg = Debug|Any CPU
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C}.RelWithDebInfo|x86.Build.0 = Debug|Any CPU
|
||||
{30431891-3929-4394-8049-75055B92315F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{30431891-3929-4394-8049-75055B92315F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{30431891-3929-4394-8049-75055B92315F}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{30431891-3929-4394-8049-75055B92315F}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{30431891-3929-4394-8049-75055B92315F}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{30431891-3929-4394-8049-75055B92315F}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{30431891-3929-4394-8049-75055B92315F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{30431891-3929-4394-8049-75055B92315F}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{30431891-3929-4394-8049-75055B92315F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{30431891-3929-4394-8049-75055B92315F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{30431891-3929-4394-8049-75055B92315F}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{30431891-3929-4394-8049-75055B92315F}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{30431891-3929-4394-8049-75055B92315F}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{30431891-3929-4394-8049-75055B92315F}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{30431891-3929-4394-8049-75055B92315F}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{30431891-3929-4394-8049-75055B92315F}.Release|x86.Build.0 = Release|Any CPU
|
||||
{30431891-3929-4394-8049-75055B92315F}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{30431891-3929-4394-8049-75055B92315F}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{30431891-3929-4394-8049-75055B92315F}.RelWithDebInfo|iPhone.ActiveCfg = Release|Any CPU
|
||||
{30431891-3929-4394-8049-75055B92315F}.RelWithDebInfo|iPhone.Build.0 = Release|Any CPU
|
||||
{30431891-3929-4394-8049-75055B92315F}.RelWithDebInfo|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{30431891-3929-4394-8049-75055B92315F}.RelWithDebInfo|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{30431891-3929-4394-8049-75055B92315F}.RelWithDebInfo|x86.ActiveCfg = Debug|Any CPU
|
||||
{30431891-3929-4394-8049-75055B92315F}.RelWithDebInfo|x86.Build.0 = Debug|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD} = {6EFBFAB8-C606-4BA4-9604-BBAF3788520D}
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF} = {02AADD56-0FD4-4F03-A56C-30529A36B0C0}
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36} = {02AADD56-0FD4-4F03-A56C-30529A36B0C0}
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E} = {02AADD56-0FD4-4F03-A56C-30529A36B0C0}
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6} = {02AADD56-0FD4-4F03-A56C-30529A36B0C0}
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC} = {02AADD56-0FD4-4F03-A56C-30529A36B0C0}
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF} = {05C85C92-A377-4F69-9EF4-44A94C9B089D}
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6} = {6782763B-8097-457C-AEA3-67678621DBE0}
|
||||
{50173D13-DF29-42E7-A30B-8B12D36C77B1} = {6782763B-8097-457C-AEA3-67678621DBE0}
|
||||
{19446672-EBA3-4BA6-8DFB-AB2A85AC9AA4} = {6782763B-8097-457C-AEA3-67678621DBE0}
|
||||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C} = {6782763B-8097-457C-AEA3-67678621DBE0}
|
||||
{30431891-3929-4394-8049-75055B92315F} = {6782763B-8097-457C-AEA3-67678621DBE0}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {C3DBDA2B-F169-4EDE-9353-858904124B75}
|
||||
EndGlobalSection
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
Any raw assets you want to be deployed with your application can be placed in
|
||||
this directory (and child directories) and given a Build Action of "AndroidAsset".
|
||||
|
||||
These files will be deployed with your package and will be accessible using Android's
|
||||
AssetManager, like this:
|
||||
|
||||
public class ReadAsset : Activity
|
||||
{
|
||||
protected override void OnCreate (Bundle bundle)
|
||||
{
|
||||
base.OnCreate (bundle);
|
||||
|
||||
InputStream input = Assets.Open ("my_asset.txt");
|
||||
}
|
||||
}
|
||||
|
||||
Additionally, some Android functions will automatically load asset files:
|
||||
|
||||
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
using Android.App;
|
||||
using Android.Content.PM;
|
||||
using Android.Runtime;
|
||||
using Android.OS;
|
||||
|
||||
namespace Microsoft.ML.OnnxRuntime.InferenceSample.Forms.Droid
|
||||
{
|
||||
[Activity(Label = "Microsoft.ML.OnnxRuntime.InferenceSample.Forms", Icon = "@mipmap/icon",
|
||||
Theme = "@style/MainTheme", MainLauncher = true,
|
||||
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode |
|
||||
ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize)]
|
||||
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
|
||||
{
|
||||
protected override void OnCreate(Bundle savedInstanceState)
|
||||
{
|
||||
base.OnCreate(savedInstanceState);
|
||||
|
||||
Xamarin.Essentials.Platform.Init(this, savedInstanceState);
|
||||
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
|
||||
|
||||
// Register default session options configuration. This is optional.
|
||||
SessionOptionsContainer.Register((options) => { options.LogId = "Ort"; });
|
||||
|
||||
// Register a named session options configuration that enables NNAPI
|
||||
SessionOptionsContainer.Register("ort_with_npu", (options) => {
|
||||
options.AppendExecutionProvider_Nnapi();
|
||||
options.LogId = "Ort+Nnapi";
|
||||
});
|
||||
|
||||
LoadApplication(new App());
|
||||
}
|
||||
|
||||
public override void OnRequestPermissionsResult(int requestCode, string[] permissions,
|
||||
[GeneratedEnum] Android.Content.PM.Permission[] grantResults)
|
||||
{
|
||||
Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,118 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}</ProjectGuid>
|
||||
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<TemplateGuid>{c9e5eea5-ca05-42a1-839b-61506e0a37df}</TemplateGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Microsoft.ML.OnnxRuntime.InferenceSample.Forms.Droid</RootNamespace>
|
||||
<AssemblyName>Microsoft.ML.OnnxRuntime.InferenceSample.Forms.Android</AssemblyName>
|
||||
<Deterministic>True</Deterministic>
|
||||
<AndroidApplication>True</AndroidApplication>
|
||||
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
|
||||
<AndroidResgenClass>Resource</AndroidResgenClass>
|
||||
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
|
||||
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
|
||||
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
|
||||
<TargetFrameworkVersion>v11.0</TargetFrameworkVersion>
|
||||
<AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>
|
||||
<AndroidUseAapt2>true</AndroidUseAapt2>
|
||||
<AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AutoGenerateBindingRedirects>True</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>portable</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AndroidLinkMode>None</AndroidLinkMode>
|
||||
<Debugger>Xamarin</Debugger>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>portable</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AndroidManagedSymbols>true</AndroidManagedSymbols>
|
||||
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Mono.Android" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2083" />
|
||||
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="MainActivity.cs" />
|
||||
<Compile Include="Resources\Resource.designer.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\AboutResources.txt" />
|
||||
<None Include="Assets\AboutAssets.txt" />
|
||||
<None Include="Properties\AndroidManifest.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidResource Include="Resources\values\styles.xml" />
|
||||
<AndroidResource Include="Resources\values\colors.xml" />
|
||||
<AndroidResource Include="Resources\mipmap-anydpi-v26\icon.xml" />
|
||||
<AndroidResource Include="Resources\mipmap-anydpi-v26\icon_round.xml" />
|
||||
<AndroidResource Include="Resources\mipmap-hdpi\icon.png" />
|
||||
<AndroidResource Include="Resources\mipmap-hdpi\launcher_foreground.png" />
|
||||
<AndroidResource Include="Resources\mipmap-mdpi\icon.png" />
|
||||
<AndroidResource Include="Resources\mipmap-mdpi\launcher_foreground.png" />
|
||||
<AndroidResource Include="Resources\mipmap-xhdpi\icon.png" />
|
||||
<AndroidResource Include="Resources\mipmap-xhdpi\launcher_foreground.png" />
|
||||
<AndroidResource Include="Resources\mipmap-xxhdpi\icon.png" />
|
||||
<AndroidResource Include="Resources\mipmap-xxhdpi\launcher_foreground.png" />
|
||||
<AndroidResource Include="Resources\mipmap-xxxhdpi\icon.png" />
|
||||
<AndroidResource Include="Resources\mipmap-xxxhdpi\launcher_foreground.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Resources\drawable\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Microsoft.ML.OnnxRuntime.InferenceSample.Forms\Microsoft.ML.OnnxRuntime.InferenceSample.Forms.csproj">
|
||||
<Project>{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}</Project>
|
||||
<Name>Microsoft.ML.OnnxRuntime.InferenceSample.Forms</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj">
|
||||
<Project>{584B53B3-359D-4DC2-BCD8-530B5D4685AD}</Project>
|
||||
<Name>Microsoft.ML.OnnxRuntime</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Memory" Version="4.5.3" IncludeAssets="None" />
|
||||
<AndroidNativeLibrary Condition=" Exists('..\..\..\..\build\Android\arm64-v8a\Release\libonnxruntime.so') " Include="..\..\..\..\build\Android\arm64-v8a\Release\libonnxruntime.so">
|
||||
<Link>libs\arm64-v8a\libonnxruntime.so</Link>
|
||||
</AndroidNativeLibrary>
|
||||
<AndroidNativeLibrary Condition=" Exists('..\..\..\..\build\Android\armeabi-v7a\Release\libonnxruntime.so') " Include="..\..\..\..\build\Android\armeabi-v7a\Release\libonnxruntime.so">
|
||||
<Link>libs\armeabi-v7a\libonnxruntime.so</Link>
|
||||
</AndroidNativeLibrary>
|
||||
<AndroidNativeLibrary Condition=" Exists('..\..\..\..\build\Android\x86\Release\libonnxruntime.so') " Include="..\..\..\..\build\Android\x86\Release\libonnxruntime.so">
|
||||
<Link>libs\x86\libonnxruntime.so</Link>
|
||||
</AndroidNativeLibrary>
|
||||
<AndroidNativeLibrary Condition=" Exists('..\..\..\..\build\Android\x86_64\Release\libonnxruntime.so') " Include="..\..\..\..\build\Android\x86_64\Release\libonnxruntime.so">
|
||||
<Link>libs\x86_64\libonnxruntime.so</Link>
|
||||
</AndroidNativeLibrary>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.microsoft.onnxruntime_inferencesample_forms" android:installLocation="auto">
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30" />
|
||||
<application android:label="Microsoft.ML.OnnxRuntime.InferenceSample.Forms.Android" android:theme="@style/MainTheme"></application>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
</manifest>
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using Android.App;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Microsoft.ML.OnnxRuntime.InferenceSample.Forms.Android")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Microsoft.ML.OnnxRuntime.InferenceSample.Forms.Android")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
||||
// Add some common permissions, these can be removed if not needed
|
||||
[assembly: UsesPermission(Android.Manifest.Permission.Internet)]
|
||||
[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
Images, layout descriptions, binary blobs and string dictionaries can be included
|
||||
in your application as resource files. Various Android APIs are designed to
|
||||
operate on the resource IDs instead of dealing with images, strings or binary blobs
|
||||
directly.
|
||||
|
||||
For example, a sample Android app that contains a user interface layout (main.xml),
|
||||
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
|
||||
would keep its resources in the "Resources" directory of the application:
|
||||
|
||||
Resources/
|
||||
drawable-hdpi/
|
||||
icon.png
|
||||
|
||||
drawable-ldpi/
|
||||
icon.png
|
||||
|
||||
drawable-mdpi/
|
||||
icon.png
|
||||
|
||||
layout/
|
||||
main.xml
|
||||
|
||||
values/
|
||||
strings.xml
|
||||
|
||||
In order to get the build system to recognize Android resources, set the build action to
|
||||
"AndroidResource". The native Android APIs do not operate directly with filenames, but
|
||||
instead operate on resource IDs. When you compile an Android application that uses resources,
|
||||
the build system will package the resources for distribution and generate a class called
|
||||
"Resource" that contains the tokens for each one of the resources included. For example,
|
||||
for the above Resources layout, this is what the Resource class would expose:
|
||||
|
||||
public class Resource {
|
||||
public class drawable {
|
||||
public const int icon = 0x123;
|
||||
}
|
||||
|
||||
public class layout {
|
||||
public const int main = 0x456;
|
||||
}
|
||||
|
||||
public class strings {
|
||||
public const int first_string = 0xabc;
|
||||
public const int second_string = 0xbcd;
|
||||
}
|
||||
}
|
||||
|
||||
You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
|
||||
to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
|
||||
string in the dictionary file values/strings.xml.
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/launcher_background" />
|
||||
<foreground android:drawable="@mipmap/launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/launcher_background" />
|
||||
<foreground android:drawable="@mipmap/launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="launcher_background">#FFFFFF</color>
|
||||
<color name="colorPrimary">#3F51B5</color>
|
||||
<color name="colorPrimaryDark">#303F9F</color>
|
||||
<color name="colorAccent">#FF4081</color>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<resources>
|
||||
|
||||
<style name="MainTheme" parent="MainTheme.Base">
|
||||
<!-- As of Xamarin.Forms 4.6 the theme has moved into the Forms binary -->
|
||||
<!-- If you want to override anything you can do that here. -->
|
||||
<!-- Underneath are a couple of entries to get you started. -->
|
||||
|
||||
<!-- Set theme colors from https://aka.ms/material-colors -->
|
||||
<!-- colorPrimary is used for the default action bar background -->
|
||||
<!--<item name="colorPrimary">#2196F3</item>-->
|
||||
<!-- colorPrimaryDark is used for the status bar -->
|
||||
<!--<item name="colorPrimaryDark">#1976D2</item>-->
|
||||
<!-- colorAccent is used as the default value for colorControlActivated
|
||||
which is used to tint widgets -->
|
||||
<!--<item name="colorAccent">#FF4081</item>-->
|
||||
</style>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
using Foundation;
|
||||
using UIKit;
|
||||
|
||||
namespace Microsoft.ML.OnnxRuntime.InferenceSample.Forms.iOS
|
||||
{
|
||||
// The UIApplicationDelegate for the application. This class is responsible for launching the
|
||||
// User Interface of the application, as well as listening (and optionally responding) to
|
||||
// application events from iOS.
|
||||
[Register("AppDelegate")]
|
||||
public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
|
||||
{
|
||||
//
|
||||
// This method is invoked when the application has loaded and is ready to run. In this
|
||||
// method you should instantiate the window, load the UI into it and then make the window
|
||||
// visible.
|
||||
//
|
||||
// You have 17 seconds to return from this method, or iOS will terminate your application.
|
||||
//
|
||||
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
|
||||
{
|
||||
global::Xamarin.Forms.Forms.Init();
|
||||
|
||||
#if !__NATIVE_DEPENDENCIES_EXIST__
|
||||
throw new System.Exception(
|
||||
"The requisite onnxruntime.framework file(s) were not found. " +
|
||||
"You must build the native iOS components before running this sample");
|
||||
#else
|
||||
// Register default session options configuration.
|
||||
SessionOptionsContainer.Register((sessionOptions) => { sessionOptions.LogId = "Ort"; });
|
||||
|
||||
// Register a named session options configuration that enables the CoreML EP
|
||||
SessionOptionsContainer.Register("ort_with_npu", (sessionOptions) => {
|
||||
sessionOptions.AppendExecutionProvider_CoreML(CoreMLFlags.COREML_FLAG_ONLY_ENABLE_DEVICE_WITH_ANE);
|
||||
options.LogId = "Ort+CoreML";
|
||||
});
|
||||
LoadApplication(new App());
|
||||
#endif
|
||||
|
||||
#pragma warning disable CS0162 // Unreachable code detected
|
||||
return base.FinishedLaunching(app, options);
|
||||
#pragma warning restore CS0162 // Unreachable code detected
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
{
|
||||
"images": [
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "20x20",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon40.png"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"size": "20x20",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon60.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "29x29",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon58.png"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"size": "29x29",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon87.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "40x40",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon80.png"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"size": "40x40",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon120.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "60x60",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon120.png"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"size": "60x60",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon180.png"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"size": "20x20",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon20.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "20x20",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon40.png"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"size": "29x29",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon29.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "29x29",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon58.png"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"size": "40x40",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon40.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "40x40",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon80.png"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"size": "76x76",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon76.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "76x76",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon152.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "83.5x83.5",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon167.png"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"size": "1024x1024",
|
||||
"idiom": "ios-marketing",
|
||||
"filename": "Icon1024.png"
|
||||
}
|
||||
],
|
||||
"properties": {},
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "xcode"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 845 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>11.0</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Microsoft.ML.OnnxRuntime.InferenceSample.Forms</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.Microsoft.OnnxRuntime-InferenceSample-Forms</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Microsoft.ML.OnnxRuntime.InferenceSample.Forms</string>
|
||||
<key>XSAppIconAssets</key>
|
||||
<string>Assets.xcassets/AppIcon.appiconset</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
using UIKit;
|
||||
|
||||
namespace Microsoft.ML.OnnxRuntime.InferenceSample.Forms.iOS
|
||||
{
|
||||
public class Application
|
||||
{
|
||||
// This is the main entry point of the application.
|
||||
static void Main(string[] args)
|
||||
{
|
||||
// if you want to use a different Application Delegate class from "AppDelegate"
|
||||
// you can specify it here.
|
||||
UIApplication.Main(args, null, typeof(AppDelegate));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,163 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{97B32648-1B4A-4E35-8058-B2AD7373B6E6}</ProjectGuid>
|
||||
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<TemplateGuid>{6143fdea-f3c2-4a09-aafa-6e230626515e}</TemplateGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Microsoft.ML.OnnxRuntime.InferenceSample.Forms.iOS</RootNamespace>
|
||||
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
|
||||
<AssemblyName>Microsoft.ML.OnnxRuntime.InferenceSample.Forms.iOS</AssemblyName>
|
||||
<MtouchEnableSGenConc>true</MtouchEnableSGenConc>
|
||||
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
|
||||
<ProvisioningType>automatic</ProvisioningType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AutoGenerateBindingRedirects>True</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>portable</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<MtouchArch>x86_64</MtouchArch>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<MtouchDebug>true</MtouchDebug>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<MtouchArch>x86_64</MtouchArch>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>portable</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\iPhone\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<MtouchArch>ARM64</MtouchArch>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<MtouchDebug>true</MtouchDebug>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<MtouchInterpreter>-all</MtouchInterpreter>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhone\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<MtouchArch>ARM64</MtouchArch>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<MtouchLink>SdkOnly</MtouchLink>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OnnxNativeFrameworkPathPhone>..\..\..\..\build\iOS\iphoneos\Release\Release-iphoneos\onnxruntime.framework</OnnxNativeFrameworkPathPhone>
|
||||
<OnnxNativeFrameworkPathSimulator>..\..\..\..\build\iOS\iphonesimulator\Release\Release-iphonesimulator\onnxruntime.framework</OnnxNativeFrameworkPathSimulator>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)' == 'iPhoneSimulator' AND Exists('$(OnnxNativeFrameworkPathSimulator)')) OR ('$(Platform)' == 'iPhone' AND Exists('$(OnnxNativeFrameworkPathPhone)'))">
|
||||
<DefineConstants>__NATIVE_DEPENDENCIES_EXIST__</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="AppDelegate.cs" />
|
||||
<None Include="Entitlements.plist" />
|
||||
<None Include="Info.plist" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<InterfaceDefinition Include="Resources\LaunchScreen.storyboard" />
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon1024.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon180.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon167.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon152.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon120.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon87.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon80.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon76.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon60.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon58.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon40.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon29.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon20.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="Xamarin.iOS" />
|
||||
<Reference Include="System.Numerics" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2083" />
|
||||
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="('$(Platform)' == 'iPhoneSimulator' AND Exists('$(OnnxNativeFrameworkPathSimulator)')) OR ('$(Platform)' == 'iPhone' AND Exists('$(OnnxNativeFrameworkPathPhone)'))">
|
||||
<ProjectReference Include="..\Microsoft.ML.OnnxRuntime.InferenceSample.Forms\Microsoft.ML.OnnxRuntime.InferenceSample.Forms.csproj">
|
||||
<Project>{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}</Project>
|
||||
<Name>Microsoft.ML.OnnxRuntime.InferenceSample.Forms</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj">
|
||||
<Project>{584B53B3-359D-4DC2-BCD8-530B5D4685AD}</Project>
|
||||
<Name>Microsoft.ML.OnnxRuntime</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Memory" Version="4.5.3" IncludeAssets="None" />
|
||||
<NativeReference Condition=" '$(Platform)' == 'iPhoneSimulator' And Exists('$(OnnxNativeFrameworkPathSimulator)') " Include="$(OnnxNativeFrameworkPathSimulator)">
|
||||
<Kind>Framework</Kind>
|
||||
<ForceLoad>True</ForceLoad>
|
||||
<IsCxx>True</IsCxx>
|
||||
</NativeReference>
|
||||
<NativeReference Condition=" '$(Platform)' == 'iPhone' And Exists('$(OnnxNativeFrameworkPathPhone)') " Include="$(OnnxNativeFrameworkPathPhone)">
|
||||
<Kind>Framework</Kind>
|
||||
<ForceLoad>True</ForceLoad>
|
||||
<IsCxx>True</IsCxx>
|
||||
</NativeReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Microsoft.ML.OnnxRuntime.InferenceSample.Forms.iOS")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Microsoft.ML.OnnxRuntime.InferenceSample.Forms.iOS")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
After Width: | Height: | Size: 8.7 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 8.2 KiB |
|
|
@ -0,0 +1,39 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6245" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="X5k-f2-b5h">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="gAE-YM-kbH">
|
||||
<objects>
|
||||
<viewController id="X5k-f2-b5h" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Y8P-hJ-Z43"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="9ZL-r4-8FZ"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="yd7-JS-zBw">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" misplaced="YES" image="Icon-60.png" translatesAutoresizingMaskIntoConstraints="NO" id="23">
|
||||
<rect key="frame" x="270" y="270" width="60" height="60"/>
|
||||
<rect key="contentStretch" x="0.0" y="0.0" width="0.0" height="0.0"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.20392156862745098" green="0.59607843137254901" blue="0.85882352941176465" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="23" firstAttribute="centerY" secondItem="yd7-JS-zBw" secondAttribute="centerY" priority="1" id="39"/>
|
||||
<constraint firstItem="23" firstAttribute="centerX" secondItem="yd7-JS-zBw" secondAttribute="centerX" priority="1" id="41"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="XAI-xm-WK6" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="349" y="339"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="Icon-60.png" width="180" height="180"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?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>
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
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() {}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
using Xamarin.Forms.Xaml;
|
||||
|
||||
[assembly: XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?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="Executing sample api" FontSize="Title" Padding="30,10,30,10"/>
|
||||
</StackLayout>
|
||||
|
||||
</ContentPage>
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
using System;
|
||||
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();
|
||||
|
||||
Console.WriteLine("Using API");
|
||||
inferenceSampleApi.Execute();
|
||||
Console.WriteLine("Done");
|
||||
|
||||
// demonstrate a range of usages by recreating the inference session with different session options.
|
||||
Console.WriteLine("Using API (using default platform-specific session options)");
|
||||
inferenceSampleApi.CreateInferenceSession(SessionOptionsContainer.Create());
|
||||
inferenceSampleApi.Execute();
|
||||
Console.WriteLine("Done");
|
||||
|
||||
Console.WriteLine("Using API (using named platform-specific session options)");
|
||||
inferenceSampleApi.CreateInferenceSession(SessionOptionsContainer.Create("ort_with_npu"));
|
||||
inferenceSampleApi.Execute();
|
||||
Console.WriteLine("Done");
|
||||
|
||||
Console.WriteLine(
|
||||
"Using API (using default platform-specific session options via ApplyConfiguration extension)");
|
||||
inferenceSampleApi.CreateInferenceSession(new SessionOptions().ApplyConfiguration());
|
||||
inferenceSampleApi.Execute();
|
||||
Console.WriteLine("Done");
|
||||
|
||||
Console.WriteLine(
|
||||
"Using API (using named platform-specific session options via ApplyConfiguration extension)");
|
||||
inferenceSampleApi.CreateInferenceSession(new SessionOptions().ApplyConfiguration("ort_with_npu"));
|
||||
inferenceSampleApi.Execute();
|
||||
Console.WriteLine("Done");
|
||||
}
|
||||
|
||||
private readonly InferenceSampleApi inferenceSampleApi;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<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>
|
||||
|
|
@ -1,12 +1,14 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<Platforms>AnyCPU;x86</Platforms>
|
||||
<OnnxRuntimeCsharpRoot>..\..</OnnxRuntimeCsharpRoot>
|
||||
<OnnxRuntimeCsharpRoot>$(ProjectDir)..\..\..</OnnxRuntimeCsharpRoot>
|
||||
<Configurations>Debug;Release;RelWithDebInfo</Configurations>
|
||||
<IsLinuxBuild Condition="'$(IsLinuxBuild)' == ''">false</IsLinuxBuild>
|
||||
<IsLinuxBuild Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">true</IsLinuxBuild>
|
||||
<IsWindowsBuild Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">true</IsWindowsBuild>
|
||||
<IsMacOSBuild Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">true</IsMacOSBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(IsLinuxBuild)'=='true'">
|
||||
|
|
@ -15,55 +17,58 @@
|
|||
<NativeBuildOutputDir>$(OnnxRuntimeBuildDirectory)\$(Configuration)</NativeBuildOutputDir>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(IsLinuxBuild)'=='false'">
|
||||
<PropertyGroup Condition="'$(IsWindowsBuild)'=='true'">
|
||||
<!--internal build related properties for Windows -->
|
||||
<OnnxRuntimeBuildDirectory Condition="'$(OnnxRuntimeBuildDirectory)'==''">$(OnnxRuntimeCsharpRoot)\..\build\Windows</OnnxRuntimeBuildDirectory>
|
||||
<NativeBuildOutputDir>$(OnnxRuntimeBuildDirectory)\$(Configuration)\$(Configuration)</NativeBuildOutputDir>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(IsMacOSBuild)'=='true'">
|
||||
<!--internal build related properties for OSX -->
|
||||
<OnnxRuntimeBuildDirectory Condition="'$(OnnxRuntimeBuildDirectory)'==''">$(OnnxRuntimeCsharpRoot)\..\build\MacOS</OnnxRuntimeBuildDirectory>
|
||||
<NativeBuildOutputDir>$(OnnxRuntimeBuildDirectory)\$(Configuration)</NativeBuildOutputDir>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="$(NativeBuildOutputDir)\libonnxruntime.so" Condition="'$(IsLinuxBuild)'=='true'">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Visible>false</Visible>
|
||||
</None>
|
||||
<None Include="$(NativeBuildOutputDir)\onnxruntime.dll" Condition="'$(IsLinuxBuild)'=='false'">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<None Include="$(NativeBuildOutputDir)\onnxruntime.dll" Condition="'$(IsWindowsBuild)'=='true'">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Visible>false</Visible>
|
||||
</None>
|
||||
<None Include="$(NativeBuildOutputDir)\onnxruntime.pdb" Condition="'$(IsLinuxBuild)'=='false'And Exists('$(NativeBuildOutputDir)\onnxruntime.pdb')">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<None Include="$(NativeBuildOutputDir)\libonnxruntime.dylib" Condition="'$(IsMacOSBuild)'=='true'">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Visible>false</Visible>
|
||||
</None>
|
||||
<None Include="$(NativeBuildOutputDir)\onnxruntime.pdb" Condition="'$(IsWindowsBuild)'=='true'And Exists('$(NativeBuildOutputDir)\onnxruntime.pdb')">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Visible>false</Visible>
|
||||
</None>
|
||||
<None Include="$(NativeBuildOutputDir)\dnnl.dll" Condition="Exists('$(NativeBuildOutputDir)\dnnl.dll')">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Visible>false</Visible>
|
||||
</None>
|
||||
<None Include="$(NativeBuildOutputDir)\libdnnl.so.1" Condition="Exists('$(NativeBuildOutputDir)\libdnnl.so.1')">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Visible>false</Visible>
|
||||
</None>
|
||||
<None Include="$(NativeBuildOutputDir)\mklml.dll" Condition="Exists('$(NativeBuildOutputDir)\mklml.dll')">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Visible>false</Visible>
|
||||
</None>
|
||||
<None Include="$(NativeBuildOutputDir)\libmklml_intel.so" Condition="Exists('$(NativeBuildOutputDir)\libmklml_intel.so')">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Visible>false</Visible>
|
||||
</None>
|
||||
<None Include="$(NativeBuildOutputDir)\libmklml_gnu.so" Condition="Exists('$(NativeBuildOutputDir)\libmklml_gnu.so')">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<Visible>false</Visible>
|
||||
</None>
|
||||
<None Include="$(OnnxRuntimeCSharpRoot)\testdata\*">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
<Visible>false</Visible>
|
||||
</None>
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="$(OnnxRuntimeCSharpRoot)\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj" />
|
||||
<ProjectReference Include="..\Microsoft.ML.OnnxRuntime.InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using Microsoft.ML.OnnxRuntime.InferenceSample;
|
||||
|
||||
namespace CSharpUsage
|
||||
{
|
||||
class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Using API");
|
||||
using (var inferenceSampleApi = new InferenceSampleApi())
|
||||
{
|
||||
inferenceSampleApi.Execute();
|
||||
}
|
||||
Console.WriteLine("Done");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Microsoft.ML.OnnxRuntime.Tensors;
|
||||
|
||||
namespace Microsoft.ML.OnnxRuntime.InferenceSample
|
||||
{
|
||||
public class InferenceSampleApi : IDisposable
|
||||
{
|
||||
public InferenceSampleApi()
|
||||
{
|
||||
model = LoadModelFromEmbeddedResource("TestData.squeezenet.onnx");
|
||||
|
||||
// this is the data for only one input tensor for this model
|
||||
var inputTensor = LoadTensorFromEmbeddedResource("TestData.bench.in");
|
||||
|
||||
// create default session with default session options
|
||||
// Creating an InferenceSession and loading the model is an expensive operation, so generally you would
|
||||
// do this once. InferenceSession.Run can be called multiple times, and concurrently.
|
||||
CreateInferenceSession();
|
||||
|
||||
// setup sample input data
|
||||
inputData = new List<NamedOnnxValue>();
|
||||
var inputMeta = inferenceSession.InputMetadata;
|
||||
foreach (var name in inputMeta.Keys)
|
||||
{
|
||||
// note: DenseTensor takes a copy of the provided data
|
||||
var tensor = new DenseTensor<float>(inputTensor, inputMeta[name].Dimensions);
|
||||
inputData.Add(NamedOnnxValue.CreateFromTensor<float>(name, tensor));
|
||||
}
|
||||
}
|
||||
|
||||
public void CreateInferenceSession(SessionOptions options = null)
|
||||
{
|
||||
// Optional : Create session options and set any relevant values.
|
||||
// If an additional execution provider is needed it should be added to the SessionOptions prior to
|
||||
// creating the InferenceSession. The CPU Execution Provider is always added by default.
|
||||
if (options == null)
|
||||
{
|
||||
options = new SessionOptions { LogId = "Sample" };
|
||||
}
|
||||
|
||||
inferenceSession = new InferenceSession(model, options);
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
// Run the inference
|
||||
// 'results' is an IDisposableReadOnlyCollection<DisposableNamedOnnxValue> container
|
||||
using (var results = inferenceSession.Run(inputData))
|
||||
{
|
||||
// dump the results
|
||||
foreach (var r in results)
|
||||
{
|
||||
Console.WriteLine("Output for {0}", r.Name);
|
||||
Console.WriteLine(r.AsTensor<float>().GetArrayString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && inferenceSession != null)
|
||||
{
|
||||
inferenceSession.Dispose();
|
||||
inferenceSession = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
static float[] LoadTensorFromEmbeddedResource(string path)
|
||||
{
|
||||
var tensorData = new List<float>();
|
||||
var assembly = typeof(InferenceSampleApi).Assembly;
|
||||
|
||||
using (var inputFile =
|
||||
new StreamReader(assembly.GetManifestResourceStream($"{assembly.GetName().Name}.{path}")))
|
||||
{
|
||||
inputFile.ReadLine(); // skip the input name
|
||||
string[] dataStr = inputFile.ReadLine().Split(new char[] { ',', '[', ']' },
|
||||
StringSplitOptions.RemoveEmptyEntries);
|
||||
for (int i = 0; i < dataStr.Length; i++)
|
||||
{
|
||||
tensorData.Add(Single.Parse(dataStr[i]));
|
||||
}
|
||||
}
|
||||
|
||||
return tensorData.ToArray();
|
||||
}
|
||||
|
||||
static byte[] LoadModelFromEmbeddedResource(string path)
|
||||
{
|
||||
var assembly = typeof(InferenceSampleApi).Assembly;
|
||||
byte[] model = null;
|
||||
|
||||
using (Stream stream = assembly.GetManifestResourceStream($"{assembly.GetName().Name}.{path}"))
|
||||
{
|
||||
using (MemoryStream memoryStream = new MemoryStream())
|
||||
{
|
||||
stream.CopyTo(memoryStream);
|
||||
model = memoryStream.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
private readonly byte[] model;
|
||||
private readonly List<NamedOnnxValue> inputData;
|
||||
private InferenceSession inferenceSession;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<AutoGenerateBindingRedirects>True</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.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>
|
||||
</Project>
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.7.0" />
|
||||
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.9.0" />
|
||||
<PackageReference Include="Sixlabors.ImageSharp" Version="1.0.3" />
|
||||
<PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta11" />
|
||||
</ItemGroup>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.810.9
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.OnnxRuntime.FasterRcnnSample", "Microsoft.ML.OnnxRuntime.FasterRcnnSample.csproj", "{FE61EF04-8640-4BBC-B4F4-C2F1B83DC00A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{FE61EF04-8640-4BBC-B4F4-C2F1B83DC00A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FE61EF04-8640-4BBC-B4F4-C2F1B83DC00A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FE61EF04-8640-4BBC-B4F4-C2F1B83DC00A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FE61EF04-8640-4BBC-B4F4-C2F1B83DC00A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {17ED443E-EA35-4B00-82C8-9950BC5F653F}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using Microsoft.ML.OnnxRuntime;
|
||||
using Microsoft.ML.OnnxRuntime.Tensors;
|
||||
|
||||
namespace CSharpUsage
|
||||
{
|
||||
class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Using API");
|
||||
UseApi();
|
||||
Console.WriteLine("Done");
|
||||
}
|
||||
|
||||
|
||||
static void UseApi()
|
||||
{
|
||||
string modelPath = Directory.GetCurrentDirectory() + @"\squeezenet.onnx";
|
||||
|
||||
// Optional : Create session options and set the graph optimization level for the session
|
||||
SessionOptions options = new SessionOptions();
|
||||
options.GraphOptimizationLevel = GraphOptimizationLevel.ORT_ENABLE_EXTENDED;
|
||||
|
||||
using (var session = new InferenceSession(modelPath, options))
|
||||
{
|
||||
var inputMeta = session.InputMetadata;
|
||||
var container = new List<NamedOnnxValue>();
|
||||
|
||||
float[] inputData = LoadTensorFromFile(@"bench.in"); // this is the data for only one input tensor for this model
|
||||
|
||||
foreach (var name in inputMeta.Keys)
|
||||
{
|
||||
var tensor = new DenseTensor<float>(inputData, inputMeta[name].Dimensions);
|
||||
container.Add(NamedOnnxValue.CreateFromTensor<float>(name, tensor));
|
||||
}
|
||||
|
||||
// Run the inference
|
||||
using (var results = session.Run(container)) // results is an IDisposableReadOnlyCollection<DisposableNamedOnnxValue> container
|
||||
{
|
||||
// dump the results
|
||||
foreach (var r in results)
|
||||
{
|
||||
Console.WriteLine("Output for {0}", r.Name);
|
||||
Console.WriteLine(r.AsTensor<float>().GetArrayString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static float[] LoadTensorFromFile(string filename)
|
||||
{
|
||||
var tensorData = new List<float>();
|
||||
|
||||
// read data from file
|
||||
using (var inputFile = new System.IO.StreamReader(filename))
|
||||
{
|
||||
inputFile.ReadLine(); //skip the input name
|
||||
string[] dataStr = inputFile.ReadLine().Split(new char[] { ',', '[', ']' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
for (int i = 0; i < dataStr.Length; i++)
|
||||
{
|
||||
tensorData.Add(Single.Parse(dataStr[i]));
|
||||
}
|
||||
}
|
||||
|
||||
return tensorData.ToArray();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.7.0" />
|
||||
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.9.0" />
|
||||
<PackageReference Include="Sixlabors.ImageSharp" Version="1.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.810.9
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.OnnxRuntime.ResNet50v2Sample", "Microsoft.ML.OnnxRuntime.ResNet50v2Sample.csproj", "{6D2E6920-691F-4CDB-970F-324D8743BF8A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{6D2E6920-691F-4CDB-970F-324D8743BF8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6D2E6920-691F-4CDB-970F-324D8743BF8A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6D2E6920-691F-4CDB-970F-324D8743BF8A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6D2E6920-691F-4CDB-970F-324D8743BF8A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {B0A0513C-D336-4B4A-B22B-13429F23CA44}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
Any raw assets you want to be deployed with your application can be placed in
|
||||
this directory (and child directories) and given a Build Action of "AndroidAsset".
|
||||
|
||||
These files will be deployed with your package and will be accessible using Android's
|
||||
AssetManager, like this:
|
||||
|
||||
public class ReadAsset : Activity
|
||||
{
|
||||
protected override void OnCreate (Bundle bundle)
|
||||
{
|
||||
base.OnCreate (bundle);
|
||||
|
||||
InputStream input = Assets.Open ("my_asset.txt");
|
||||
}
|
||||
}
|
||||
|
||||
Additionally, some Android functions will automatically load asset files:
|
||||
|
||||
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
|
||||
|
|
@ -0,0 +1,118 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{1EBA64F4-EDCD-432F-83CB-C55FDA6CC051}</ProjectGuid>
|
||||
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<TemplateGuid>{c9e5eea5-ca05-42a1-839b-61506e0a37df}</TemplateGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>FasterRcnnSample.Forms.Droid</RootNamespace>
|
||||
<AssemblyName>FasterRcnnSample.Forms.Android</AssemblyName>
|
||||
<Deterministic>True</Deterministic>
|
||||
<AndroidApplication>True</AndroidApplication>
|
||||
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
|
||||
<AndroidResgenClass>Resource</AndroidResgenClass>
|
||||
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
|
||||
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
|
||||
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
|
||||
<TargetFrameworkVersion>v11.0</TargetFrameworkVersion>
|
||||
<AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>
|
||||
<AndroidUseAapt2>true</AndroidUseAapt2>
|
||||
<AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>portable</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AndroidLinkMode>None</AndroidLinkMode>
|
||||
<MandroidI18n />
|
||||
<BundleAssemblies>false</BundleAssemblies>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>portable</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AndroidManagedSymbols>true</AndroidManagedSymbols>
|
||||
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
|
||||
<AndroidLinkMode>Full</AndroidLinkMode>
|
||||
<BundleAssemblies>true</BundleAssemblies>
|
||||
<AotAssemblies>true</AotAssemblies>
|
||||
<AndroidEnableProfiledAot>true</AndroidEnableProfiledAot>
|
||||
<EnableLLVM>true</EnableLLVM>
|
||||
<AndroidLinkTool>r8</AndroidLinkTool>
|
||||
<AndroidSupportedAbis>arm64-v8a;armeabi-v7a;x86</AndroidSupportedAbis>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Mono.Android" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2125" />
|
||||
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
|
||||
<PackageReference Include="Microsoft.ML.OnnxRuntime">
|
||||
<!-- TODO: Update to use official package once Xamarin support is added to it -->
|
||||
<Version>1.10.0-dev</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="MainActivity.cs" />
|
||||
<Compile Include="Resources\Resource.designer.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\AboutResources.txt" />
|
||||
<None Include="Assets\AboutAssets.txt" />
|
||||
<None Include="Properties\AndroidManifest.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidResource Include="Resources\values\styles.xml" />
|
||||
<AndroidResource Include="Resources\values\colors.xml" />
|
||||
<AndroidResource Include="Resources\mipmap-anydpi-v26\icon.xml" />
|
||||
<AndroidResource Include="Resources\mipmap-anydpi-v26\icon_round.xml" />
|
||||
<AndroidResource Include="Resources\mipmap-hdpi\icon.png" />
|
||||
<AndroidResource Include="Resources\mipmap-hdpi\launcher_foreground.png" />
|
||||
<AndroidResource Include="Resources\mipmap-mdpi\icon.png" />
|
||||
<AndroidResource Include="Resources\mipmap-mdpi\launcher_foreground.png" />
|
||||
<AndroidResource Include="Resources\mipmap-xhdpi\icon.png" />
|
||||
<AndroidResource Include="Resources\mipmap-xhdpi\launcher_foreground.png" />
|
||||
<AndroidResource Include="Resources\mipmap-xxhdpi\icon.png" />
|
||||
<AndroidResource Include="Resources\mipmap-xxhdpi\launcher_foreground.png" />
|
||||
<AndroidResource Include="Resources\mipmap-xxxhdpi\icon.png" />
|
||||
<AndroidResource Include="Resources\mipmap-xxxhdpi\launcher_foreground.png" />
|
||||
<AndroidResource Include="Resources\xml\file_paths.xml">
|
||||
<SubType>
|
||||
</SubType>
|
||||
<Generator>
|
||||
</Generator>
|
||||
</AndroidResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Resources\drawable\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\FasterRcnnSample.Forms\FasterRcnnSample.Forms.csproj">
|
||||
<Project>{51D1A8FB-ADFF-43DE-8215-DB5E86DA4870}</Project>
|
||||
<Name>FasterRcnnSample.Forms</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\FasterRcnnSample\FasterRcnnSample.csproj">
|
||||
<Project>{A15403C6-B715-4FF4-AAE5-702A0E1A284D}</Project>
|
||||
<Name>FasterRcnnSample</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
using Android.App;
|
||||
using Android.Content.PM;
|
||||
using Android.Runtime;
|
||||
using Android.OS;
|
||||
using Microsoft.ML.OnnxRuntime;
|
||||
|
||||
namespace FasterRcnnSample.Forms.Droid
|
||||
{
|
||||
[Activity(Label = "FasterRcnnSample.Forms", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true,
|
||||
ScreenOrientation = ScreenOrientation.Portrait,
|
||||
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode |
|
||||
ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize)]
|
||||
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
|
||||
{
|
||||
protected override void OnCreate(Bundle savedInstanceState)
|
||||
{
|
||||
base.OnCreate(savedInstanceState);
|
||||
|
||||
Xamarin.Essentials.Platform.Init(this, savedInstanceState);
|
||||
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
|
||||
|
||||
SessionOptionsContainer.Register(
|
||||
nameof(SessionOptionMode.Platform),
|
||||
(sessionOptions) => sessionOptions.AppendExecutionProvider_Nnapi(NnapiFlags.NNAPI_FLAG_USE_NONE));
|
||||
|
||||
LoadApplication(new App());
|
||||
}
|
||||
|
||||
public override void OnRequestPermissionsResult(int requestCode, string[] permissions,
|
||||
[GeneratedEnum] Permission[] grantResults)
|
||||
{
|
||||
Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
|
||||
base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.microsoft.onnxruntime_fasterrcnnsample_forms">
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30" />
|
||||
<application android:label="FasterRcnnSample.Forms.Android" android:theme="@style/MainTheme">
|
||||
<provider android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.fileprovider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_paths">
|
||||
</meta-data>
|
||||
</provider>
|
||||
</application>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
</manifest>
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using Android.App;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("FasterRcnnSample.Forms.Android")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("FasterRcnnSample.Forms.Android")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
||||
// Add some common permissions, these can be removed if not needed
|
||||
[assembly: UsesPermission(Android.Manifest.Permission.Internet)]
|
||||
[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
|
||||
|
||||
// Needed for Picking photo/video
|
||||
[assembly: UsesPermission(Android.Manifest.Permission.ReadExternalStorage)]
|
||||
|
||||
// Needed for Taking photo/video
|
||||
[assembly: UsesPermission(Android.Manifest.Permission.Camera)]
|
||||
|
||||
// Add these properties if you would like to filter out devices that do not have cameras, or set to false to make them optional
|
||||
[assembly: UsesFeature("android.hardware.camera", Required = true)]
|
||||
[assembly: UsesFeature("android.hardware.camera.autofocus", Required = true)]
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
Images, layout descriptions, binary blobs and string dictionaries can be included
|
||||
in your application as resource files. Various Android APIs are designed to
|
||||
operate on the resource IDs instead of dealing with images, strings or binary blobs
|
||||
directly.
|
||||
|
||||
For example, a sample Android app that contains a user interface layout (main.xml),
|
||||
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
|
||||
would keep its resources in the "Resources" directory of the application:
|
||||
|
||||
Resources/
|
||||
drawable-hdpi/
|
||||
icon.png
|
||||
|
||||
drawable-ldpi/
|
||||
icon.png
|
||||
|
||||
drawable-mdpi/
|
||||
icon.png
|
||||
|
||||
layout/
|
||||
main.xml
|
||||
|
||||
values/
|
||||
strings.xml
|
||||
|
||||
In order to get the build system to recognize Android resources, set the build action to
|
||||
"AndroidResource". The native Android APIs do not operate directly with filenames, but
|
||||
instead operate on resource IDs. When you compile an Android application that uses resources,
|
||||
the build system will package the resources for distribution and generate a class called
|
||||
"Resource" that contains the tokens for each one of the resources included. For example,
|
||||
for the above Resources layout, this is what the Resource class would expose:
|
||||
|
||||
public class Resource {
|
||||
public class drawable {
|
||||
public const int icon = 0x123;
|
||||
}
|
||||
|
||||
public class layout {
|
||||
public const int main = 0x456;
|
||||
}
|
||||
|
||||
public class strings {
|
||||
public const int first_string = 0xabc;
|
||||
public const int second_string = 0xbcd;
|
||||
}
|
||||
}
|
||||
|
||||
You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
|
||||
to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
|
||||
string in the dictionary file values/strings.xml.
|
||||
29881
csharp/sample/Xamarin/FasterRcnnSample/FasterRcnnSample.Forms.Android/Resources/Resource.designer.cs
generated
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/launcher_background" />
|
||||
<foreground android:drawable="@mipmap/launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/launcher_background" />
|
||||
<foreground android:drawable="@mipmap/launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="launcher_background">#FFFFFF</color>
|
||||
<color name="colorPrimary">#3F51B5</color>
|
||||
<color name="colorPrimaryDark">#303F9F</color>
|
||||
<color name="colorAccent">#FF4081</color>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<resources>
|
||||
|
||||
<style name="MainTheme" parent="MainTheme.Base">
|
||||
<!-- As of Xamarin.Forms 4.6 the theme has moved into the Forms binary -->
|
||||
<!-- If you want to override anything you can do that here. -->
|
||||
<!-- Underneath are a couple of entries to get you started. -->
|
||||
|
||||
<!-- Set theme colors from https://aka.ms/material-colors -->
|
||||
<!-- colorPrimary is used for the default action bar background -->
|
||||
<!--<item name="colorPrimary">#2196F3</item>-->
|
||||
<!-- colorPrimaryDark is used for the status bar -->
|
||||
<!--<item name="colorPrimaryDark">#1976D2</item>-->
|
||||
<!-- colorAccent is used as the default value for colorControlActivated
|
||||
which is used to tint widgets -->
|
||||
<!--<item name="colorAccent">#FF4081</item>-->
|
||||
</style>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<paths xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<external-files-path name="my_images" path="Pictures" />
|
||||
<external-files-path name="my_movies" path="Movies" />
|
||||
</paths>
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
using Foundation;
|
||||
using Microsoft.ML.OnnxRuntime;
|
||||
using UIKit;
|
||||
|
||||
namespace FasterRcnnSample.Forms.iOS
|
||||
{
|
||||
// The UIApplicationDelegate for the application. This class is responsible for launching the
|
||||
// User Interface of the application, as well as listening (and optionally responding) to
|
||||
// application events from iOS.
|
||||
[Register("AppDelegate")]
|
||||
public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
|
||||
{
|
||||
//
|
||||
// This method is invoked when the application has loaded and is ready to run. In this
|
||||
// method you should instantiate the window, load the UI into it and then make the window
|
||||
// visible.
|
||||
//
|
||||
// You have 17 seconds to return from this method, or iOS will terminate your application.
|
||||
//
|
||||
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
|
||||
{
|
||||
SessionOptionsContainer.Register(nameof(SessionOptionMode.Platform), (sessionOptions) => sessionOptions.AppendExecutionProvider_CoreML(CoreMLFlags.COREML_FLAG_ONLY_ENABLE_DEVICE_WITH_ANE));
|
||||
|
||||
global::Xamarin.Forms.Forms.Init();
|
||||
LoadApplication(new App());
|
||||
|
||||
return base.FinishedLaunching(app, options);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
{
|
||||
"images": [
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "20x20",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon40.png"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"size": "20x20",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon60.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "29x29",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon58.png"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"size": "29x29",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon87.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "40x40",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon80.png"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"size": "40x40",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon120.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "60x60",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon120.png"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"size": "60x60",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon180.png"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"size": "20x20",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon20.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "20x20",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon40.png"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"size": "29x29",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon29.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "29x29",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon58.png"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"size": "40x40",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon40.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "40x40",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon80.png"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"size": "76x76",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon76.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "76x76",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon152.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "83.5x83.5",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon167.png"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"size": "1024x1024",
|
||||
"idiom": "ios-marketing",
|
||||
"filename": "Icon1024.png"
|
||||
}
|
||||
],
|
||||
"properties": {},
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "xcode"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 845 B |
|
After Width: | Height: | Size: 1.1 KiB |