tflite_flutter_helper
tflite_flutter_helper copied to clipboard
Upgrade Image Dependency
This package is preventing me from upgrading other packages due to version dependency conflicts! Please resolve and re-release.
The camera package needs to be updated as well please.
pdf package also requires image: ^4.0.0
any updates?
Hi,
I understand the frustration caused by the version dependency conflicts. I've made some changes to the package that should help resolve this issue. You can use my version of the package by adding the following to your pubspec.yaml
:
tflite_flutter_helper:
git:
url: https://github.com/pnyompen/tflite_flutter_helper.git
ref: 43e87d4b9627539266dc20250beb35bf36320dce
Also, I've created a pull request with the changes here: https://github.com/elephantum/tflite_flutter_helper/pull/2
Please let me know if this helps!
Hi , @pnyompen ive using the same depedency as you mentioned in the comment but im getting this error on my Build please help me to resolve this
FAILURE: Build failed with an exception.
* What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
The following dependencies do not satisfy the required version:
project ':tflite_flutter_helper' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50`
```
It says here https://pub.dev/packages/tflite_flutter_helper/score This project has been discontinued?
The project is definitely discontinued. I emailed the Google contact and they said that users who need this lib should consult one of their pipeline services. (Google took this over from the original dev).
That being said, I've been trying to update this lib to work with Image 4.0, since it would be a lot more convenient and my use case does not really merit a service, or a big re-write for that matter. When the Image library moved to 4.0 a lot of breaking changes came along with it (https://pub.dev/packages/image/versions/4.0.0). It seems it would be a relatively easy matter to make some changes and get it working, but I've been running into issues. There is no migration guide from 3 > 4 for the Image library, so you have to go into the source code and look around to find what your specific function calls now need, in a lot of cases. Some functions have been combined, some changed. You access image data and manipulate it differently now-- sometimes that poses challenges for this (tf helper) library, especially if some of the operations taking place are new to you (as they are to me). So it's a little project.
(I have no connection to this library, I just have been using it).
@pse403 Could you provide a link to the pipeline services offered that would be a replacement for this?
@charlieforward9 , Wondering about the same.
@charlieforward9 @bazinac : https://developers.google.com/mediapipe
For anyone else who finds this, the full response from Google was:
<< Hey. So the vision is that flutter-tflite is going to be more of a 'power user' tool for the tensorflow lite interpreter. Out-of-the-box tasks, like what the helper handled, will be incorporated into a separate plugin for MediaPipe over the next few months. There's no plans to touch on the helper (honestly, the helper kind of filled the role of TensorFlow Task Library, but then a plugin for the task library was never built to replace the helper). >>
Never heard of mediapipe until now. Thank you for asking them and posting the answer. Mediapipe only supports android for now. So this will replace tensorflow or be a part of it?
@Megatronicus you should ask them-- their contact was really helpful and I'd just be guessing. I will say that I just got this lib to work with the latest Image library, but only for processing camera frames from iOS (as far as I currently know). There are things that come up, eg the Image() constructor defaulted to numChannels:4 in the old api (or else that was all it handled, but in any case it worked out of the box with iOS camera frames). In the 4+ versions, that arg defaults to 3. The numChannels arg is optional though, so it wasn't throwing, and I didn't realize amid the rest of the changes. If anyone could use a look at that I can push to my repo here, but it's totally doable overall. Stuff like that.
Good day. I was hoping you might be able to advise if this module is still compatible with Tensorflow Transfer learning using YAMNet for environmental sound classification.
https://www.tensorflow.org/tutorials/audio/transfer_learning_audio
Any information you could provide would be much appreciated.
@thulasirmn Go to Android Studio > External Libraries > tflite_flutter_helper-0.3.1 > android > build.gradle from ext.kotlin_version = '1.3.50' to ext.kotlin_version = '1.5.20'