tensorflow / flutter-tflite

Apache License 2.0
426 stars 101 forks source link

Why flutter-tflite doesn't support flutter web #207

Open simon-zhangmuye opened 3 months ago

simon-zhangmuye commented 3 months ago

Hello, I am trying to develop a Flutter Web application with the goal of integrating AI technology to provide real-time guidance for users on how to properly face the camera—for example, ensuring that their head position is neither too high nor too low. However, I've encountered a challenge: the machine learning libraries available for Flutter Web seem to be quite limited. I'm wondering whether it's possible to achieve this functionality? If so, how should I go about it?

PaulTR commented 3 months ago

Hey. It's kind of a legacy problem. Basically TensorFlow Lite is using a set of C++ libraries for the ML portion, which is really different from what TFLite for JS does, so it didn't get added in when Flutter started supporting web. I don't actually think we have anything right now that supports Flutter Web ML without using a Cloud backend, but I'll definitely record this issue to add another datapoint for why we need it (because, honestly, I think Google does need a web-ODML solution for Flutter :))

simon-zhangmuye commented 3 months ago

@PaulTR Thanks for your reply. I thought it might because of the model size issue. The model may be too large for web applications. Do you have any idea to make TF model work in flutter web using tensorflow.js?

PaulTR commented 2 months ago

I think there's a community run plugin for web TFLite, but I honestly haven't tried it to know how good it is. Sorry! :(

CaptainDario commented 5 days ago

Related to #163