Data Automation & OCR

Proof-of-Delivery Capture with OCR for a Haulage Firm

Photos of signed delivery notes turned into invoice-ready data automatically, cutting the gap between delivery and invoice from six days to one.

View live demo Opens a working demo with sample content in a new tab.
Stanmore Haulage demo on desktop and phone

On location

  • Containers Bins — Stanmore Haulage
    Containers BinsPhoto: Mali Maeder (CC0)
  • Coffee Cafelatte — Stanmore Haulage
    Coffee CafelattePhoto: Carli Jean (CC0)
  • Road Truck — Stanmore Haulage
    Road TruckPhoto: Robson Hatsukami Morgan (CC0)
  • Container Van — Stanmore Haulage
    Container VanPhoto: frank mckenna (CC0)
  • Warehouse Windows — Stanmore Haulage
    Warehouse WindowsPhoto: Cyrille Duverne (CC0)

About the Project

This case study covers a delivery note OCR system built for a regional haulage company. Every delivery ended with a signed paper note, and every signed note had to be photographed, sent back to the office and typed into the transport system before the customer could be invoiced. With thousands of notes a week, the typing queue set the pace of the whole business: on average it took six days for a delivery to become an invoice.

We built a pipeline that reads the photos for the team. Drivers keep doing exactly what they did before — photograph the signed note — and the system cleans up the image, reads the printed and handwritten fields, checks the signature and reconciles the result against the planned delivery. Notes that match are released for invoicing automatically; the rest arrive in a review queue with the image and the extracted fields side by side. The gap between delivery and invoice fell from six days to one.

About the Client

The client is a regional haulage firm moving palletised goods for food producers, retailers and packaging companies. Its administrators sit between the depots and the finance team: they chase missing paperwork, key in proof of delivery and answer customer questions about what was delivered and when.

The paperwork itself could not change. Customers sign whatever note the driver hands them, in all weathers, often on the tail-lift of a lorry, and many of those customers have their own receiving procedures. Any solution had to work with crumpled, rained-on, half-lit photographs rather than asking anyone to adopt a new form.

Project Goals

  • Turn photos of signed delivery notes into invoice-ready data without manual typing.
  • Release clean, matching deliveries for invoicing the same day.
  • Catch discrepancies — wrong pallet counts, unclear signatures — before an invoice is sent, not after a dispute.
  • Give administrators one place to review and correct exceptions quickly.
  • Make every note searchable by customer, date and driver.

Project Overview

The Challenge and Our Solution

The Challenge

Drivers photographed signed delivery notes and sent them to the office, where two administrators typed the customer, pallet count and any damage notes into the transport system before an invoice could be raised. With 5,200 notes a week the office was always days behind, invoices went out late, and disputes about pallet counts were settled by hunting through phone photos.

Our Solution

We built a capture pipeline that reads each photo as it arrives: the note is straightened and cleaned, the printed fields are read by a cloud document model, the handwritten pallet count and signature are checked by a second model, and the result is matched to the planned delivery in the transport system. Anything below a confidence threshold, or where the pallet count differs from the plan, lands in a review queue showing the photo and the extracted values side by side. Matched notes flow straight into invoicing.

Why Proof of Delivery Automation Starts With the Photo

The most important lesson of the project came early: the quality of the photograph mattered more than the choice of model. Drivers photograph notes at an angle, in shadow under a trailer, or in low light at the end of a shift. Before any reading takes place, an OpenCV stage corrects skew, flattens shadows and adjusts exposure, so the document model sees something close to a scanned page.

That clean-up step lifted accuracy more than any model change we tried, and it is why the system copes with the photos drivers really take rather than the photos a demo would assume.

  • Perspective and skew correction
  • Shadow removal and exposure balancing
  • Consistent, scan-like images for the reading stage

Two-Stage Extraction: Printed Fields, Then Handwriting

Printed fields such as the customer, the note number and the planned load are read by a document model in Azure Document Intelligence. Handwritten quantities and signatures behave very differently, so they are verified in a separate stage that produces its own confidence score for each value.

Keeping the stages apart means a faint signature does not drag down confidence in a perfectly legible customer name, and the system can say precisely which field it is unsure about. That precision is what makes the review queue fast: the administrator is shown the one value that needs a human, not the whole document.

Plan Matching Instead of Blind Invoicing

Reading a note is only half the job. Each extracted note is reconciled against the planned delivery held in the transport system — the expected customer, date and pallet count. When everything agrees, the delivery is released for invoicing with no human input; this now happens for 91% of notes.

When something differs — eighteen pallets read where twenty were planned, or a signature the model cannot confirm — the note is flagged as an exception rather than invoiced. Discrepancies are resolved while the delivery is fresh in everyone's memory, instead of surfacing weeks later as a disputed invoice.

  • Automatic reconciliation against planned deliveries
  • Pallet-count and signature exceptions caught before invoicing
  • Matched notes released straight to the transport system

A Review Queue Built for Haulage Invoicing Software

Exceptions appear in a review queue that shows the photograph and the extracted fields together, with low-confidence values highlighted. One click corrects a value and releases the invoice. Administrators who once spent their days typing now spend them handling exceptions and disputes — the work that genuinely needs their judgement.

Behind the queue, a FastAPI service and Redis queues keep processing steady during the end-of-day rush when most photos arrive, and PostgreSQL stores every note, field and decision. Any note can be found by customer, date or driver within seconds.

Our Process

