am15h / tflite_flutter_plugin

TensorFlow Lite Flutter Plugin
https://pub.dev/packages/tflite_flutter
Apache License 2.0
499 stars 352 forks source link

How to use CoreML delegate #142

Open Kypsis opened 3 years ago

Kypsis commented 3 years ago

In tflite_flutter.dart export 'src/delegates/coreml_delegate.dart'; is missing. Even if you fix that how do you actually get CoreML delegate working.

I tried what this guy did to get Metal working: https://github.com/am15h/tflite_flutter_plugin/issues/100#issuecomment-818880657 by building bazel build --config=ios_fat -c opt //tensorflow/lite/ios:TensorFlowLiteCCoreML_framework --incompatible_run_shell_command_string=false and adding extra fields for CoreML in appropriate places but inevitably you end up with symbol(s) not found for architecture arm64 error when trying to build for IOS. Fat or arm64, same result.

CaptainDario commented 1 year ago

@Kypsis I do not know if you already found a workaround, but you can just use the hosted version of TF Lite with CoreML delegate. Take a look at my fork