Tanishq71's picture
Update README.md
0a24b32 verified
|
Raw
History Blame Contribute Delete
1.95 kB
---
title: Receipt Entity Extractor
emoji: 🧾
colorFrom: blue
colorTo: indigo
sdk: gradio
sdk_version: 5.50.0
app_file: app.py
pinned: false
license: mit
short_description: Receipt key-info extraction with PaddleOCR + LayoutLMv3
---
# Receipt Entity Extractor
Key-information extraction from receipts, built with PaddleOCR + LayoutLMv3 fine-tuned on the SROIE dataset (Malaysian receipts).
**Macro F1 (fuzzy):** 0.81 on 347 unseen receipts
**Macro F1 (exact):** 0.42
**Strongest field:** Address (fuzzy 0.91) · **Most improved:** Date (regex fallback)
This demo lets you upload a receipt and see:
- The four extracted fields: company, date, address, and total
- Per-stage processing time (OCR vs. model)
- A downloadable JSON of the result
## ⚠️ Note
This is a portfolio/research demonstration trained on SROIE-style Malaysian and English receipts. It is not a validated commercial extraction system. Inference is OCR-bound; large images are downscaled to 1600px, and the first request after inactivity takes 1–2 minutes (cold start).
## Why this project is different
An OCR-only baseline revealed that the model was under-tagging dates — so a regex date fallback was added in post-processing, recovering date exact-F1 from 0.23 to 0.60 without retraining. Every field is reported with both exact and fuzzy F1, because exact-match on OCR output is bounded by OCR noise in the data itself (address fuzzy-F1 is 0.91 despite a low exact score).
## Built with
- PaddleOCR — text detection and recognition
- LayoutLMv3 (`microsoft/layoutlmv3-base`), fine-tuned for token classification
- Hugging Face Transformers + Gradio
## Author
**Tanishq Arya** — [GitHub](https://github.com/Tanishqarya17)
Full project details, training code, and analysis on the
[GitHub repository](https://github.com/Tanishqarya17/Receipt-Entity-Extractor).
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference