flutter_tflite
flutter_tflite copied to clipboard
[!] No podspec found for `flutter_tflite` in `.symlinks/plugins/flutter_tflite/ios`
[!] No podspec found for flutter_tflite
in .symlinks/plugins/flutter_tflite/ios
I am getting this error in iOS, in android it is working perfectly. How can i resolve this
same here, looks like this project is no more...
same here
Same here. Any solution for that?
any solution? any one !!
switched to this package, works great https://pub.dev/packages/google_ml_kit
Spend the whole night, Trying to find a solution for this. But no luck :(
switched to this package, works great https://pub.dev/packages/google_ml_kit
I tried this package but had difficulties using my own .tflite file
@binemmanuel what are the difficulties?
@misterpropik
Exception: PlatformException(ImageLabelDetectorError, com.google.mlkit.common.MlKitException: Failed to initialize detector. Input tensor has type kTfLiteFloat32: it requires specifying NormalizationOptions metadata to preprocess input images., null, null)
My Code
Future<void> processImage(File file) async {
final modelPath = await getModel('assets/models/model.tflite');
final imageLabeler = ImageLabeler(
options: LocalLabelerOptions(
modelPath: modelPath,
confidenceThreshold: 0.5,
),
);
final labels = await imageLabeler.processImage(InputImage.fromFile(file));
for (final label in labels) {
print(label.label);
}
return await imageLabeler.close();
}```
@binemmanuel where is this model from (model.tflite) ?
Solution
Add this to your pubspec.yaml
tflite:
git:
url: https://github.com/shaqian/flutter_tflite.git
instead of
flutter_tflite: ^1.0.1
Solution
Add this to your pubspec.yaml
tflite: git: url: https://github.com/shaqian/flutter_tflite.git
instead of
flutter_tflite: ^1.0.1
The next step to using this for me was to sign the app (open ios/Runner.xcworkspace
, go into the runner, Signing & Capabilities, and update the Team)...
Then after that I'm getting an error Could not build the precompiled application for the device. Lexical or Preprocessor Issue (Xcode): 'TensorFlowLiteC.h' file not found
... Hmm... I've been trying a lot of different ML libraries to detect types of food... Does this fix work for anyone else? Is there something I've done wrong or haven't yet done? 🤔
Solution Add this to your pubspec.yaml
tflite: git: url: https://github.com/shaqian/flutter_tflite.git
instead of
flutter_tflite: ^1.0.1
The next step to using this for me was to sign the app (
open ios/Runner.xcworkspace
, go into the runner, Signing & Capabilities, and update the Team)... Then after that I'm getting an errorCould not build the precompiled application for the device. Lexical or Preprocessor Issue (Xcode): 'TensorFlowLiteC.h' file not found
... Hmm... I've been trying a lot of different ML libraries to detect types of food... Does this fix work for anyone else? Is there something I've done wrong or haven't yet done? 🤔
@davidd647, I got rid of the error
Could not build the precompiled application for the device. Lexical or Preprocessor Issue (Xcode): 'TensorFlowLiteC.h' file not found
by adding the following line to the Podfile (I got it from here):
target 'Runner' do
use_frameworks!
use_modular_headers!
# add this line
pod 'TensorFlowLiteC', '2.2.0'
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end
but now I run into the following errors:
-
Semantic Issue (Xcode): Use of undeclared identifier '_tflite_part_names'; did you mean '_tflite_parts_ids'?
-
Semantic Issue (Xcode): Expected method to read array element not found on object of type 'NSMutableDictionary *'
-
Semantic Issue (Xcode): Use of undeclared identifier '_tflite_pose_chain'
-
Semantic Issue (Xcode): Expected method to read array element not found on object of type 'NSMutableDictionary *'
-
Semantic Issue (Xcode): Use of undeclared identifier 'child_to_parent_edges'
-
Semantic Issue (Xcode): Use of undeclared identifier 'parent_to_child_edges'
Did anyone get this to work?