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

System.EntryPointNotFoundException when loading tflite model in xamarin.ios

mohaned-abid opened this issue · comments

@emgucv I'm trying to add a tflite model to an exsitent xamarin.ios app , I intalled emgu tflite nuget and when I try to load model into a flatbuffermodel object I get an EntryPointNotFoundException , same goes for creating an empty interpreter object

code :
FlatBufferModel x1 = new FlatBufferModel("model.tflite");
or
Interpreter x = new Interpreter();

exception for FlatBufferModel:
System.EntryPointNotFoundException: tfeFlatBufferModelBuildFromBuffer assembly: type: member:(null)
at (wrapper managed-to-native) Emgu.TF.Lite.TfLiteInvoke.tfeFlatBufferModelBuildFromBuffer(intptr,int)
at Emgu.TF.Lite.FlatBufferModel.ReadModelFromBuffer (System.Byte[] buffer) [0x00062] in <062233c016b846a3b87c0d1e20339375>:0
at Emgu.TF.Lite.FlatBufferModel..ctor (System.String filename) [0x0004c] in <062233c016b846a3b87c0d1e20339375>:0

exception for Interpreter :
{System.EntryPointNotFoundException: tfeInterpreterCreate assembly: type: member:(null)
at (wrapper managed-to-native) Emgu.TF.Lite.TfLiteInvoke.tfeInterpreterCreate()
at Emgu.TF.Lite.Interpreter..ctor () [0x00006] in <5a7ba9b0ba6349f2b548278920499c40>:0

any ideas how to solve this ?

commented

Instructions for using Emgu TF Lite in iOS can be found here:
https://www.emgu.com/wiki/index.php/Emgu_TF_Download_And_Installation#iOS

Are you using Emgu.CV.runtime.ios nuget package or the dlls from the ".zip" commercial release?

@emgucv I only installed this one : https://www.nuget.org/packages/EMGU.TF.LITE/ , I thought that I can test that the integration works with my model before bying the comercial lisence.

also why would I need "Emgu.CV.runtime.ios " I thought I would only need emgu tf lite ? do you mean "Emgu.TF.Lite.runtime.ios" ?

also about the size of the dll , what is the average range for the size in case of only arm64 support
thanks for the help

commented

You will need one of the Emgu.TF.Lite.runtime.{platform} package depends on the os your are using. Detail can be found here:
https://www.emgu.com/wiki/index.php/Emgu_TF_Download_And_Installation

The runtime nuget pacakge contains the native Tensorflow Lite binary in C/C++. The Emgu.TF.Lite nuget packages only contains the C# interface to call into those tensorflow lite functions.

commented

An yes, I mean Emgu.TF.Lite.runtime.ios package from the commercial release. (not Emgu.CV.runtime.ios)