product-recognition-demo/recognization/stock-lopia/stock.csv
kiyo9w 52905e73f6 feat: let the shelf's own price tag name the product
Stage 2 of the plan is "identity as retrieval", so the first thing measured was
whether retrieval can even work here. It cannot, on its own: an off-the-shelf
DINOv2 embedding does group identical products (two orange juices, two apple
juices, two almond drinks) but the fine-grained cases collapse - 32 cartons into
one cluster, and nine different bottled drinks grouped by *container shape*. That
matches the literature (RP2K, RPC all fine-tune; nobody ships off-the-shelf
features for SKU identity).

Meanwhile the shelf has been carrying the answer. Every product has a tag printed
under it, and the tag spells the product's name out in clean text, once per
product - the store's own label. This adds that as an identity channel:

- a tag with a readable name is matched against the catalog by name similarity;
- facings are assigned to the *nearest tag along their row* (the tags mark where
  products sit), not by geometric grouping, which was measured to merge different
  products into a 945 px "product" that then swallowed the wrong tag;
- rows are clustered first, because the same column on six shelves would
  otherwise become one product.

Then the demo catalog itself had to be fixed: it listed another store's products
(senbei, Tropicana) while the shelf holds mayonnaise, so nothing could match. The
catalog for this shelf was read off the tags - 12 products with names and prices -
and the products were enrolled as packaging templates by cropping the facings the
tags had just named.

Measured through the real still path on add/image6.jpg (111 detections):

  tag named the product          28 facings   (all 28 verified correct by eye)
  packaging named the product    74 facings
  both spoke                     23 facings, agreeing 16 (69 %)
  facings with any identity      79

So packaging recognition makes a ~30 % error rate on the facings the tag can
check, and every disagreement carried a low packaging score. The tag therefore
wins a conflict, and the conflict is recorded (`identity_conflict`) instead of
hidden - a product whose tag says one thing and whose packaging says another is a
real finding, not noise to suppress.

144 tests pass; test_tag_identity.py adds 6.

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-24 23:28:36 +09:00

1.2 KiB

1SKU_IDproduct_namereceipt_dateexpiration_datenumber_innumber_outnumber_onimage_linkprice
2sku_l01キューピー エッグケア 305g2026-09-182026-12-20361224''349
3sku_l02キューピー アマニ油マヨネーズ 200g2026-09-182026-12-2024915''329
4sku_l03キューピー からしマヨネーズ 200g2026-09-182026-12-20301416''219
5sku_l04やまや めんたいマヨネーズタイプ 200g2026-09-182026-11-3018612''399
6sku_l05キューピー ゼロ ノンコレステロール 310g2026-09-202026-12-25241113''269
7sku_l06キューピー フィッテ 210g2026-09-202026-12-2518711''379
8sku_l07丸和油脂 ラッキーマヨネーズ 200g2026-09-202026-12-25241014''199
9sku_l08スパイシーストーム ペリペリミックス 30g2026-09-152027-03-151248''699
10sku_l09ピュアセレクト コクうま カロリーカット65% 360g2026-09-222026-12-28301317''209
11sku_l10ピュアセレクト マヨネーズ 450g2026-09-222026-12-28361521''222
12sku_l11キューピー ハーフマヨネーズ 450g2026-09-192026-12-22482226''269
13sku_l12焼肉のたれ 中辛2026-09-102027-02-1024816''299