AITeky Learn

AiTeky Original Interactive Learning & Practice Advanced

Document AI and OCR: reading what is on the page

Build a small text reader from scratch, from cleaning a noisy scan to finding lines and characters and recognising them, measure it with character error rate, and learn how to benchmark and trust a real OCR engine.

A scanned invoice, a photographed delivery slip and a cheque are all the same thing to a computer: a grid of grey numbers with no text in it. OCR (optical character recognition) turns that grid into text, and document AI goes further, reading the layout, the fields and the tables. Almost every back office that still has paper, or a PDF that is really a picture, depends on it.

Real OCR engines are large and ready-made, and in practice you will use one. But you cannot judge one, or know why it fails on a crumpled receipt, without knowing what is inside. So in this course you build a small reader yourself from NumPy, SciPy and scikit-learn: clean the scan, straighten it, cut it into lines and characters, and recognise each one, measuring every step on pages whose true text you know. The industry lessons then rescue hard scans with a check digit, and compare three readers fairly, by quality of scan, accuracy, review workload and cost. You need the Python and machine learning courses; the computer vision course helps.

  • Learn lessons explain one idea at a time, with code you can run in the browser.
  • Industry ready lessons use the reader on delivery slips and in a vendor comparison. Each ends with the interview questions that go with it.

Locked. Sign up free

Learn

Understand each idea with everyday examples. No coding background needed.

  1. 01 30 min Free sample πŸ”’ AiTeky Pass A scan is a noisy grid of numbers Make a page of digits, damage it the way real scans are damaged (blur, noise, uneven light, a tilt), and turn it back into black ink on white paper with a fixed threshold, Otsu's threshold and an adaptive one, scoring each against the truth.
  2. 02 35 min πŸ”’ AiTeky Pass Cleaning, straightening and cutting into characters Remove speckle with connected components, find a page's tilt by trying angles and keeping the one with the sharpest rows of text, then cut the page into lines and characters with projections, and measure how often each step gets the layout exactly right.
  3. 03 40 min πŸ”’ AiTeky Pass Recognising characters Train a nearest-neighbour recogniser on simulated scans, test it on new pages with handwriting-like wobble, see which characters get confused (0 and O, 1 and I, B and 8), and use the model's confidence to keep the sure readings and flag the rest.
  4. 04 35 min πŸ”’ AiTeky Pass Measuring OCR: character and word error rates Count the edits between what a reader produced and what was written with the Levenshtein distance, turn them into character and word error rates, compare a plain reader with the cleaned one across noise levels, and see how restricting a field to digits removes look-alike errors.

Industry ready

Real problems from real jobs, and the questions interviewers ask about them.

  1. 05 45 min πŸ”’ AiTeky Pass On the job: rescuing consignment numbers with a check digit Read 10-digit consignment numbers from hard scans, use the Luhn check digit to accept readings that cannot be mistakes, repair the ones that fail by swapping the least certain digit for the reader's second choice, and measure how many numbers are right, repaired and sent to a person.
  2. 06 40 min πŸ”’ AiTeky Pass On the job: choosing a reader fairly Compare three readers on good, average and poor scans with the same test pages, count what each accepts, gets wrong and sends to people, turn those counts into a cost per thousand numbers for your own mix of scans, and learn the questions to ask any OCR vendor.

We use essential cookies to run the site. With your permission we also set one anonymous ID to count unique visitors, and analytics cookies to see which pages help learners. Cookie notice

Join AiTeky Learn. It's free.

Create a free account to track your progress, save items for later and get study suggestions.

Sign up free Log in