Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Failed to create TFLite interpreter from model #65

Open
Swikriti0998 opened this issue May 13, 2024 · 3 comments
Open

Error: Failed to create TFLite interpreter from model #65

Swikriti0998 opened this issue May 13, 2024 · 3 comments

Comments

@Swikriti0998
Copy link

I am trying to load the tensor flow model but its giving me the below error, I have my pose-detection.tflite in assets/pose-detection

error: Failed to load Tensorflow Model 3! [Error: Failed to create TFLite interpreter from model "http://192.168.1.10:8081/assets/?unstable_path=.%2Fassets%2Fpose-detection/pose-detection.tflite?platform=ios&hash=361a28992b649751d6d66cd8cfb1e2a6"!]

I tried both true and false inside the app.config.ts file.

'react-native-fast-tflite',
{
enableCoreMLDelegate: false/true,
}

@vmelentev
Copy link

vmelentev commented May 13, 2024

I do believe you have to edit your metro.config.js file to configure your project to be able to interoperate .tflite files.

Try adding this code to metro.config.js:


config.resolver.assetExts.push(
    'tflite'
);

@Swikriti0998
Copy link
Author

Already edited my metro config and it's reading the tflite file otherwise it would give below error.
error - Unable to resolve "@assets/pose-detection/pose-detection.tflite" from "src/screens/home/index.tsx"

However while loading the application I am getting the below error
error - {"error": [Error: CoreML Delegate is not enabled! Set $EnableCoreMLDelegate to true in Podfile and rebuild.], "model": undefined, "state": "error"}

@mrousavy
Copy link
Owner

did you rebuild pods & rebuild your app after enabling the core ml delegate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants