• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Using TensorFlow Lite in Xamarin.Android

I am attempting to use the Custom Vision feature of Microsoft Azure by exporting the data for TensorFlow Lite. I am able to use Custom Vision & export the labels.txt & model.tflite files successfully with no problem, my problem is figuring out how to write the app & use TensorFlow Lite in Xamarin.Android (NOT Xamarin.Forms) & C# (NOT Java). I found the following page:

Image Classification with TensorFlow Lite & Azure Services - Xamarin Blog (microsoft.com)

However, this page seems to use Xamarin.Forms, and I am obviously missing some of the steps when attempting to convert it to Xamarin.Android. I have added the following additional NuGet packages (if there are others please let me know):

Microsoft.Azure.CognitiveServices.Vision.CustomVision.Prediction
Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training
Xamarin.TensorFlow.Lite

I have written many Xamarin.Android apps before, so I am familiar with most stuff usually involved in a Xamarin.Android app using C#. Can anybody help me or suggest a site with a complete example or tutorial (including required NuGet packages required for TensorFlow Lite)? (NOTE: I am using Visual Studio 2022, NOT Android Studio) Thanks!
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones