liveBook · Manning

OCR

As explained in Machine Learning Platform Engineering

Optical character recognition is the automated extraction of written or printed text from images.

Optical character recognition (OCR) extracts written or printed text from images. A production OCR system can identify identity cards in images and extract their ID numbers. section 1.4.2 section 1.1.1

A practical OCR workflow proceeds through these stages:

  • Collect images of valid identity cards, including cards from the countries covered by the problem. section 1.1.1
  • Annotate the regions containing ID numbers with bounding boxes and transcribe the numbers by hand. section 1.1.1
  • Organize labeled data into training, validation, and test datasets. section 1.1.1
  • Train an image detector, implement an initial version with an open-source library, fine-tune it with labeled data, and deploy it as a service. section 1.4.2

Identity-card OCR

Given an image containing an identity card, detect the card and its ID-number region, then extract the ID number. If real images are difficult to obtain, consider generating synthetic data before annotation and dataset preparation. section 1.4.2 section 1.1.1

Figure 1.1 The experimentation phase of the ML life cycle
A diagram of a data processing process

AI-generated content may be incorrect.

Use the experimentation-phase diagram to place OCR data collection, annotation, training, validation, and testing within the wider ML life cycle. section 1.1.1

How Machine Learning Platform Engineering covers it

How deep it goes
Traces data collection, annotation, dataset splitting, detection, fine-tuning, and deployment without detailing recognition internals.
Examples
Uses identity-card images, ID-number bounding boxes, handwritten transcriptions, and country-varied card datasets.
What it assumes
Assumes choosing ML over heuristics, while teaching data sourcing, annotation, and training-validation-test organization.
What you can do after
Build an OCR service by preparing labeled images, training a detector, fine-tuning it, and deploying the result.
How it connects
Connects OCR with image detection, data annotation, synthetic data, fine-tuning, dataset splitting, and service deployment.

Also explained in

Compare how 2 books explain OCR →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning Platform Engineering. The section links point to the parts of the book it draws on.