Case study

Production OCR for Training Certificates and Invoices

Human Focus International receives thousands of training certificates from many awarding bodies, plus invoices that must be matched to customer accounts. Staff were fixing certificate records and keying invoice fields by hand.
  • Client: Human Focus International
  • Industry: Health & Safety Training
  • AI capability: Intelligent Document Processing
Visit Human Focus International (opens in a new tab)
Scanned training certificate with numbered green boxes around each OCR text region, such as the course title, expiry date and issue date; the trainee, employer and signatory names are blurred
Certificate pipeline live in production
Dec 2022
Fields extracted from every certificate
5
Invoice pipeline deployed to production
Jun 2023
Unattended runs on the client's AWS server
Nightly

The challenge

OCR text that comes back in a different order every time

Certificates for IOSH and other courses, plus external certificates that delegates upload, come in many different layouts. The existing system used Google OCR followed by simple template matching, which broke because the OCR returned the text in a different order each time: the trainee's name could appear anywhere, and signatory names were easily confused with trainee names. Invoices follow one template, but OCR mixes up similar characters: customer codes are three letters followed by three digits, and a 0 read as O or a 1 read as I breaks account matching. Both jobs had to run unattended on the client's AWS server and write results back through its own APIs.

What we built

OCR plus a custom entity model, posting straight into the client's systems

Fields are found by meaning and layout, not by line position.

  1. Stage 1

    Annotation

    We set up Label Studio and annotated real certificates for the five target fields: trainee name, course provider, training title, completion date and expiry date.
  2. Stage 2

    OCR plus custom NER

    Google Cloud Vision extracts the text and its positions. The text is re-ordered by layout and a custom spaCy transformer model tags the five fields, so the result no longer depends on the order the OCR returns.
  3. Stage 3

    Post-processing

    Dates are normalised and course-provider abbreviations are mapped to full awarding-body names (IOSH, NEBOSH, CITB, RoSPA and 30+ others), using a mapping list maintained with the client.
  4. Stage 4

    Invoice extraction

    EasyOCR reads each invoice page and takes the value next to each label as the field. Customer codes are upper-cased, spaces removed, and O/I in the numeric positions corrected to 0/1, following rules agreed with the client's developer.
  5. Stage 5

    S3 and API pipeline

    The pipeline pulls PDFs, images and zip files from S3, splits PDFs into pages, runs the models, posts each record to the Human Focus API and moves processed files, with email alerts on failures.
  6. Stage 6

    Nightly production runs

    On the client's AWS EC2 server the job starts when the server boots each night at 1:00 GMT, processes the queue and powers the server down. Test and live environments are configured separately.

The impact

Certificates and invoices processed every night, unattended

  • Live in production since December 2022
  • Five fields from every certificate
  • Invoice pipeline in production since June 2023

The certificate pipeline has run in Human Focus's production environment since December 2022, extracting five fields per certificate from PDFs, JPG/PNG images and zip batches. A second integration for externally uploaded certificates went live in January 2023 after successful production tests, and one codebase now serves both. The invoice pipeline was deployed to production in June 2023 and posts the customer code and invoice number for each invoice to the client's API. File-name sanitising made every invoice image link usable in the client's CRM.

Book a strategy session

Talk to an AI engineer about your project

Tell us what you want to automate. The first call is a 30-minute working session with an engineer, not a sales pitch.

  • Send the form, it takes 2 minutes
  • We reply within 1 business day, under NDA if you need it
  • A 30-minute call to scope feasibility and next steps

Tell us about your project

By submitting, you agree to our Privacy Policy. We never share your details.