Skip to content

tujlaky/receipt-ocr-ollama

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Receipt Text Extractor (Ollama + Vision Model)

This Python script extracts structured text data from receipt images using Ollama and a multimodal LLM (default: llama3.2-vision).
It processes the image, sends it to the model, and returns strictly valid JSON with merchant, items, date, and totals.

Features

  • Image preprocessing: resizes large images to a max side of 1280px for efficiency.
  • Structured JSON output: always follows the same schema (merchant, items, totals, VAT, etc.).
  • Strict format: model is instructed to return only JSON (no explanations or extra text).
  • CLI usage: specify receipt image path and optional model.

About

Demo how you can build a basic tool to get info about a receipt without OCR

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages