0 votes
1 view
in Machine Learning by (15.7k 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.2k points)

SwiftOCR

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

From https://github.com/garnele007/SwiftOCR

uses

https://github.com/Swift-AI/Swift-AI

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.

https://developers.google.com/vision/text-overview

Hope this answer helps.

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

Related questions

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...