Comments (11)
@khanhlvg do you have any idea why the MetalDelegate cannot be found?
from tflite-support.
@GeneralJing what was the error that you saw?
from tflite-support.
delegates = [MetalDelegate()] this line, ‘MetalDelegate' cannot find. MetalDelegate()is undefined.
from tflite-support.
@GeneralJing as per the tflite documentation:
"From 2.4.0 version and latest nightly releases, by default GPU and Core ML delegates are excluded from the pod to reduce the binary size. You can include them by specifying subspec:
pod 'TensorFlowLiteSwift', '~> 0.0.1-nightly', :subspecs => ['CoreML', 'Metal']
"
So you'll have to add 'Metal' to your podfile and only then will it be available.
from tflite-support.
Thanks. I will try that later. Whatever result i have, i will leave a message here.
from tflite-support.
I tried it and it worked. Thank you. But the time is very long on iphone 6s.
Preprocessing:197ms
Model inference:56ms
Postprocessing:1591ms
Visualization:8ms.
How did you solve the time-consuming problem of tflite in practice?
from tflite-support.
Yeah I found it to be slow too. Didn't think it could be an issue with tflite implementation. I thought it must be related to model's size or something. I moved on from the model and am now looking for other alternatives.
from tflite-support.
Ok, thanks for your help.
from tflite-support.
Hey @GeneralJing, just found this note in the tflite sample codes:
// Note: You may find postprocessing very slow if you run the sample app with Debug build.
// You will see significant speed up if you rerun using Release build, or change
// Optimization Level in the project's Build Settings to the same value with Release build.
Also checkout the following:
https://blog.tensorflow.org/2020/07/accelerating-tensorflow-lite-xnnpack-integration.html
from tflite-support.
I only tested the relevant time on my mobile phone and did not notice the relevant notes. Thank you for your carefulness and reminder. The added link is very valuable, and I will study it carefully. If I encounter other related problems later, can I communicate with you by email?
from tflite-support.
Haha yeah, same with me. Also, one more thing I noticed was that the post-processing codes were not optimised (atleast for my use-case) and do not utilise the gpu/multi-threading either. So that is also something you can look into if you want improved performance.
Yeah sure, feel free to reach out.
from tflite-support.
Related Issues (20)
- I want to ask if TFLImage Searcher is supported on iOS and if so, where can I get a sample?
- Getting "Cannot copy to a TensorFlowLite tensor (serving_default_input_1:0) with 63984 bytes from a Java Buffer with 64000 bytes" error while attempting to pass the Input and Output TensorAudio Buffer to TFLite Interpreter for inference HOT 1
- ImportError from image_utils HOT 4
- Could you please provide a aarch64 tflite-support wheel for python 3.10 HOT 2
- YOLOv8 `tensorflow>=2.14.0` ImportError: generic_type: cannot initialize type "StatusCode": an object with that name is already defined HOT 6
- How to read .wav in adroid jni?
- `tf.lite`, or `tflite_tuntime.interpreter as `tflite`?
- TensorFlowLiteTaskAudio for iOS: How to save audio and then play it
- ERROR: Could not find a version that satisfies the requirement tflite-support==0.4.4 HOT 4
- Installation Error: Unable to find installation candidates for tflite-support (0.4.4) HOT 1
- Build TensorFlowLiteTaskVision_framework failed HOT 2
- How to handle dynamic output tensors with `tflite.runForMultipleInputsOutputs`
- iOS Error duplicate symbols HOT 2
- 0.4.2 and 0.4.3 versions of the pod are crashing on app launch on iOS 12.5.7
- Quantization with tflite : Unexpected input data type. Actual: (tensor(float)) , expected: (tensor(int8))
- How to install tflite_support in pip by source compiling HOT 3
- Possibility of channel-by-channel image normalization when adding metadata
- Document TFLite Support vs MediaPipe HOT 2
- No 0.4.4 PyPi package available for Arm/Python 3.11 HOT 1
- Model Loading Error for Image Embedder in Android
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 tflite-support.