credit-ocr-system  by markuskuehnle

Local AI document intelligence pipeline for credit evaluation

Created 7 months ago
258 stars

Top 98.0% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a comprehensive tutorial for building a local, privacy-focused OCR system designed to automate credit document processing. It targets engineers and power users seeking to transform manual financial data extraction into intelligent, automated workflows. The system leverages a microservices architecture and local AI models to extract, analyze, and validate key financial data from PDFs and scanned documents, significantly reducing processing time from hours to minutes.

How It Works

The system employs a microservices architecture orchestrated via Docker Compose, featuring PostgreSQL for metadata, Redis as a message broker, Ollama for hosting local LLMs (Llama3.1:8b), Azurite as an Azure Blob emulator, and Celery for asynchronous task processing. Document processing follows a pipeline: upload, OCR text extraction with spatial analysis using EasyOCR, LLM-based field extraction and validation, data validation against business rules, and visualization of results. This local-first, privacy-focused approach avoids external API dependencies, ensuring data security and control.

Quick Start & Requirements

Setup involves cloning the repository, creating a Python environment with uv sync, and starting services with docker compose up -d. A development environment can be launched via uv run jupyter notebook. Step-by-step setup guides are available in notebooks/1-setup/01_setup.ipynb, with a one-command startup verification in notebooks/9-application-setup/setup.ipynb. Prerequisites include Python 3.10+, Docker Desktop, and UV Package Manager. Minimum system requirements are 8GB RAM and 15GB disk space, with 16GB RAM and 25GB disk space recommended.

Highlighted Details

  • Local AI Integration: Utilizes Ollama with Llama3.1:8b for on-premises LLM inference, enhancing privacy and reducing external costs.
  • Comprehensive Tutorial: Features executable Jupyter notebooks covering infrastructure setup, OCR, LLM extraction, integration, and async processing.
  • Production-Ready Architecture: Implements a robust microservices pattern with dedicated services for storage, messaging, LLM hosting, and task management.
  • Advanced OCR: Incorporates spatial analysis techniques with EasyOCR for precise text extraction and bounding box overlays.
  • Data Validation & Orchestration: Includes business rule validation for extracted data and end-to-end workflow orchestration with status tracking and error handling.

Maintenance & Community

Information regarding specific maintainers, community channels (e.g., Discord, Slack), or active development signals beyond the repository owner is not detailed in the provided README.

Licensing & Compatibility

The specific open-source license for this project is not explicitly stated in the provided README content. This omission requires further investigation for commercial use or integration compatibility.

Limitations & Caveats

The project is presented as a tutorial for building production-ready systems, but explicit limitations such as alpha status, known bugs, or unsupported platforms are not detailed. Users should be aware of the moderate-to-high resource requirements (RAM/disk) and the necessity of setting up local Docker and Python environments.

Health Check
Last Commit

2 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
34 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.