Back to portfolio

Document Extraction Backends: Google Vision, Document AI and Passport OCR

Two document extraction backends: a scanning app on Google Vision and Google Document AI form processing with JSON export, and the server side of a React Native app that captured passports, licences and cards.

Document Extraction Backends: Google Vision, Document AI and Passport OCR
ocrgoogle cloud visiongoogle document aidocument extractionpython

The Brief

Two clients, two years apart, with the same underlying need: take documents people photograph or upload and turn them into data a system can use. One wanted a document scanning web app. The other was building a React Native app that captured identity documents and needed the whole server side behind it.

What I Built

  • A document scanning app (2020, two contracts): a Flask web app that takes PDF and image uploads and runs them through Google Vision OCR, then a second phase that accepts multiple files at once, processes them concurrently through Google Document AI form processing, and exports the extracted fields as JSON.
  • The server side of a document-capture mobile app (2018 to 2019): cloud web services for a React Native client, a database designed for indexing and normalisation, sign-in through Google, Facebook or a phone one-time password, offline analysis jobs, document storage, and OCR for passports, driving licences, car licences and credit cards.
  • Field structuring on top of the OCR, because the client needs data, not a block of text. Which engine and which processor to use depends on the document type, and the code decides that per document.
Architecture: multi-file upload, concurrent processing, Google Vision OCR in phase one and Document AI form processing in phase two, plus the separate passport and licence OCR backend
2clients, both Upwork contracts
2Google APIs in production use: Vision and Document AI
4identity document types captured by OCR
14 moon the mobile backend, one continuous hourly contract

Why It Holds Up

The OCR call is the easy part. The work that decides whether the product is usable is everything around it: choosing the right processor for each document type, handling several uploads at once without one slow file blocking the rest, and shaping the output into fields the next system can read. That is where these two projects spent their time.

Message me on the platform where you found this and I will answer there.