product-recognition-demo/recognization/data
kiyo9w 5094b5f6ca fix(recognition): calibrate the accept lines against unrelated shelves
Every threshold was fitted on image6, where each crop is a facing of a product
the shelf holds, so the set could not price a false accept. Measured on 4580
crops from 64 unrelated Wikimedia shelf photos at the shipped configuration:

  LOCAL_ACCEPT 2.0 -> 4.0   false accepts 60 (1.31%) -> 3 (0.07%)
  TEXT_MIN_SHARED 2 -> 4    the two-bigram reads that named sku_l12 via おい/いし

On image6 that is 44 shown / 42 correct at full resolution - 95.5% precision,
65.6% coverage - the highest-coverage cell of the joint sweep that passes both
G2 (>= 95%) and G3 (<= 1%). At live resolution 56% end-to-end at 97%.

The text lane's evidence floor gates its answer only: zeroing the row's score
would reorder the ranking and make the margin gate compare a different pair
than the one it was measured on.

code/sweep_accept_lines.py sweeps both axes jointly through the shipped
DecisionPolicy; the earlier table swept one axis while pinning the other, so
its baseline rows were not the old line.
2026-09-29 09:28:13 +09:00
..
evaluations/2026-09-29-session test(server): verify the shipped configuration end to end 2026-09-29 04:41:52 +09:00
external-eval test(tier3): run the production pipeline over both reusable clips 2026-09-29 03:39:33 +09:00
external-shelves fix(recognition): calibrate the accept lines against unrelated shelves 2026-09-29 09:28:13 +09:00
packshots docs(packshots): record why sku_l08 could not be sourced 2026-09-29 04:34:58 +09:00
README.md Enroll from a repo data dir; read packshots in every orientation 2026-09-29 02:33:47 +09:00

Recognition data

Everything the identity work needs to be reproducible: sourced packshots, evaluation runs, and the audits that produced them. Nothing here is ephemeral; a run that matters is written here, not to a temp directory.

packshots/source/

Front packshots as downloaded, before enrollment. ATTRIBUTION.json records the source URL, the product as printed, and the manufacturer for each. ocr-reads.json holds the OCR text each image produced, so a name/OCR refusal can be re-checked without re-running Vision.

rebuild_catalog.py reads this directory and writes a catalog:

.venv/bin/python code/rebuild_catalog.py --source data/packshots/source \
    --output stock-lopia-clean --csv stock-lopia/stock.csv --min-views 1 --replace

evaluations/

One directory per session. Each holds the raw artifacts a claim was computed from, so a number in DECISION.md can be traced back to the run that produced it.

Directory Contents
stream/ WebSocket track dumps from stream_client.py, scored by score_stream.py.
still/ /v1/recognize responses for the still-image path.
catalog-audit/ rebuild_catalog.py --json reports.
scratch/ Intermediate images (rotations, crops) kept because they document a finding.

Scoring a stream dump:

.venv/bin/python code/score_stream.py data/evaluations/<session>/stream/<file>.json \
    --labels eval/labels/image6.json --stock-dir stock-lopia-clean