tensorflow / flutter-tflite

Apache License 2.0
465 stars 126 forks source link

[Feature] web support #163

Open CaptainDario opened 11 months ago

CaptainDario commented 11 months ago

@PaulTR I am curious about the plans to support web. Are there any plans on your side?

As this package is tflite and not tfjs I am curious if we could load the wasm binary to support the web as target. There is this package that seems promising. Would you be against using this package to support web by using web assembly?

PaulTR commented 11 months ago

So from what I had heard discussing this with someone internally a while back, I guess the way the plugin is written it's not very well suited for web support. I haven't personally dug into it to verify, but my hopes aren't high and I have a feeling a second plugin specifically for web might be a better plan (which is really unfortunate).

CaptainDario commented 11 months ago

That's a bummer. Maybe you could ask this person again. tf.js now supports tf lite loading and it seems to be possible to compile TF Lite as a wasm module (see here and here). I guess its possible using the mentioned plugin, but I will not investigate more if it is already clear from the beginning that it is not going to work.

jpiabrantes commented 9 months ago

This would be a killer feature. Flutter Web works with WASM so it makes total sense for heavy libraries like TF.

ilangleben19 commented 3 months ago

Any update on this idea?

PaulTR commented 3 months ago

Nothing planned and not likely to be planned for.

CaptainDario commented 2 months ago

I think once https://github.com/dart-lang/sdk/issues/46690 is available, this should be quite feasible.