Skip to content
Claude CodegreenfieldBackend28 files · +5431 −660

Build 6-agent Kirana Detective invoice auditor with YOLO26n + MiniCPM fine-tuning

Session from kirana-detective-build-traces on Hugging Face by build-small-hackathon · MIT · condensed by Coders Talk

1h 46msession
0interventions
GOAL

Build an AI invoice auditing pipeline for Indian kirana stores (Kirana Detective AI, HuggingFace hackathon), including fine-tuning YOLO26n for shelf detection and MiniCPM-V/MiniCPM5 for invoice OCR and product normalization, then implement the full 6-agent pipeline with a custom Gradio UI.

  1. Prompt · +0
    Research YOLO26n datasets for grocery detection per tasks.md, and how to generate synthetic data to fine-tune MiniCPM-V 4.6.
  2. Agent did · +0m
    Researched datasets, checked project structure/.env/PRD, and assessed the 10-day plan's robustness given only 5 days left before the deadline.
  3. Break · 1h 59m away, not counted
  4. Agent did · +3m
    Scaffolded project directories, requirements.txt, README, .gitignore, and wrote three fine-tune scripts (train_yolo26n.py, generate_invoices.py, train_minicpm_v.py, train_minicpm5_1b.py).
  5. Agent did · +17m
    Built build_catalog.py to generate a 200-SKU FMCG catalog with HSN codes and GST rates, fixing two errors (SKU count assertion, unicode print) before it ran cleanly.
  6. Prompt · +27m
    Check GST rates are current, and fix this WeasyPrint import error I hit on Windows after running generate_invoices.py.
  7. Agent did · +29m
    Fixed Tata Salt's GST rate (5% to 0%) and rewrote generate_invoices.py to use pure Pillow instead of WeasyPrint (which needed native libs unavailable on Windows), then generated all 500 synthetic invoice images.
  8. Prompt · +57m
    Modal YOLO training job failed with a libGL.so.1 import error from opencv via ultralytics.
  9. Agent did · +57m
    Added apt_install for libgl1-mesa-glx/libglib2.0-0 to the Modal image to fix the OpenGL dependency, then built storage.py (SQLite with degraded mode) and tracer.py, fixing a Windows file-lock test failure along the way.
  10. Agent did · +1h 6m
    Implemented all 6 pipeline agents (invoice extractor, product matcher, pricing, visual counter, reconciliation, savings) plus the orchestrating pipeline.py, fixing a missing dataclass field bug during smoke tests.
  11. Prompt · +1h 30m
    Proceed, but research the latest Gradio UI features first and use them properly since it's a hackathon requirement.
  12. Agent did · +1h 30m
    Researched Gradio 6.x features, built app.py using gr.Server with SSE streaming and a custom static/index.html frontend, then marked completed tasks with [x] in tasks.md at the developer's request.
  13. Outcome · +1h 46m
    All 17 core implementation tasks marked done in tasks.md; only Modal training runs (0.1-0.3) and final README/verify_models.py remain before hackathon submission.
VERDICT

Next time I'd flag the Windows-specific gotchas (WeasyPrint's native deps, SQLite file locks, libGL missing on Modal's slim image) up front in the first prompt since they cost real cycles to debug reactively. The correction that did the most work was asking it to verify plan robustness and check current GST rates before generating data — catching the wrong Tata Salt rate before I baked it into 500 synthetic invoices.

I tried this · 0

Discussion · 0

How Builds work