AppoMobi.Maui.TensorFlow.Lite 1.0.1

dotnet add package AppoMobi.Maui.TensorFlow.Lite --version 1.0.1                
NuGet\Install-Package AppoMobi.Maui.TensorFlow.Lite -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AppoMobi.Maui.TensorFlow.Lite" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AppoMobi.Maui.TensorFlow.Lite --version 1.0.1                
#r "nuget: AppoMobi.Maui.TensorFlow.Lite, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AppoMobi.Maui.TensorFlow.Lite as a Cake Addin
#addin nuget:?package=AppoMobi.Maui.TensorFlow.Lite&version=1.0.1

// Install AppoMobi.Maui.TensorFlow.Lite as a Cake Tool
#tool nuget:?package=AppoMobi.Maui.TensorFlow.Lite&version=1.0.1                

AppoMobi.Maui.TensorFlow.Lite

.NET Android bindings for Google's TensorFlow Lite with GPU support

Includes:
  • TensorFlow.Lite (v2.13.0)
  • TensorFlow.Lite.Api (v2.13.0)
  • TensorFlow.Lite.Gpu (v2.13.0)
  • TensorFlow.Lite.Gpu.Api (v2.13.0)

Nuget package

AppoMobi.Maui.TensorFlow.Lite

How to use

To implement gpu acceleration as described here:

https://www.tensorflow.org/lite/android/delegates/gpu?hl=en#enable_gpu_acceleration_2


using AppoMobi.Maui.TensorFlow.Lite;
using AppoMobi.Maui.TensorFlow.Lite.GPU;

...

var options = new Interpreter.Options();

var compatList = new CompatibilityList();
if (compatList.IsDelegateSupportedOnThisDevice && useGpu)
{
    var bestOptions = compatList.BestOptionsForThisDevice;
    var gpuDelegate = new GpuDelegate(bestOptions);
    options.AddDelegate(gpuDelegate);
}

You do not need tensorflow-lite-gpu-delegate-plugin for this.

Why another bindings package?

Initially it was impossible to use BestOptionsForThisDevice with Xamarin.TensorFlow.Lite.* nugets. https://github.com/xamarin/GooglePlayServicesComponents/issues/793

Product Compatible and additional computed target framework versions.
.NET net7.0-android33.0 is compatible.  net8.0-android was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0-android33.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.