shaqian / tflite-react-native

React Native library for TensorFlow Lite
https://www.npmjs.com/package/tflite-react-native
MIT License
291 stars 106 forks source link

Unable to load tflite model in iOS. #29

Open RaviKiranMakala opened 3 years ago

RaviKiranMakala commented 3 years ago

Hi, I am trying to add this library to my project. For android given instructions are working. But for iOS i tried many ways to add library but i am getting null is not an object evaluating (TfliteReactNative.loadModel).

I tried below ways induvidually and failed to load model.

  1. Xcode -> MyProject -> ProjectFolder -> Right Click -> Add filed to "My project" -> Disabled Copy items if needed and Enabled Create groups -> Selected models folder(which contains model.tflite and label.txt files).
  2. Xcode -> MyProject -> ProjectFolder -> Right Click -> Add filed to "My project" -> Enabled Copy items if needed and enabled Create groups -> Selected models folder(which contains model.tflite and label.txt files).
  3. Tried to add Directly .tflite and .txt without models folder with above 2 steps.
  4. Drag ad dropping models folder/ files.

Where am i going wrong? Please anyone help me out.

My configurations are: macOS - 10.15.7 react-native - 0.64.2 tflite-react-native - 0.0.5

pods: TensorFlowLite (1.13.1) TfliteReactNative (0.0.4)

Thanks in advance.

lucidprojects commented 3 years ago

@RaviKiranMakala did you ever get this resolved?

I am having the same issue.

My versions are: macOS - 11.5.2 react-native - 0.65.1 tflite-react-native - 0.0.5

pods: TensorFlowLite (1.12.0) TfliteReactNative (0.0.4)

RaviKiranMakala commented 3 years ago

@RaviKiranMakala did you ever get this resolved?

I am having the same issue.

My versions are: macOS - 11.5.2 react-native - 0.65.1 tflite-react-native - 0.0.5

pods: TensorFlowLite (1.12.0) TfliteReactNative (0.0.4)

No @lucidprojects , It seems to be issue with adding the tflite files to iOS project. I tried with multiple things but failed. I moved to other project and kept this aside. Their example app is working fine for both iOS and Android. If i add any new tflite then this issue is raising.

Sorry for the late delay. If you made it worked, please share the solution. Thank you.

lucidprojects commented 3 years ago

@RaviKiranMakala Same, unfortunately I couldn’t ever find a solution and had to move on.

EddyJens commented 2 years ago

Same here