keras-ocr icon indicating copy to clipboard operation
keras-ocr copied to clipboard

[Android] Convert in TF-lite is possible?

Open NeighborhoodCoding opened this issue 5 years ago • 1 comments

I want to use this OCR in Android.

I considered this TF-lite github(this is yolov4, actually... https://github.com/hunglc007/tensorflow-yolov4-tflite

https://github.com/shaqian/flutter_realtime_detection)

And it seems that converted TF-lite is can be run on android(I also build TF-lite android app successfully).

I'm studying flutter pipeline and I understand a litte bit...but yolo is actually one TF. however... keras-ocr is actually 2 TF. (recognize, detect)

  1. can i convert two TF-python(recognize, detet) to TF-lite? If possibble, the input and output is same as TF in python? ( I surveyed this, https://github.com/hunglc007/tensorflow-yolov4-tflite/blob/master/convert_tflite.py seems it converts TF to TFlite, converter = tf.lite.TFLiteConverter.from_saved_model(FLAGS.weights) or converter = tf.lite.TFLiteConverter.from_keras_model(model) )

is possible... All i have to do more is made flutter(or java, kotlin) pipelines instead of python pipeline. Am I right?

  • P.S : or maybe... officially support TF-lite converted version also in github? should be great for android developers.... (I'm still studying now how to convert it... but maybe some conversion command can do it hopefully... maybe this? https://www.tensorflow.org/lite/api_docs/python/tf/lite/TFLiteConverter)

NeighborhoodCoding avatar Sep 08 '20 02:09 NeighborhoodCoding

Hey @SungmanHong I succesfully converted to TFLite especially for android developers. You can find the TFLite models in this Repository. Feel free to create a issue if you have any doubts in the repo itself.

tulasiram58827 avatar Nov 29 '20 08:11 tulasiram58827