How We Delivered It

  1. Paperwork Audit

    We collected a large sample of real delivery note photos and mapped every field, layout and failure mode the system would meet.

  2. Image Clean-up Prototype

    An OpenCV pre-processing stage was built and measured first, because photo quality limited accuracy more than anything else.

  3. Extraction and Matching

    Printed-field reading, handwriting and signature checks and plan matching built as separate, testable stages with confidence scores.

  4. Review Queue With Administrators

    The exception screen was shaped with the people who would use it every day, so a correction takes one click.

  5. Phased Go-Live

    Automatic invoicing was switched on in stages, with exceptions monitored closely before the system handled the bulk of notes on its own.

Key Features

What We Delivered

  • Photo clean-up

    Skew, shadows and low light corrected before reading, which lifted accuracy more than any model change.

  • Two-stage extraction

    Printed fields read by a document model; handwriting and signatures verified separately with confidence scores.

  • Plan matching

    Extracted data reconciled against the planned delivery, so discrepancies are flagged rather than invoiced.

  • Review queue

    Exceptions shown with the image and fields together; one click corrects and releases the invoice.

Outcome

Results and Impact

  • 91% of notes matched and invoiced with no human input.
  • Delivery-to-invoice time reduced from six days to one.
  • Administrators moved from typing to handling exceptions and disputes.
  • Every note searchable by customer, date and driver within seconds.

Services

Services Behind This Project

The Python, Django & FastAPI, OCR & Document Processing, Docker & Kubernetes expertise we used to build this data automation & ocr — and can bring to yours.

  • Python, Django & FastAPI Development

    Python web applications and APIs built with Django, FastAPI or Flask — plus automation, data processing, OCR and document pipelines.

  • OCR & Document Processing

    Invoices, receipts, IDs, forms and scanned contracts turned into structured data — with human review where accuracy matters and straight into your systems where it does not.

  • Docker & Kubernetes

    Applications packaged in Docker, deployed with CI/CD, and run on Kubernetes when they need to scale — with monitoring, secrets and rollbacks built in.

FAQ

Frequently Asked Questions

How accurate is delivery note OCR on phone photos?

Accuracy depends heavily on image quality, which is why this system corrects skew, shadows and low light before reading anything. In this project the combination of clean-up, two-stage extraction and plan matching meant 91% of notes were matched and invoiced with no human input, and the remainder were routed to review rather than guessed.

Do drivers have to change how they work?

No. Drivers keep photographing the signed note as before. The intelligence sits on the server, so there is no new form for customers to sign and no extra steps at the tail-lift. That was a deliberate design choice, because changing customer paperwork across hundreds of sites is rarely realistic.

What happens when the system is not sure about a value?

Every field carries a confidence score. When a value falls below the threshold, or the note disagrees with the planned delivery, the note goes to a review queue instead of being invoiced. The administrator sees the image and the uncertain field together and can correct and release it with one click.

Can this connect to our transport management system?

Yes. This project reads planned deliveries from, and writes confirmed deliveries back to, the client's transport system through its API. We regularly integrate with TMS, ERP and accounting platforms; where no API exists, we can work with file exports or database integrations agreed with your IT team.

Is Azure Document Intelligence the only option?

No. It suited this client's existing Microsoft environment and printed layouts well. We choose document models case by case, considering accuracy on your documents, data residency, running costs and how handwriting and signatures need to be handled, and we keep the pipeline modular so the reading stage can be swapped later.

What affects the cost of an OCR automation project?

The main factors are the variety of document layouts, how much handwriting is involved, the quality of incoming images, the systems to integrate with and how exceptions should be reviewed. A short paperwork audit with real samples is the best way to scope the work accurately before any build starts.

Similar Work

Related Projects

Case studies built with the same technologies or for similar needs.

  • Accounting Finance — Ledgerline Accountants
    • Python
    • FastAPI
    • Tesseract OCR

    Data Automation & OCR

    Invoice Processing & OCR Automation

    A Python pipeline that reads 18,400 supplier documents a month and posts 93% of them without a person keying anything.

  • Man at a laptop in an office — Helm Software
    • Python
    • FastAPI
    • Vector database

    AI Integration

    Support Assistant Grounded in Product Documentation

    A retrieval-based assistant answering customer questions from the vendor’s own documentation, with citations.

  • Containers Bins — Kellner Industrie
    • Java 21
    • Spring Boot
    • Spring Batch

    Enterprise Integration

    Warehouse Order Service & Event Integration

    A Spring Boot order service processing 9,600 orders a day across four warehouses, with event-driven stock sync.

  • Tools Workshop — Quotely
    • Ruby on Rails
    • Hotwire (Turbo & Stimulus)
    • PostgreSQL

    SaaS Product Development

    Field-Service Quoting SaaS

    A Rails MVP taken from idea to paying subscribers in ten weeks, with Stripe billing and Hotwire interactivity.

  • Student School — Learnwell
    • Docker
    • GitHub Actions
    • Nginx

    Cloud & DevOps

    Learning Platform Cloud Migration

    A containerised rebuild of a fragile single-server deployment: 4-minute releases and 58% lower hosting cost.

  • Health Care — ShiftPlan
    • Docker
    • Kubernetes (GKE)
    • Helm

    Cloud & DevOps

    Kubernetes Deployment Platform for a Rostering SaaS

    Twelve services moved from hand-managed virtual machines to Kubernetes with CI/CD, autoscaling and zero-downtime releases — forty deployments a week instead of one.

Let’s Connect

Want Results Like These?

Share your project details and our experts will get back to you within one business day with the best solution — free consultation, no obligation.