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 ?
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.
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.
Did you added the commercial runtime nuget package (or dlls from commercial release) for Android and iOS into your MAUI app?
Kindly advise.
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