Explore Courses Blog Tutorials Interview Questions
0 votes
in Machine Learning by (19k points)

I'm looking through the Apple's Vision API documentation and I see a couple of classes that relate to text detection in UIImages:

1) class VNDetectTextRectanglesRequest

2) class VNTextObservation

It looks like they can detect characters, but I don't see a means to do anything with the characters. Once you've got characters detected, how would you go about turning them into something that can be interpreted by NSLinguisticTagger?

Here's a post that is a brief overview of Vision.

1 Answer

0 votes
by (33.1k points)


I just got SwiftOCR to work with small sets of text.



which uses the NeuralNet-MNIST model for text recognition.

You can convert VNTextObservation to a string by the following methods:

Using OpenCV + Tesseract OCR

To perform OpenCV OCR text recognition, we need to install Tesseract v4 which includes a highly accurate deep learning-based model for text recognition.

To write a Python script that:

  1. Performs text detection using OpenCV’s EAST text detector, a highly accurate deep learning text detector used to detect text in natural scene images.

  2. Once we have detected the text regions with OpenCV, we’ll then extract each of the text ROIs and pass them into Tesseract, enabling us to build an entire OpenCV OCR pipeline.

Using Google Vision iOS

Google Vision Text Recognition - Android SDK has text detection but also has iOS cocoapod. So you can try this also.

Hope this answer helps.

If you wish to learn a Machine Learning visit, this Machine Learning Course.

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Sep 17, 2019 in Python by Sammy (47.6k points)

Browse Categories