Re: Keras OCR project vs. ML kit TextRecognition

7 views
Skip to first unread message

Khanh LeViet

unread,
Jan 6, 2021, 5:25:39 PM1/6/21
to TULASI RAM LAGHUMAVARAPU, George Soloupis, Hoi Lam, Sayak Paul, ML on Mobile OS Working Group
Hi George,

Again at this project we had to implement inside android app the special dependency for pulling in the core TensorFlow runtime:
- implementation 'org.tensorflow:tensorflow-lite-select-tf-ops:0.0.0-nightly'  
Doing that we added more than 100MB in the final .apk file. I tried the procedure described here but with no luck!! (I could not run it inside colab and also I think colab cannot run Docker).
When you find time please guide me because it is the second time that comes in front of us and I think we have to make a good example for the community as I haven't found a successful implementation online.
Yes you are heading in the right direction. As you pointed out, Docker doesn't work in Colab so you'll need to install Docker Desktop on your local machine before building the custom AAR.

The whole point of using Docker is to simplify the build process, making sure you have all the dependencies to build TFLite from source. Technically you can build TFLite from source without Docker, but that's also a painful process...
If there're a few select ops needed, I'd expect the custom TFLite runtime for the KerasOCR model will be about a few MBs.

Hope this helps!

Thanks,
Khanh
 

On Mon, Jan 4, 2021 at 12:43 AM TULASI RAM LAGHUMAVARAPU <tulasir...@gmail.com> wrote:
This is great work George. Also I can see in few cases Keras OCR outperforming while in other cases atleast comparable.

Great work!!

On Sun, 3 Jan, 2021, 8:56 pm George Soloupis, <farma...@gmail.com> wrote:
Hi everyone and Happy New Year!

Back at the start of December Tulasi converted Kears OCR model to TFLite. Since then I started a procedure of implementing it inside an android application.
This project was really trivial and had a lot of challenges such as special operators as CTCGreedyDecoder. In a different email I will point out the challenges and how we managed to overcome them.
For now I present a video demo of the application demonstrating how this model compares to ML KIt's TextRecognition.

I will also continue to make some UI changes and enrich the github repo.

Again at this project we had to implement inside android app the special dependency for pulling in the core TensorFlow runtime:
- implementation 'org.tensorflow:tensorflow-lite-select-tf-ops:0.0.0-nightly'  
Doing that we added more than 100MB in the final .apk file. I tried the procedure described here but with no luck!! (I could not run it inside colab and also I think colab cannot run Docker).
When you find time please guide me because it is the second time that comes in front of us and I think we have to make a good example for the community as I haven't found a successful implementation online.

I hope you enjoy it. This is how we spent our time during vacations! :):)

Regards,
George


--
    
Le Viet Gia Khanh (カン)
TensorFlow Developer Advocate


Shibuya Stream 
3-21-3 Shibuya, Shibuya-ku, Tokyo
150-0002, Japan

George Soloupis

unread,
Jan 6, 2021, 11:40:41 PM1/6/21
to Khanh LeViet, TULASI RAM LAGHUMAVARAPU, Hoi Lam, Sayak Paul, ML on Mobile OS Working Group
Hi Khanh,

Nice to have you back.I will try this approach during the weekend. Looks promising!
In case there are problems I will get back with a new email. It is a great opportunity to show this to the community.

Thanks,
George
Reply all
Reply to author
Forward
0 new messages