tflite_flutter_helper icon indicating copy to clipboard operation
tflite_flutter_helper copied to clipboard

Upgrade Image Dependency

Open charlieforward9 opened this issue 1 year ago • 17 comments

This package is preventing me from upgrading other packages due to version dependency conflicts! Please resolve and re-release.

charlieforward9 avatar Mar 15 '23 17:03 charlieforward9

The camera package needs to be updated as well please.

mohyghb avatar Mar 28 '23 02:03 mohyghb

pdf package also requires image: ^4.0.0

GauravAppdidGithub avatar Apr 20 '23 05:04 GauravAppdidGithub

any updates?

GauravAppdidGithub avatar May 03 '23 08:05 GauravAppdidGithub

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!

pnyompen avatar May 10 '23 03:05 pnyompen

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`
```

thulasirmn avatar Jun 29 '23 13:06 thulasirmn

It says here https://pub.dev/packages/tflite_flutter_helper/score This project has been discontinued?

Megatronicus avatar Jul 30 '23 05:07 Megatronicus

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 avatar Aug 07 '23 17:08 pse403

@pse403 Could you provide a link to the pipeline services offered that would be a replacement for this?

charlieforward9 avatar Aug 07 '23 23:08 charlieforward9

@charlieforward9 , Wondering about the same.

bazinac avatar Aug 08 '23 06:08 bazinac

@charlieforward9 @bazinac : https://developers.google.com/mediapipe

pse403 avatar Aug 09 '23 15:08 pse403

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

pse403 avatar Aug 09 '23 15:08 pse403

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 avatar Aug 11 '23 11:08 Megatronicus

@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.

pse403 avatar Aug 25 '23 19:08 pse403

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.

ghost avatar Oct 16 '23 08:10 ghost

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

md-rifatkhan avatar Jan 07 '24 15:01 md-rifatkhan