7678d28717
Self-hosted, verifiable pipeline for extracting structured data (station, date/time, price per litre, litres, discount, total) from German fuel receipt photos: grayscale + mild bilateral filter + contrast stretch, Tesseract OCR, then LLM structuring via a small local model (Qwen 2.5, served by Ollama). Each step is independently runnable and inspectable through numbered scripts against a shared tooling container. Ollama runs as its own long-lived container (0_run_ollama.sh), separate from the stateless per-receipt pipeline steps, so the model stays loaded in memory between runs. Includes a containerized ground-truth batch test (test_batch.sh) that reproduces the full pipeline over the test receipts and reports per-field accuracy. Targets eventual deployment on a Raspberry Pi 4 k3s cluster.
20 lines
563 B
Plaintext
20 lines
563 B
Plaintext
# Test receipt images / ground-truth spreadsheets (not checked in)
|
|
/testdata/
|
|
|
|
# Local registry credentials (see registry.env.example)
|
|
/registry.env
|
|
|
|
# Local Claude Code settings
|
|
/.claude/settings.local.json
|
|
|
|
# Generated pipeline output (see test_batch.sh, 1_preprocess_image.sh,
|
|
# 2_ocr_image.sh, 3_extract_data.sh) - intermediate/result dirs are
|
|
# created as siblings of whatever -in directory was processed
|
|
*-scratch/
|
|
*-result/
|
|
|
|
# Python bytecode cache (picked up if src/ is ever imported on the host
|
|
# instead of run through the container)
|
|
__pycache__/
|
|
*.pyc
|