FaceRecognitionAuth icon indicating copy to clipboard operation
FaceRecognitionAuth copied to clipboard

undefined symbol: TfLiteGpuDelegateV2Create

Open francorobles opened this issue 4 years ago • 8 comments

I/flutter (12759): Failed to load model. I/flutter (12759): Invalid argument(s): Failed to lookup symbol (undefined symbol: TfLiteGpuDelegateV2Create)

francorobles avatar Feb 20 '21 12:02 francorobles

Do you have the .tflite file under the assets/ folder? Let me know if you still having the issue

MCarlomagno avatar Apr 25 '21 23:04 MCarlomagno

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')

dhimaspp avatar Apr 26 '21 06:04 dhimaspp

@francorobles & @dhimaspp What device are you running it on?

peterlazar1993 avatar May 28 '21 16:05 peterlazar1993

same issue in my project

atpmelvin avatar Jun 17 '21 06:06 atpmelvin

same problem in my project also

Ammobag avatar Jul 04 '21 07:07 Ammobag

@MCarlomagno any solutions that u know of?

Ammobag avatar Jul 04 '21 07:07 Ammobag

This solution fixed "Failed to load model" when using iOS device.

Steps I've done (Make sure you already install brew)

Step 1 :

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 folder pythonenv (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 answer Yes 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 location user/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

yenyichau avatar Jan 12 '22 07:01 yenyichau

Same error also, any solutions

FayedGouda avatar Aug 20 '23 13:08 FayedGouda