emgucv / emgutf

Emgu TF is a cross platform .Net wrapper for the Google Tensorflow library. Allows Tensorflow functions to be called from .NET compatible languages such as C#, VB, VC++, IronPython.

Home Page:https://www.emgu.com/wiki/index.php/Emgu_TF

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Did not work on .NET MAUI Application

artimisgroup opened this issue · comments

On a .NET MAUI app I tried the following.

using var stream = await FileSystem.OpenAppPackageFileAsync("model.tflite"); var bytes = stream.ReadAllBytes(); var flatBuffer = new Emgu.TF.Lite.FlatBufferModel(bytes);

it crashed instantiating the FlatBufferModel and I could not proceed further to use the Interpreter. There was no exception on Visual Studio that I could get hold off.

Do you have any examples for the .NET MAUI ?

commented

Does the same model works without MAUI? Based on the code you provided it doesn't seems to be related to MAUI. The flatbuffer loader seems to be unable to recognize you file.

commented

Any error messages associated with the crash?

Hi

Thank you for looking into this issue.

It is a MAUI application
<TargetFrameworks>net6.0-android;net6.0-ios</TargetFrameworks>

I was trying on net6.0-android.

I have put the following line as the first statement and it failed too. Sorry I do not have any messages associated with the crash. It just stops. Visual Studio also did not report anything. The debug mode just stopped.
TfLiteInvoke.Init();

Do I need to add any runtime? Note I am trying on an emulator.

Pixel5 - API 31

I will also try with the model from the examples that you provided that works for me on .NET Standard in a windows PC.

commented

Did you added the commercial runtime nuget package (or dlls from commercial release) for Android and iOS into your MAUI app?

No I didn't. I will try with them. Would you kindly provide me the nuget names that I should add to my MAUI app. Kindly point me to the commercial nuget package (or dlls from commercial release)

Thank you so much.

image

Kindly advise.

commented

You will have access to the commercial release nuget files once you purchased our commercial license. License can be purchased here:
https://www.emgu.com/wiki/index.php/EMGU_TF_Commercial_License_Purchase

If you would like to get an evaluation copy before making purchase. Please email us support@emgu.com