Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Document AI – Structured Data Extraction from Documents

Automated extraction of structured information from semi-structured documents using OCR, layout detection, and rule-based post-processing.

This project converts scanned documents into machine-readable structured data, enabling automation of document processing workflows.


Project Overview

Many business processes rely on documents such as:

  • vehicle registration documents
  • invoices
  • insurance forms
  • certificates
  • identification records

These documents contain valuable information but exist only as images or PDFs.

This project builds a Document AI pipeline that extracts key fields from such documents and converts them into structured output.

Example extracted fields include:

  • License plate number
  • Owner name
  • Address
  • Vehicle type
  • Vehicle model
  • VIN number
  • Birth date
  • Insurance company
  • Color
  • Registration number

Example Result

Below is an example of the system extracting structured fields from a vehicle registration document.

Document AI Example

The pipeline identifies relevant regions, extracts text, and maps the information into structured fields.


Pipeline Architecture

The system follows a multi-stage document intelligence workflow:

1️⃣ Input Document

  • Scanned document or image

2️⃣ Preprocessing

  • Image cleanup
  • Noise reduction
  • resizing / normalization
  • preparing document for OCR

3️⃣ OCR Extraction

  • text detection
  • text recognition

4️⃣ Field Detection

  • identifying key-value regions
  • mapping extracted text to structured fields

5️⃣ Post Processing

  • text normalization
  • rule-based validation
  • formatting corrections

6️⃣ Structured Output

Example output:

{
  "license_plate": "XX 000 000",
  "owner_name": "Max Mustermann",
  "address": "Musterstrasse 123, 9999 Beispielstadt",
  "vehicle_type": "Musterfahrzeug",
  "vehicle_model": "Sample Car 1.0",
  "vin": "VIN-DEMO-PLACEHOLDER",
  "birth_date": "1990-01-01",
  "insurance": "Demo Versicherung Muster AG",
  "vehicle_color": "Musterblau"
}

Tech Stack

Python OpenCV – image preprocessing OCR – text recognition (Tesseract / EasyOCR / PaddleOCR) NumPy / Pandas – data processing Custom extraction logic – field detection & validation


Project Structure

document-ai-extraction/
│
├── data/
│   ├── sample_documents
│
├── notebooks/
│   └── docAI.ipynb
│
├── src/
│   ├── preprocessing.py
│   ├── ocr_pipeline.py
│   ├── extraction_logic.py
│
├── assets/
│   └── doc_ai_example.png
│
├── requirements.txt
└── README.md

Installation

Clone repository

git clone https://github.com/MuntahaShams/document-ai-extraction.git
cd document-ai-extraction

Install dependencies

pip install -r requirements.txt

Running the Project

Run the notebook:

docAI.ipynb

Or run extraction on a document:

python extract.py --input sample_document.png

Challenges in Document AI

Some challenges addressed in this project:

  • noisy scans
  • inconsistent document layouts
  • OCR recognition errors
  • multilingual fields
  • varying formats across documents

Possible Improvements

Future enhancements include:

  • layout-aware models (LayoutLM / Donut)
  • key-value detection models
  • table extraction
  • confidence scoring
  • human-in-the-loop validation UI
  • API deployment

Author

Muntaha Shams AI Engineer – LLMs | NLP | Computer Vision | Document AI

GitHub https://github.com/MuntahaShams

Portfolio https://muntahashams.github.io/portfolio/projects


About

Automated extraction of structured information from semi-structured documents using OCR, layout detection, and rule-based post-processing. This project converts scanned documents into machine-readable structured data, enabling automation of document processing workflows.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages