google / flutter-mediapipe

Apache License 2.0
165 stars 7 forks source link

[📚] Development Roadmap? #8

Closed k2m5t2 closed 2 months ago

k2m5t2 commented 10 months ago

Hi, I am a student learning how to run ML inference in Flutter. Many pre-existing projects seem to use flutter-tflite-helper package, which have been discontinued according to the repo:

The helper library has been deprecated. New development underway for a replacement at https://github.com/google/flutter-mediapipe. Current timeline is to have wide support by the end of August, 2023.

I know that development is going underway in the respective branches, but it would still be hugely beneficial if you could share a rough development roadmap as well as initial documentation explaining the goals and scope of the project.

Thank you!

PaulTR commented 10 months ago

Hey. Yeah this is in progress. Your best bet would actually be the non-helper version of the TFLite plugin, which is still actively being developed by the community. https://github.com/tensorflow/flutter-tflite/tree/main

There's examples in there for everything in the helper I believe.

UsamaHameed1 commented 10 months ago

Hi

I am also working on an interesting project in Flutter and wanted to integrate on device ML can you please tell me when the package is going to be released as in the repo it it was mentioned in end of august 2023

merdandt commented 10 months ago

Wait for it! Really cool idea.

Megatronicus commented 6 months ago

Hi guys, I just wanted to ask what's going on with this? The timeline said mediapipe for flutter would be done in August? It's now end of December. I have used flutter_tflite pubdev library in flutter some time ago to make a machine learning example. Then no one updated that library for 3 years, now it doesn't support image_picker above version 1 and the latest is image_picker 1.0.5. So I made another project using a newer library tflite_flutter, got that one working too after a lot of retrying, then updated the project to the new version of flutter and now that project fails too because tflite_flutter_helper which has to be used with tflite_flutter supports gradle 1.3.50 which is now outdated and I get an error compiling the program. So that's two codes I have written that have worked perfectly but are now unusable forever. Great. Then I found out about this project mediapipe so I came here to ask you guys what are you doing, why don't we have a comprehensive solution, why aren't you updating old libraries so that we can use them or at least release them on github so we can copy the code and update them in our projects (flutter_tflite and tflite_flutter don't have github links on their official pages meaning it's not open source?). I'm also wondering why aren't more people asking when this will be done here? Am I the only one with this problem aside from the original commenter. Also am I supposed to use google_ml_kit and write new code for that or wait for another couple of days (or how much longer?) and write the new code for mediapipe as if two different version that no longer work weren't enough work not to mention complexity of the code went up with newer libraries. Hopefully mediapipe will be simpler and easier to put together. What is the project roadmap as of Dec 30 2023 and what is your advice on how to proceed further? Please help me so I can finish the projects I am working on which should utilize machine learning using the trained tflite I have as a part of the app. I also need flutter web support to do machine learning in flutter web apps, there's a tflite_web library but that's outdated too. Hopefully mediapipe will support flutter web and allow the tflite file to be inside the assets folder or the web folder where it can be referenced from memory instead of being hosted. The best option until mediapipe is done would be to update tflite_flutter at least since that worked better than flutter_tflite which is an even older library. Also updating the tflite_web and allowing it to work with modern flutter_web environment. I would be very grateful if you could address these issues.

PaulTR commented 6 months ago

Friend, line breaks :)

The timeline said mediapipe for flutter would be done in August? It's now end of December

Yeah, unfortunately this has been a project in development on top of our regular jobs, so it's taking longer than we would have hoped with making sure we get all of the approvals and discussions for building it correctly from the beginning, plus now it's the winter holidays (and then some - I've actually been out on leave since November and won't be back until May, but Craig is spearheading this one).

I have used flutter_tflite pubdev library in flutter some time ago to make a machine learning example. Then no one updated that library for 3 years, now it doesn't support image_picker above version 1 and the latest is image_picker 1.0.5. So I made another project using a newer library tflite_flutter, got that one working too after a lot of retrying, then updated the project to the new version of flutter and now that project fails too because tflite_flutter_helper which has to be used with tflite_flutter supports gradle 1.3.50 which is now outdated and I get an error compiling the program

Yeah the helper isn't the way to go - the updated version of the tflite library that is being maintained is intended to be primarily the interpreter, but we've provided examples covering everything the helper did. Things are kind of at an in-between stage as we get everything built. Who knew going from nothing at all for three years to a perfect solution would take a bit? :P

why aren't you updating old libraries so that we can use them or at least release them on github so we can copy the code and update them in our projects (flutter_tflite and tflite_flutter don't have github links on their official pages meaning it's not open source?)

I'm not sure what you're talking about here. The 'old libraries' (which you mentioned using - the newer tflite plugin) are on GitHub and is linked in the pub.dev page. You even commented on an issue on it on GitHub. That's the only one we oversee, the rest are from the developer community without TensorFlow's involvement.

what is your advice on how to proceed further? Please help me so I can finish the projects I am working on which should utilize machine learning using the trained tflite I have as a part of the app

The TFLite Flutter plugin that you commented on before is the way to go for now as it exists and is working.

I also need flutter web support to do machine learning in flutter web apps, there's a tflite_web library but that's outdated too.

Yeah I'm not sure on that one - we don't own that plugin (though it looks like it was updated 2 months ago on pub.dev?)

yassine-kassis commented 6 months ago

Hello ! Great discussion ! So do we know when the mediapipe package will be working ? (in 1,2 ... months )

Guo8a commented 6 months ago

I am using this helper, which forked、modified、and adapted to the new version of tflite_flutter by pnyompen.

It is available on the upgrade-tflite-flutter branch at https://github.com/pnyompen/tflite_flutter_helper.

xurc commented 5 months ago

unfortunately this has been a project in development on top of our regular jobs

Ok, Google, could this mean that the flutter-mediapipe will probably not be released at all? We have been waiting for this plugin for almost a year after the question in the tflite_flutter thread and I would like to understand whether it is worth waiting further))

PaulTR commented 5 months ago

There have been regular PRs to the repo on a feature branch (I think the most recent was last week, but I haven't been paying a lot of attention to it while on leave). I can't give a solid timeline right now, so if you need something immediately, I'd say build with what's out right now.

craiglabenz commented 2 months ago

Thanks, everyone, for your attention and interest! Last week I released support for 4 tasks (3 text-based tasks, plus LLM inference) on Android, iOS, and macOS. I'm in the process of adding individual issues for further support - please feel free to upvote those so we can get a signal on which features folks are looking to use in your apps.

I'm going to close this issue for now, as individual feature request issues will track interest moving forward.