product-recognition-demo/recognization/code
tngo 5f6de4d48a perf: read each package once per track, not once per attempt
Vision took a crop from 5 ms to 25 ms, so re-reading the same package on every
attempt was the measured cause of the live coverage collapse: 789 -> 60 crops/s
at 8 workers, and 12/8/2/6 labels on the same clip at four pacings.

The reading is now cached on the track and later attempts re-run only the local
lane. Measured through the real server on add/image6.jpg:

  saturated pool   15.9 -> 49.4 crops/s (8 workers, 64 crops)
  per crop         142 -> 92 ms on a 300x400 crop
  3 s clip, send   19.7 mean labels (15-24, unstable) -> 24.0 (23-25, stable)
  12 s clip, send  48/131 -> 53/131; result pacing 53/134 -> 50/135

The 12 s numbers are within run-to-run noise; the short clip is where the
pacing sensitivity lived and it is now flat across pacings.

An empty read is not cached - a crop too small or too blurry to read says
nothing about the next one - and the cache is cleared with the rest of the
evidence on a method change or a drift relabel, so a reading never outlives the
product it described. The native crop lane skips OCR on the same rule.

Test: OCR runs once per track while the local lane keeps running. Disabling the
skip makes it fail 2 != 1. Suite 280 -> 281.
2026-09-28 23:25:09 +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
detector.py
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
eval_identity.py feat: add Van's real baseline lane and stop size tokens naming products 2026-09-28 23:12:44 +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: 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 feat: add Van's real baseline lane and stop size tokens naming products 2026-09-28 23:12:44 +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
record.py fix: record and require the walk identity backend 2026-09-28 14:42:03 +09:00
shelf_map.py
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 feat: add Van's real baseline lane and stop size tokens naming products 2026-09-28 23:12:44 +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
test_rebuild_catalog.py fix: read --shelf-tags before the catalog swap 2026-09-28 23:03:08 +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