product-recognition-demo/recognization/code
tngo ff11529476
Some checks failed
tests / model-free (pull_request) Has been cancelled
fix: cut whole quantity tokens, and gate the fill-in by default
Review 2, item 2. The first version of this gate counted bigrams with a
non-digit character, which let the unit's own letters through: "400g 50%"
left "0G" and "0%", "450g カロリー50%" left "0%", and "500ml" left
"0M". All three still named products.

The quantity token is now cut whole - digits plus unit, in either script -
before counting, and the floor is three bigrams rather than two, because
"カロリ" is two and it is a descriptor every low-calorie package prints.

DecisionPolicy.decide gated the fill-in only when a read was passed, so the
unsafe behaviour was the default. Omitting the read now means no fill-in: a
caller with a ranking and no read has not shown the text can name anything.
TextLane.carries_identity was a dead duplicate of the module function; deleted.

Tests: the five cases from the review plus the default-gate case. Suite 284 ->
286. Evaluator unchanged: local 61%/77% full, 59%/95% live.
2026-09-28 23:46:03 +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 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
build_store_from_shelf.py fix: require explicit safe shelf enrollment paths 2026-09-28 13:41:43 +09:00
collect_shelf_images.py feat: a live path that uses the enrolled store, and a demo server a phone can reach 2026-09-25 10:51:57 +09:00
detector.py refactor: make the matcher and detector safe for concurrent clients 2026-09-24 11:43:24 +09:00
empty_shelf_detector.py
engine.py perf: read each package once per track, not once per attempt 2026-09-28 23:25:09 +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
eval_identity.py feat: refuse a label file whose rows carry no provenance 2026-09-28 23:31:53 +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 feat: recognition server API, reference stream client, and live label memory 2026-09-24 12:31:17 +09:00
finetune_identity.py fix: refuse unavailable gallery and pin head trainer 2026-09-28 14:41:57 +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: cut whole quantity tokens, and gate the fill-in by default 2026-09-28 23:46:03 +09:00
inventory.py
live.py perf: read each package once per track, not once per attempt 2026-09-28 23:25:09 +09:00
ocr.py feat: add bounded crop evidence and keyed gallery cache 2026-09-28 15:49:34 +09:00
rebuild_catalog.py fix: read --shelf-tags before the catalog swap 2026-09-28 23:03:08 +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 fix: record and require the walk identity backend 2026-09-28 14:42:03 +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 fix: restore reliable authenticated live recognition 2026-09-28 12:38:15 +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: cut whole quantity tokens, and gate the fill-in by default 2026-09-28 23:46:03 +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 perf: read each package once per track, not once per attempt 2026-09-28 23:25:09 +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 docs: API contract, README for the server and live mode, real-model test 2026-09-24 12:46:54 +09:00
test_rebuild_catalog.py fix: read --shelf-tags before the catalog swap 2026-09-28 23:03:08 +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 fix: record and require the walk identity backend 2026-09-28 14:42:03 +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_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: 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