Choose the Right On-Device Text Recognition (OCR) SDK on Android Using DeltaML

Firebase’s ML Kit vs Tesseract OCR on Android devices

This blog is a continuation of our series comparing on-device OCR libraries. Here’s a similar comparison on iOS devices.

Summarizing the results of our comparison on iOS devices, Firebase’s ML Kit was leading by a solid margin against Tesseract OCR. However, outcomes weren’t very similar on Android phones. For this particular test, we used Samsung Galaxy J7 with 2GB RAM and 32GB Memory. Different hardware may result in different results.

For this comparison, we used the same dataset and our very own React Native Text Detector’s comparison branch.

Here is the Summary

Firebase’s ML Kit leads here as well but is not far ahead of Tesseract OCR.

Let’s dive in

In order to get a complete picture of where both of these libraries perform better, we need to analyze the results of these libraries comparatively.

Success for both — Total 164 (-43%)

A total of 164 images were recognized perfectly by both of these libraries. That’s 43% less than iOS.

Failure for both — Total 161 (+20%)

161 image were detected with text, but neither libraries was able to recognize the text perfectly. ML Kit was better in this case, as it had a higher correctness rate.

Misery for both — Total 185 (-1233%)

In 185 images, neither of these libraries was able to detect the text in the image. This number is much higher when compared to iOS, and this can be alarming for mobile ML developers working on OCR tasks. We’ll produce another comparison concerning Firebase’s ML Kit, showing how its performance differs on both platforms.

Firebase was better — Total 130 (-58%)

In 130 images, Firebase’s ML Kit performed perfectly while Tesseract OCR was unable to recognize the text correctly or wasn’t able to detect text in an image.

Tesseract took the lead — Total 106 (+706%)

In 106 images, Tesseract OCR performed perfectly while Firebase’s ML Kit was unable to recognize text correctly. This show a massive boost in performance for Tesseract on Android as compared to iOS.

Some other aspects

As we discussed in our previous blog about the comparison on iOS, it’s not just about how well a library performed — at times there are parameters that might influence one’s decision to choose one library over the other.

App Size

Though we’re living in an age where manufacturers’ focus is on making devices more AI-efficient, there are a lot of people who still have low-end devices that don’t have a lot of space. Tesseract OCR adds more size to your app as compared to Firebase’s ML Kit. The DeltaML app using only Firebase’s ML Kit was 9.8MB while with Tesseract OCR it was 23.1MB. DeltaML is built using react native so this size includes the size of RN as well.

Custom Models

Just like on iOS, Tesseract OCR has its own set of models you can import into your project, as per your requirements. ML Kit, on the other hand, comes with its own pre-built models. However, if none of those meet your needs, you can use a custom TensorFlow model that requires a little bit of prior machine learning experience.

MICR Detections

While working on financial apps, one might need to read MICR (magnetic ink character recognition) from checks in their app. In Tesseract OCR, you can do it quite easily by importing this MICR model into your app and using it for detection. If you’re using ML Kit, you’ll have to employ TensorFlow along with a custom model to get it done.

Who is the winner then?

Despite a tough competition on Android, we believe Firebase’s ML Kit is the one! Having said that, Firebase still needs to improve quite a bit on the Android front to match its high standards set on iOS devices.

Thanks for reading this, and I hope that this helps you in developing OCR-based apps.

Enjoyed it? Click the 👏 to say “thanks!” and help others find this article.

Discuss this post on Hacker News and Reddit.


Our team has been at the forefront of Artificial Intelligence and Machine Learning research for more than 15 years and we're using our collective intelligence to help others learn, understand and grow using these new technologies in ethical and sustainable ways.

Comments 0 Responses

Leave a Reply

Your email address will not be published. Required fields are marked *

wix banner square