Receipt Sorter:Hacktoberfest 開源 AI 挑戰第 2 週作品
Week 2 Dev Challenge
Receipt Sorter 是 Hacktoberfest Open-Source AI Challenge 第 2 週的參賽作品,將收據及發票整理成報税檔案,並抽取資料寫入 ledger.csv。預設使用 Qwen2.5-VL 7B,透過 Ollama 在本機推理;缺少日期或總額的文件會移至 needs-review/,不會猜測。
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle
What I Built
Receipt Sorter is a local-first tool that turns a messy folder of receipts and invoices into a clean, tax-ready archive. It’s for freelancers and solo consultants.
Point it at a folder of photos and PDFs. A vision model running on your own laptop reads each document and extracts the vendor, date, total, currency, tax and expense category. Each file is then renamed (2026-03-14_Notion-Labs_16.00.png), filed under year/category/, and logged in a ledger.csv you can hand to an accountant. Anything with a missing date or total goes to a needs-review/ folder instead of being guessed at.
Who would pay: a freelancer whose receipts are scattered across Downloads, WhatsApp and email attachments, and who loses a weekend to retyping them at tax time. Their invoices also show client names and rates, so many of them won’t upload those to a cloud service. I’d sell it at $29 one-time, or $9 a year for updated category packs (GST, VAT, US Schedule C).
How I Built It
Open-weight model: Qwen2.5-VL 7B by default (gemma3:12b or any Ollama vision model works with --model).
1.Local inference: Ollama, called over its local HTTP API.
2.Structured output: I pass a JSON schema to Ollama’s format parameter, so the model can only return valid, typed fields, with the category restricted to a fixed list. Temperature is 0, so the same receipt gives the same result.
3.Routing: images go straight to the vision model. Text PDFs are extracted with pdftotext and sent as text, which is faster and more accurate than rasterizing them.
4.Safe failure: a missing date or a zero total sends the file to needs-review/ rather than filing a wrong guess under a tax year.
Why Does Open Innovation Matter?
1.Privacy is the product. Receipts reveal clients, rates and travel. With a local open-weight model, nothing leaves the machine, which a cloud API can’t promise.
2.The economics only work with local inference. A closed vision API charges per image forever. That would force me into a subscription, and the freelancer would pay for every receipt they scan. Running on the customer’s own hardware lets me sell a one-time license, and my cost per receipt is zero.
3.No lock-in. If a better small vision model comes out, users change one flag. A hosted model that is deprecated or repriced can break a product overnight.
4.Room to specialize. General APIs handle locale-specific paperwork poorly, such as Indian GST invoices, DD/MM dates and mixed-language line items. Open weights can be fine-tuned on exactly that niche, which is where a small product can beat a general one.
Prize Categories
Best Use of Gemma: Receipt Sorter uses Gemma, Google's open-weight multimodal model, running locally through Ollama to read receipt photos and invoices. Running it on the user's own laptop keeps client data private and means there is no per-receipt API cost.
來源:DEV Community · dev.to