product-recognition-demo/recognization/data/external-eval
kiyo9w e25fcda67d fix(eval): confirm a leak signature before calling it one, and score external sets in code
Enrolling a packshot from an external set is normal - it is how F-12 was
closed - and it silently turns one of those rows into training data. The
external sets were scored by an ad-hoc script that never checked, so
sku_l06_1.jpg was being reported as a held-out correct accept while being
byte-identical to the enrolled view.

code/eval_external.py now scores those sets with the same leaked() check the
shelf evaluator runs, and refuses a row that has since been enrolled.

That check needed fixing first. Its 64x64 signature fires on two different
photographs of the same product: the l09 rear label from a retailer page sits
19.5 from the enrolled front packshot, under the 20.0 line, while being a
different photograph (resized MAD 26.3). A signature hit is now confirmed by
correlation - a genuine re-cut, re-encode or rescale correlates at 0.99+, that
pair at 0.28 - so the two signals together are decisive where either alone is
not. Verified against both directions: identical, q55 re-encode and 700px
rescale are caught; the different-photo pair is not.

Also adds the van backend (always-argmax, no gate) so the stream comparison in
DECISION.md is reproducible rather than asserted, with two tests pinning that
it answers where the shipped gate abstains and still refuses an empty score set.

External result on the corrected basis: 19 scored, 12 correct, 7 abstain,
0 false accepts, 1 leak excluded. Suite 307 -> 309.
2026-09-29 03:29:56 +09:00
..
kewpie fix(eval): confirm a leak signature before calling it one, and score external sets in code 2026-09-29 03:29:56 +09:00
l12-reconciliation test(external): score 8 independent-source images, 0 false accepts 2026-09-29 03:13:16 +09:00
other-mayo fix(eval): confirm a leak signature before calling it one, and score external sets in code 2026-09-29 03:29:56 +09:00
tier3-sources test(external): score 8 independent-source images, 0 false accepts 2026-09-29 03:13:16 +09:00
README.md test(external): score 8 independent-source images, 0 false accepts 2026-09-29 03:13:16 +09:00

External evidence (2026-09-29)

Independent-source media used to stress the identity pipeline. None of this is Tier 2. DECISION.md's Tier 2 is a second labelled store visit; these are external_proxy artifacts, and every manifest here says so.

Directory What it holds
other-mayo/ 8 accepted images for sku_l04, sku_l07, sku_l09 from 6 source domains, plus the scored result
l12-reconciliation/ What sku_l12 actually is, from the shelf tag and package pixels
kewpie/ Kewpie 450 g research (the near-unknown case)
tier3-sources/ Two reusable pan clips and 11 rejected candidates for a future Tier-3 replay

Leak test

Every accepted image was template-matched against add/image6.jpg. Highest score across all 8 is 0.675 (sku_l07_1), and the 0.95+ band that identifies a crop of the evaluation photo is empty. The images are genuinely external.

Result: 8 images, 0 false accepts

Scored through the shipped LocalLaneAdapter + DecisionPolicy against stock-lopia-clean (other-mayo/eval_result.json):

Verdict Count Files
Correct accept 4 sku_l07_1, sku_l07_2, sku_l09_1, sku_l09_2
Abstain 4 all sku_l04_*
False accept 0 —

Two things this establishes that the image6 shelf cannot:

  • sku_l07 is answered with no enrolled image. Both l07 images accept through the text lane alone: sku_l07_1 reads ラッキー フヨネーズ, and sku_l07_2 reads the rear label's 製造者:丸和油脂株式会社 with 内容量:200g. The catalog row is 丸和油脂 ラッキーマヨネーズ 200g, so the manufacturer and the size together name it. This is the text lane's coverage claim - that a product with no reference image can still be named - holding on data that was not used to build it.
  • The l04 abstentions are correct behaviour, not a miss. l04 has no enrolled image either, and its reads are weak: sku_l04_2 reads only コと旨 タ 味 (all rows score 0.0), and sku_l04_4 reads the rear label with やまや garbled to まや, scoring 0.379 - below the accept line. Abstaining on a weak read is the designed outcome.

sku_l07_2 accepts with a negative local score (-0.55) on text evidence alone. That is the lane doing its job, but it is worth naming: the accept rests on two matched tokens (manufacturer + size), not on geometry.

What is still missing

No external source gives per-SKU identity for the whole catalog, and no reusable clip combines the target category with shelf-distance text resolution. The Tier-2 and Tier-3 gates in DECISION.md still need the operator's own recorded walks.