bhimrazy/receipt-ocr

An efficient OCR engine for receipt image processing.

What it solves

It simplifies the process of converting receipt images into usable data. It provides two paths: extracting raw text from an image using Tesseract OCR and extracting structured, machine-readable JSON data (like merchant name, date, and line items) using Large Language Models (LLMs).

How it works

The project is split into two modules:

  1. Receipt OCR Module: This uses LLM providers (such as OpenAI, Google Gemini, or Groq) to analyze receipt images and parse them into a specific JSON schema. It can be used via a CLI, a Python library, or a FastAPI web service.
  2. Tesseract OCR Module: This uses the Tesseract OCR engine to perform raw text extraction from images, providing a simpler text-only output via CLI or a Docker-based API.

Who it’s for

  • Developers building expense tracking or accounting software.
  • Users who need to automate the digitization of physical receipts.
  • Teams requiring a production-ready REST API for receipt processing.

Highlights

  • Multi-LLM Support: Compatible with OpenAI, Gemini, and Groq.
  • Customizable Extraction: Allows users to define their own JSON schemas for the data they want to extract.
  • Flexible Deployment: Can be run as a local Python package, a CLI tool, or deployed as a Dockerized FastAPI service.
  • Dual Extraction Modes: Offers both raw text extraction (Tesseract) and structured data extraction (LLM).

Related

  • Project
  • Project
  • Project
  • Project
  • Project