TensorFlow on Mobile: TensorFlow Lite
towardsdatascience.com
towardsdatascience.com
Keras is supported out of the box with the Tensorflow backend though. See https://medium.com/@JMangia/super-simple-end-to-end-test-of-... and https://github.com/apple/coremltools
[0]https://developer.apple.com/documentation/coreml/converting_...
[0] https://onnx.ai/
Considering Tensorflow is more a grab at developer mindshare than an ideal platform [for example, its performance lags by a factor of two behind MXNet and Torch], I think it's a smart plan.
They very well may catch up, but that doesn't mean that hype and the Google name aren't the reason it's gotten popular.
https://developers.googleblog.com/2017/12/announcing-core-ml...
It seems that it will be supported but there's no timeline.
I just tried building TFLite for a lark on a Raspberry Pi 2 and succeeded without much hassle and any of that bazel nonsense. It's a standalone component - they provide a Makefile and I just had to run make.
The example label_image inference app took a bit more work - I had to write my own Makefile - but wasn't difficult. I'm able to run inference on images on RPi2 with both floating and quantized MobileNets tflite models. Will try videos now.
For anybody else interested in trying out TFLite on your desktop or Raspberry Pi or any SBC, I've put up instructions and Makefile at https://pastebin.com/LDEGyG46
That said, the label_image classification example does provide some timing information. On the 500x600px test image that comes with it, non-quantized classifier for 10 iterations took ~900 ms on a RPi2 while quantized took ~300 ms. The confidence values were much lower in the quantized version, but I didn't spot any major misclassification.