Inventory

From The Hei Canon

inventory is the fleet's photo-driven asset system. Point a phone at a room, upload, and the pipeline segments the items, embeds them, matches against what's already known, and — once a human confirms — commits to a PostgreSQL + Fuseki RDF knowledge graph.

Stack: Python (FastAPI) backend + SvelteKit / TailwindCSS SPA. Postgres + Fuseki. Private repo.

Pipeline

  1. Upload photo + location label to POST /scan.
  2. SAM 3.1 promptable concept segmentation (default) extracts masks, boxes, and labels — no VLM in the loop. A legacy Qwen3.5-27B VLM path is available via use_vlm / SCAN_USE_VLM=1.
  3. LCO-Embedding generates 2048-dim multimodal vectors for each crop and description.
  4. Hybrid match: 70% embedding cosine + 30% trigram text similarity against existing items.
  5. Human review — verify, reject, or correct each detection.
  6. POST /commit writes confirmed detections with three-tier deduplication and change-detection.

Web UI

Served from the FastAPI backend at http://centurion:30191. Pages: Overview (calibrated apartment digital twin with room-mapped items, smart-home device pins, power overlay, and live GPU-fleet status), Dashboard, Items (semantic + BM25 search, web-store grid), Item detail, Register, Scan, Sessions, Locations, Builds (PC-build planner), Tags, Intelligence (market-pricing dashboard), Storefront, and Ask — natural-language Q&A over the graph that routes tool calls (SPARQL SELECT, schema introspection, agent-inferred triple assertion) until it can answer, rendering show/list results as clickable photo cards.

Doctrine

Scraped and inferred data does not auto-write to the graph. Persistence requires an explicit user action — the review step exists for a reason.

Sources

  • README
  • docs/scan-pipeline.md, docs/overview.md — pipeline + digital-twin specs.

See also

  • finance — double-entry ledger over inventory's money engine.
  • legal-engine — sibling knowledge-graph service in the compliance lane.
  • ht cloud — where the Fuseki store and the API live.