product-recognition-demo/recognization/code
kiyo9w 383ff9cf2d feat: two demo shelves, enrolled, plus the price-card filter they forced out
Two real store photographs, chosen for density and for products that look different
from each other, each with its own enrolled store:

  demo-images/demo-image-1-mediya-dairy.jpg   CC0        MEDIYA dairy case
      21 products kept (13 price cards dropped), 16 recognised, all 14 products named
  demo-images/demo-image-2-milk-case.jpg      CC BY 2.0  supermarket milk case
      56 detections, 49 recognised, all 13 products named

Both were enrolled the way a store would be: the products were read off a contact
sheet of the detections, their crops became the store's gallery (stock-mediya,
stock-milk150), and a head was trained on them. `build_store_from_shelf.py` is that
flow.

The filter came out of the first image. Every Japanese supermarket photo has the same
artifact: the detector boxes the shelf-edge price cards as products, because a card is
roughly the shape of a pack - 13 of 34 detections on image 1 were cards. Their text
separates them cleanly: a card's characters are 30-44% digits and it prints the
tax-excluded price (本体), while a product's are 3-19% digits. Cards are now dropped
before classification, and the count is reported as `price_cards_dropped` rather than
hidden.

demo-images/README.md records how to run both, what the demo shows, and the honest
caveat: both shelves are enrolled, so the recognition rate is in-distribution - what
the app does on a shelf it has been onboarded to, not on one it has never seen.

175 tests pass.

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-25 09:34:29 +09:00
..
web feat: price-tag UI, still-image tag passes, and honest tag evidence 2026-09-24 14:11:23 +09:00
__init__.py
app.py feat: two demo shelves, enrolled, plus the price-card filter they forced out 2026-09-25 09:34:29 +09:00
bench_engine.py feat: recognition engine and session tracker for multi-client serving 2026-09-24 11:52:59 +09:00
bench_identity.py feat: a multi-view embedding gallery, because one template per SKU cannot work 2026-09-24 23:43:27 +09:00
bench_shelf_map.py feat: a shelf map, so a facing outlives the track id that found it 2026-09-25 01:54:38 +09:00
benchmark.py
build_store_from_shelf.py feat: two demo shelves, enrolled, plus the price-card filter they forced out 2026-09-25 09:34:29 +09:00
collect_shelf_images.py test: evaluate on 54 real store photos the pipeline has never seen 2026-09-25 02:21:00 +09:00
demo.py perf: bound OCR so a walking scan stays real-time, and add walk pacing 2026-09-24 18:14:32 +09:00
demo_replay.py chore: the film-making shortcut leaves the server, and failures stop hiding 2026-09-25 01:30:16 +09:00
detector.py
download_stock.py
empty_shelf_detector.py
engine.py feat: a store's fine-tuned head, and the two-stage gate it needs 2026-09-25 03:21:22 +09:00
eval_external_images.py test: evaluate on 54 real store photos the pipeline has never seen 2026-09-25 02:21:00 +09:00
fast_test.py
feature_matcher.py feat: recognition server API, reference stream client, and live label memory 2026-09-24 12:31:17 +09:00
finetune_identity.py feat: a store's fine-tuned head, and the two-stage gate it needs 2026-09-25 03:21:22 +09:00
gallery.py feat: a store's fine-tuned head, and the two-stage gate it needs 2026-09-25 03:21:22 +09:00
gui_app.py
identity.py feat: identity decision contract and session-local observation model 2026-09-24 11:43:41 +09:00
inventory.py
live.py chore: the film-making shortcut leaves the server, and failures stop hiding 2026-09-25 01:30:16 +09:00
observe.py feat: identity decision contract and session-local observation model 2026-09-24 11:43:41 +09:00
ocr.py feat: OCR engine, price-tag geometry, and the cached tag pass 2026-09-24 13:52:15 +09:00
orb.py
pipeline.py feat: identity decision contract and session-local observation model 2026-09-24 11:43:41 +09:00
reconcile.py fix: a tag may not accuse on weak evidence, nor name a distant product 2026-09-25 01:30:03 +09:00
record.py feat: record a live session so it can become data 2026-09-25 01:34:15 +09:00
shelf_map.py feat: a shelf map, so a facing outlives the track id that found it 2026-09-25 01:54:38 +09:00
stream_client.py feat: recognition server API, reference stream client, and live label memory 2026-09-24 12:31:17 +09:00
suft.py
tag_cards.py fix: the number on the tag is the regular price, and a price must be corroborated 2026-09-25 01:29:46 +09:00
tags.py fix: the number on the tag is the regular price, and a price must be corroborated 2026-09-25 01:29:46 +09:00
test.py
test_api.py test: defend the live session and the server API 2026-09-24 12:44:54 +09:00
test_demo.py feat: a synthetic store walk, and the live tuning it forced out 2026-09-24 18:09:23 +09:00
test_empty.py
test_engine.py test: defend engine and tracking contracts 2026-09-24 12:43:32 +09:00
test_gallery.py feat: a multi-view embedding gallery, because one template per SKU cannot work 2026-09-24 23:43:27 +09:00
test_image.py
test_live.py test: the live tag fixture carries a tax-included price 2026-09-25 01:30:28 +09:00
test_observe.py feat: identity decision contract and session-local observation model 2026-09-24 11:43:41 +09:00
test_ocr_tags.py fix: the number on the tag is the regular price, and a price must be corroborated 2026-09-25 01:29:46 +09:00
test_real_model.py docs: API contract, README for the server and live mode, real-model test 2026-09-24 12:46:54 +09:00
test_reconcile.py fix: a tag may not accuse on weak evidence, nor name a distant product 2026-09-25 01:30:03 +09:00
test_record.py feat: record a live session so it can become data 2026-09-25 01:34:15 +09:00
test_shelf_map.py feat: a shelf map, so a facing outlives the track id that found it 2026-09-25 01:54:38 +09:00
test_suite.py
test_tag_cards.py fix: the number on the tag is the regular price, and a price must be corroborated 2026-09-25 01:29:46 +09:00
test_tag_identity.py fix: a tag may not accuse on weak evidence, nor name a distant product 2026-09-25 01:30:03 +09:00
test_tracking.py test: defend engine and tracking contracts 2026-09-24 12:43:32 +09:00
tracking.py fix: use the tracker imports that exist in ultralytics 8.4.153 2026-09-24 13:36:50 +09:00
train.py
yolo_adapter.py feat: identity decision contract and session-local observation model 2026-09-24 11:43:41 +09:00