Comments (8)
This solution fixed "Failed to load model" when using iOS device.
- am15h/tflite_flutter_plugin#100 (comment)
- https://www.tensorflow.org/lite/guide/build_ios#build_tensorflowlitec_dynamic_framework_recommended
Steps I've done (Make sure you already install brew)
Step 1 :
- Install TensorFlow and here is the link to teach how to install https://www.geeksforgeeks.org/install-tensorflow-on-macos/ (Follow step 1 until step 7)
Step 2 :
- Open your terminal to Install Bazel by typing
$brew Install bazel
(I'm using version 4.2.2).
Step 3:
- Clone this
git clone https://github.com/tensorflow/tensorflow
project and place it into this folderpythonenv
(Created at step 1).
Step 4 :
- Open terminal cd to the root TensorFlow (Step 3 clone TensorFlow Folder) and type
$./configure
to run the script. Press enter to use default answer and answerYes
when the script asks if you wish to build TensorFlow with iOS support.
Step 5 :
- Open terminal and type
bazel build --config=ios_arm64 -c opt //tensorflow/lite/ios:TensorFlowLiteC_framework
&bazel build --config=ios_arm64 -c opt //tensorflow/lite/ios:TensorFlowLiteCMetal_framework
. - It will create 2 zip files which are
TensorFlowLiteCMetal_framework.zip
&TensorFlowLiteC_framework.zip
inside this locationuser/pythonenv/tensorflow/bazel-bin
.
Step 6 :
- Unzip those 2 zip files and place it in your flutter package > iOS folder
user/flutter/.pub-cache/hosted/pub.dartlang.org/tflite_flutter-0.9.0/ios
(Make sure you use Command+Shift+Dot to show invisible folder).
Step 7 :
- After placed your 2 folders inside this iOS folder and then you need to edit
tflite_flutter.podspec
(This file is in the same location)
Step 8 :
- Line 20 replace with
s.ios.vendored_frameworks = 'TensorFlowLiteC.framework', 'TensorFlowLiteCMetal.framework
- Line 27 replace with
s.xcconfig = { 'OTHER_LDFLAGS' => '-framework TensorFlowLiteC -all_load -framework TensorFlowLiteCMetal -all_load' }
Step 9 :
- Go back to your project and in your terminal type
flutter clean && flutter pub get && cd ios && pod install && flutter run
from facerecognitionauth.
Do you have the .tflite file under the assets/ folder? Let me know if you still having the issue
from facerecognitionauth.
same problem here, mobilefacenet.tflite file is still there at assets folder, i have do flutter clean and pub get, but it's still won't work, and also when i try to click sign up when using method _cameraController.takePicture(), its showing error :
I/flutter (16275): NoSuchMethodError: The method 'run' was called on null.
I/flutter (16275): Receiver: null
I/flutter (16275): Tried calling: run(Instance(length:1) of '_GrowableList', Instance(length:1) of '_GrowableList')
from facerecognitionauth.
@francorobles & @dhimaspp What device are you running it on?
from facerecognitionauth.
same issue in my project
from facerecognitionauth.
same problem in my project also
from facerecognitionauth.
@MCarlomagno any solutions that u know of?
from facerecognitionauth.
Same error also, any solutions
from facerecognitionauth.
Related Issues (20)
- App throw exception, Interpreter is null HOT 1
- Hey devs if any body is stuck don't worry click on the link.
- Face detected but drawing the painter in wrong place
- CameraException when capturing picture
- How can i sign up with image from gallery, not from camera ? HOT 1
- Can we use anti spoofing by image? HOT 1
- Face not detected! HOT 1
- It will recognize any face as User 1, as long as it detected as human face
- Mobilefacenet Output Size
- State Error (BadState: No Element) HOT 1
- error Declaration of 'MLKTextRecognizedLanguage' when running on IOS
- no green square HOT 1
- Creating reusable library for just the services?
- it will log in anyone HOT 1
- When i using Android Emulator build app and it going to the splash screen and ask permission after i click the app is Lost connection to device . HOT 4
- Update Image package HOT 2
- [error] Failed to lookup symbol 'TFLGpuDelegateCreate' on IoS HOT 2
- No Face Detection
- Null check operator used on a null value while I pressed SignIn
- Camera service null issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from facerecognitionauth.