product-recognition-demo/recognization/code
kiyo9w ddead84546 fix(identity): veto a local answer the read contradicts on package size
The documented near-unknown case could not be rejected. Crops 82-97 of
add/image6.jpg are Kewpie 450g bags the catalog does not hold, and they read
'マヨネーズ 450g'. Every mayonnaise row explains 'マヨネーズ' equally, so the
text ranking ties at 1.0 and the strict-greater veto in DecisionPolicy never
fires - the local lane's answer stood and the bag was labelled as a catalog
row. No amount of IDF tuning fixes this: the veto compares two catalog rows,
and the crop's product is not one of them.

The size is the part that differs and the part printed plainly, so the policy
now checks it. Only a mass in PACKAGE_MASS_RANGE counts: below it are
fragments of a longer number ('20' out of '200g') and above it are two numbers
run together ('5210' out of '210g'), and vetoing on either would cost correct
answers. Percentages are excluded for the same reason - 'カロリー 50% カット'
is a claim about the contents, not a 50 g package.

The veto also blocks the text lane's fill-in, or it would only move the
answer: the local row is blocked and the text lane then names that same row.

Measured on the corrected image6 labels, local lane at full resolution:
precision 86% -> 91%, false accepts 8 -> 5, coverage unchanged at 79%. At live
resolution 95% and 2 false accepts, unchanged. 307 tests pass.
2026-09-29 03:04:21 +09:00
..
web fix: restore reliable authenticated live recognition 2026-09-28 12:38:15 +09:00
__init__.py
app.py feat(identity): local-feature matcher plus text lane as the default backend 2026-09-28 22:27:21 +09:00
bench_engine.py
bench_identity.py
build_store_from_shelf.py fix: require explicit safe shelf enrollment paths 2026-09-28 13:41:43 +09:00
collect_shelf_images.py fix(catalog): correct sku_l10 to 400g and enroll its packshot 2026-09-29 02:45:21 +09:00
detector.py
empty_shelf_detector.py
engine.py Improve identity lanes: text evidence floor, motion-compensated labels 2026-09-29 02:08:23 +09:00
eval_external_images.py fix(catalog): correct sku_l10 to 400g and enroll its packshot 2026-09-29 02:45:21 +09:00
eval_identity.py Fix the decision ceiling to count enrolled facings only 2026-09-29 02:09:46 +09:00
eval_live.py docs: name the local lane in the evaluators' own lane vocabulary 2026-09-28 22:34:06 +09:00
feature_matcher.py
finetune_identity.py fix(catalog): correct sku_l10 to 400g and enroll its packshot 2026-09-29 02:45:21 +09:00
gallery.py feat(identity): local-feature matcher plus text lane as the default backend 2026-09-28 22:27:21 +09:00
identity.py feat(identity): local-feature matcher plus text lane as the default backend 2026-09-28 22:27:21 +09:00
identity_lanes.py fix(identity): veto a local answer the read contradicts on package size 2026-09-29 03:04:21 +09:00
inventory.py
live.py Improve identity lanes: text evidence floor, motion-compensated labels 2026-09-29 02:08:23 +09:00
ocr.py feat: add bounded crop evidence and keyed gallery cache 2026-09-28 15:49:34 +09:00
rebuild_catalog.py Enroll from a repo data dir; read packshots in every orientation 2026-09-29 02:33:47 +09:00
reconcile.py
record.py fix: record and require the walk identity backend 2026-09-28 14:42:03 +09:00
score_stream.py Fix label frame mapping and reference upscaling; add the stream G1 harness 2026-09-29 00:30:17 +09:00
shelf_map.py
stream_client.py Fix label frame mapping and reference upscaling; add the stream G1 harness 2026-09-29 00:30:17 +09:00
tag_cards.py fix: restore reliable authenticated live recognition 2026-09-28 12:38:15 +09:00
tags.py fix: bind tag projection to each frame origin 2026-09-28 14:41:49 +09:00
test_api.py feat(identity): local-feature matcher plus text lane as the default backend 2026-09-28 22:27:21 +09:00
test_engine.py fix(identity): veto a local answer the read contradicts on package size 2026-09-29 03:04:21 +09:00
test_eval_labels.py feat: refuse a label file whose rows carry no provenance 2026-09-28 23:31:53 +09:00
test_eval_live.py fix: record and require the walk identity backend 2026-09-28 14:42:03 +09:00
test_gallery.py fix: serialize gallery inference so Metal cannot be entered twice 2026-09-28 17:22:55 +09:00
test_identity.py refactor: delete the legacy session model 2026-09-28 17:47:50 +09:00
test_live.py Improve identity lanes: text evidence floor, motion-compensated labels 2026-09-29 02:08:23 +09:00
test_ocr_tags.py fix: bind tag projection to each frame origin 2026-09-28 14:41:49 +09:00
test_real_model.py
test_rebuild_catalog.py Enroll from a repo data dir; read packshots in every orientation 2026-09-29 02:33:47 +09:00
test_reconcile.py
test_record.py fix: record and require the walk identity backend 2026-09-28 14:42:03 +09:00
test_shelf_map.py
test_tag_cards.py
test_tag_identity.py
test_tracking.py
tracking.py fix: restore reliable authenticated live recognition 2026-09-28 12:38:15 +09:00
train.py
transport.py fix: guard reserved sessions and bounded response state 2026-09-28 13:41:35 +09:00