product-recognition-demo/recognization/docs/research/2026-09-29-shelf-intelligence/evidence/ocr-ablation-initial.json
tngo 0cf64a18bf Coverage-first live labelling, merged catalog, shelf-intelligence decision
The live path abstained too much: a detected product whose best candidate
missed the accept line was left blank, so a shelf where 59% of in-catalog
facings were shown read as broken. Show the best candidate immediately as
`provisional`, keep the track re-classifiable so a later attempt upgrades or
corrects it, and never blank a label already on screen.

- identity.py / identity_lanes.py: every decision now carries
  `provisional_sku` - the row the evidence supports well enough to show,
  separate from `best_sku`, which still means "cleared the gate". The accept
  line does not move: far-unknown false accepts stay at 0.066%.
- live.py: a below-gate candidate labels the track with
  `identity_level: provisional` and `confirmed = False`, so the planner and
  the crop lane keep offering it. Accepted labels stay frozen. Inherited
  provisional labels stay re-classifiable.
- Clients render provisional distinctly (amber chip, dashed box) via
  `LiveScanOverlayPolicy.isProvisional(identity)`, which now reads the wire
  level instead of only the state.
- build_stock_all.py merges stock, stock-lopia, stock-mediya and
  stock-milk150 into stock-all (111 images, 60 SKUs). The server could only
  read one folder, so anything outside it came back blank. stock-demo is
  byte-identical to mediya+milk150 and is not a source.

Measured on add/image6.jpg at live resolution: in-catalog facings shown
59.4% -> 86.0%, correct shown 38 -> 55, precision 97.4% -> 87.3%. On the
wire at 8fps 0.5x: 65 of 79 tracks labelled, 742 accepted + 309 provisional
observations, first label 1.27s.

docs/research/2026-09-29-shelf-intelligence/ carries the experiments and the
decision: group signals (combined AUC 0.991 sibling / 0.990 unrelated),
OCR scheduling (group representatives cut calls 4.4x and wall 3.3x), and the
finding that group propagation damages more labels than it rescues on this
shelf, so groups schedule compute rather than overwrite labels.

331 tests pass.
2026-09-29 13:45:14 +09:00

1306 lines
No EOL
26 KiB
JSON

{
"provenance": {
"code": "fbf31d74feb12538dc07207cb80722dac38dd438",
"catalog": "1bc3c1d10087f92192b8081a007fa72b4f091446c273a0ab3825cbed9bdf602c",
"labels": "6fc1a220a97c75666882b4bcd9dc102ed08c8924677b97d615850a0983286c1a",
"image": "a08b89ba37d27c9d5a81bcd56bcd042e6baf54d2f182bbaaf47e97f14c9cd525",
"opencv_threads": 1,
"seed": 20260929
},
"arms": {
"full": {
"every_attempt": {
"individual": {
"facings": 109,
"catalog_facings": 64,
"shown": 61,
"correct": 52,
"wrong": 9,
"visible_coverage": 0.5596330275229358,
"correct_coverage": 0.8125,
"precision": 0.8524590163934426,
"false_label_rate": 0.08256880733944955,
"unknown_false_accepts": 7,
"unknown_total": 45,
"sibling_confusions": 0,
"wrong_catalog": 2,
"blank_ratio": 0.44036697247706424,
"rescued_correct": 0,
"corrected_wrong": 0,
"damaged_correct": 0
},
"group": {
"facings": 109,
"catalog_facings": 64,
"shown": 63,
"correct": 55,
"wrong": 8,
"visible_coverage": 0.5779816513761468,
"correct_coverage": 0.859375,
"precision": 0.873015873015873,
"false_label_rate": 0.07339449541284404,
"unknown_false_accepts": 7,
"unknown_total": 45,
"sibling_confusions": 0,
"wrong_catalog": 1,
"blank_ratio": 0.42201834862385323,
"rescued_correct": 2,
"corrected_wrong": 1,
"damaged_correct": 0
},
"ocr_calls": 218,
"ocr_calls_per_facing": 2.0,
"ocr_ms_serial_projection": 4631.7,
"matcher_calls": 218,
"matcher_ms_serial_projection": 2932.6,
"read_coverage": 87,
"ocr_ids": [
0,
1,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100,
101,
102,
103,
104,
105,
106,
107,
108,
109,
110
],
"rescues": [
{
"id": 24,
"seed": 25,
"from": "sku_l03",
"to": "sku_l07"
},
{
"id": 28,
"seed": 25,
"from": null,
"to": "sku_l07"
},
{
"id": 73,
"seed": 67,
"from": null,
"to": "sku_l11"
}
]
},
"once_per_track": {
"individual": {
"facings": 109,
"catalog_facings": 64,
"shown": 61,
"correct": 52,
"wrong": 9,
"visible_coverage": 0.5596330275229358,
"correct_coverage": 0.8125,
"precision": 0.8524590163934426,
"false_label_rate": 0.08256880733944955,
"unknown_false_accepts": 7,
"unknown_total": 45,
"sibling_confusions": 0,
"wrong_catalog": 2,
"blank_ratio": 0.44036697247706424,
"rescued_correct": 0,
"corrected_wrong": 0,
"damaged_correct": 0
},
"group": {
"facings": 109,
"catalog_facings": 64,
"shown": 63,
"correct": 55,
"wrong": 8,
"visible_coverage": 0.5779816513761468,
"correct_coverage": 0.859375,
"precision": 0.873015873015873,
"false_label_rate": 0.07339449541284404,
"unknown_false_accepts": 7,
"unknown_total": 45,
"sibling_confusions": 0,
"wrong_catalog": 1,
"blank_ratio": 0.42201834862385323,
"rescued_correct": 2,
"corrected_wrong": 1,
"damaged_correct": 0
},
"ocr_calls": 109,
"ocr_calls_per_facing": 1.0,
"ocr_ms_serial_projection": 2315.9,
"matcher_calls": 218,
"matcher_ms_serial_projection": 2932.6,
"read_coverage": 87,
"ocr_ids": [
0,
1,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100,
101,
102,
103,
104,
105,
106,
107,
108,
109,
110
],
"rescues": [
{
"id": 24,
"seed": 25,
"from": "sku_l03",
"to": "sku_l07"
},
{
"id": 28,
"seed": 25,
"from": null,
"to": "sku_l07"
},
{
"id": 73,
"seed": 67,
"from": null,
"to": "sku_l11"
}
]
},
"ambiguous_track": {
"individual": {
"facings": 109,
"catalog_facings": 64,
"shown": 65,
"correct": 52,
"wrong": 13,
"visible_coverage": 0.5963302752293578,
"correct_coverage": 0.8125,
"precision": 0.8,
"false_label_rate": 0.11926605504587157,
"unknown_false_accepts": 11,
"unknown_total": 45,
"sibling_confusions": 0,
"wrong_catalog": 2,
"blank_ratio": 0.4036697247706422,
"rescued_correct": 0,
"corrected_wrong": 0,
"damaged_correct": 0
},
"group": {
"facings": 109,
"catalog_facings": 64,
"shown": 67,
"correct": 55,
"wrong": 12,
"visible_coverage": 0.6146788990825688,
"correct_coverage": 0.859375,
"precision": 0.8208955223880597,
"false_label_rate": 0.11009174311926606,
"unknown_false_accepts": 11,
"unknown_total": 45,
"sibling_confusions": 0,
"wrong_catalog": 1,
"blank_ratio": 0.3853211009174312,
"rescued_correct": 2,
"corrected_wrong": 1,
"damaged_correct": 0
},
"ocr_calls": 71,
"ocr_calls_per_facing": 0.6513761467889908,
"ocr_ms_serial_projection": 1187.8,
"matcher_calls": 218,
"matcher_ms_serial_projection": 2932.6,
"read_coverage": 49,
"ocr_ids": [
6,
7,
8,
9,
14,
16,
22,
24,
25,
26,
27,
28,
29,
30,
31,
32,
38,
41,
43,
46,
47,
48,
53,
57,
58,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
83,
84,
85,
86,
88,
89,
90,
91,
92,
93,
95,
96,
98,
99,
100,
101,
102,
103,
104,
105,
106,
107,
108,
109,
110
],
"rescues": [
{
"id": 24,
"seed": 25,
"from": "sku_l03",
"to": "sku_l07"
},
{
"id": 28,
"seed": 25,
"from": null,
"to": "sku_l07"
},
{
"id": 73,
"seed": 67,
"from": null,
"to": "sku_l11"
}
]
},
"group_representative": {
"individual": {
"facings": 109,
"catalog_facings": 64,
"shown": 58,
"correct": 49,
"wrong": 9,
"visible_coverage": 0.5321100917431193,
"correct_coverage": 0.765625,
"precision": 0.8448275862068966,
"false_label_rate": 0.08256880733944955,
"unknown_false_accepts": 7,
"unknown_total": 45,
"sibling_confusions": 0,
"wrong_catalog": 2,
"blank_ratio": 0.4678899082568807,
"rescued_correct": 0,
"corrected_wrong": 0,
"damaged_correct": 0
},
"group": {
"facings": 109,
"catalog_facings": 64,
"shown": 61,
"correct": 49,
"wrong": 12,
"visible_coverage": 0.5596330275229358,
"correct_coverage": 0.765625,
"precision": 0.8032786885245902,
"false_label_rate": 0.11009174311926606,
"unknown_false_accepts": 10,
"unknown_total": 45,
"sibling_confusions": 0,
"wrong_catalog": 2,
"blank_ratio": 0.44036697247706424,
"rescued_correct": 0,
"corrected_wrong": 0,
"damaged_correct": 0
},
"ocr_calls": 41,
"ocr_calls_per_facing": 0.3761467889908257,
"ocr_ms_serial_projection": 687.7,
"matcher_calls": 218,
"matcher_ms_serial_projection": 2932.6,
"read_coverage": 26,
"ocr_ids": [
9,
14,
16,
23,
24,
30,
31,
39,
41,
42,
47,
53,
57,
59,
60,
61,
62,
63,
64,
66,
69,
77,
79,
80,
83,
85,
90,
91,
93,
96,
98,
99,
102,
103,
104,
105,
106,
107,
108,
109,
110
],
"rescues": [
{
"id": 95,
"seed": 97,
"from": null,
"to": "sku_l03"
},
{
"id": 96,
"seed": 97,
"from": null,
"to": "sku_l03"
},
{
"id": 81,
"seed": 97,
"from": null,
"to": "sku_l03"
}
]
}
},
"live": {
"every_attempt": {
"individual": {
"facings": 109,
"catalog_facings": 64,
"shown": 54,
"correct": 47,
"wrong": 7,
"visible_coverage": 0.4954128440366973,
"correct_coverage": 0.734375,
"precision": 0.8703703703703703,
"false_label_rate": 0.06422018348623854,
"unknown_false_accepts": 5,
"unknown_total": 45,
"sibling_confusions": 1,
"wrong_catalog": 2,
"blank_ratio": 0.5045871559633027,
"rescued_correct": 0,
"corrected_wrong": 0,
"damaged_correct": 0
},
"group": {
"facings": 109,
"catalog_facings": 64,
"shown": 61,
"correct": 55,
"wrong": 6,
"visible_coverage": 0.5596330275229358,
"correct_coverage": 0.859375,
"precision": 0.9016393442622951,
"false_label_rate": 0.05504587155963303,
"unknown_false_accepts": 5,
"unknown_total": 45,
"sibling_confusions": 1,
"wrong_catalog": 1,
"blank_ratio": 0.44036697247706424,
"rescued_correct": 7,
"corrected_wrong": 1,
"damaged_correct": 0
},
"ocr_calls": 218,
"ocr_calls_per_facing": 2.0,
"ocr_ms_serial_projection": 3618.9,
"matcher_calls": 218,
"matcher_ms_serial_projection": 1236.3,
"read_coverage": 80,
"ocr_ids": [
0,
1,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100,
101,
102,
103,
104,
105,
106,
107,
108,
109,
110
],
"rescues": [
{
"id": 0,
"seed": 1,
"from": null,
"to": "sku_l01"
},
{
"id": 11,
"seed": 13,
"from": null,
"to": "sku_l03"
},
{
"id": 24,
"seed": 25,
"from": "sku_l03",
"to": "sku_l07"
},
{
"id": 28,
"seed": 25,
"from": null,
"to": "sku_l07"
},
{
"id": 43,
"seed": 42,
"from": null,
"to": "sku_l09"
},
{
"id": 69,
"seed": 67,
"from": null,
"to": "sku_l11"
},
{
"id": 73,
"seed": 67,
"from": null,
"to": "sku_l11"
},
{
"id": 75,
"seed": 67,
"from": null,
"to": "sku_l11"
}
]
},
"once_per_track": {
"individual": {
"facings": 109,
"catalog_facings": 64,
"shown": 54,
"correct": 47,
"wrong": 7,
"visible_coverage": 0.4954128440366973,
"correct_coverage": 0.734375,
"precision": 0.8703703703703703,
"false_label_rate": 0.06422018348623854,
"unknown_false_accepts": 5,
"unknown_total": 45,
"sibling_confusions": 1,
"wrong_catalog": 2,
"blank_ratio": 0.5045871559633027,
"rescued_correct": 0,
"corrected_wrong": 0,
"damaged_correct": 0
},
"group": {
"facings": 109,
"catalog_facings": 64,
"shown": 61,
"correct": 55,
"wrong": 6,
"visible_coverage": 0.5596330275229358,
"correct_coverage": 0.859375,
"precision": 0.9016393442622951,
"false_label_rate": 0.05504587155963303,
"unknown_false_accepts": 5,
"unknown_total": 45,
"sibling_confusions": 1,
"wrong_catalog": 1,
"blank_ratio": 0.44036697247706424,
"rescued_correct": 7,
"corrected_wrong": 1,
"damaged_correct": 0
},
"ocr_calls": 109,
"ocr_calls_per_facing": 1.0,
"ocr_ms_serial_projection": 1809.4,
"matcher_calls": 218,
"matcher_ms_serial_projection": 1236.3,
"read_coverage": 80,
"ocr_ids": [
0,
1,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100,
101,
102,
103,
104,
105,
106,
107,
108,
109,
110
],
"rescues": [
{
"id": 0,
"seed": 1,
"from": null,
"to": "sku_l01"
},
{
"id": 11,
"seed": 13,
"from": null,
"to": "sku_l03"
},
{
"id": 24,
"seed": 25,
"from": "sku_l03",
"to": "sku_l07"
},
{
"id": 28,
"seed": 25,
"from": null,
"to": "sku_l07"
},
{
"id": 43,
"seed": 42,
"from": null,
"to": "sku_l09"
},
{
"id": 69,
"seed": 67,
"from": null,
"to": "sku_l11"
},
{
"id": 73,
"seed": 67,
"from": null,
"to": "sku_l11"
},
{
"id": 75,
"seed": 67,
"from": null,
"to": "sku_l11"
}
]
},
"ambiguous_track": {
"individual": {
"facings": 109,
"catalog_facings": 64,
"shown": 56,
"correct": 49,
"wrong": 7,
"visible_coverage": 0.5137614678899083,
"correct_coverage": 0.765625,
"precision": 0.875,
"false_label_rate": 0.06422018348623854,
"unknown_false_accepts": 5,
"unknown_total": 45,
"sibling_confusions": 1,
"wrong_catalog": 2,
"blank_ratio": 0.4862385321100917,
"rescued_correct": 0,
"corrected_wrong": 0,
"damaged_correct": 0
},
"group": {
"facings": 109,
"catalog_facings": 64,
"shown": 61,
"correct": 55,
"wrong": 6,
"visible_coverage": 0.5596330275229358,
"correct_coverage": 0.859375,
"precision": 0.9016393442622951,
"false_label_rate": 0.05504587155963303,
"unknown_false_accepts": 5,
"unknown_total": 45,
"sibling_confusions": 1,
"wrong_catalog": 1,
"blank_ratio": 0.44036697247706424,
"rescued_correct": 5,
"corrected_wrong": 1,
"damaged_correct": 0
},
"ocr_calls": 83,
"ocr_calls_per_facing": 0.7614678899082569,
"ocr_ms_serial_projection": 1205.5,
"matcher_calls": 218,
"matcher_ms_serial_projection": 1236.3,
"read_coverage": 54,
"ocr_ids": [
6,
7,
8,
9,
14,
16,
17,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
36,
38,
41,
43,
46,
47,
48,
53,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100,
101,
102,
103,
104,
105,
106,
107,
108,
109,
110
],
"rescues": [
{
"id": 24,
"seed": 25,
"from": "sku_l03",
"to": "sku_l07"
},
{
"id": 28,
"seed": 25,
"from": null,
"to": "sku_l07"
},
{
"id": 43,
"seed": 42,
"from": null,
"to": "sku_l09"
},
{
"id": 69,
"seed": 67,
"from": null,
"to": "sku_l11"
},
{
"id": 73,
"seed": 67,
"from": null,
"to": "sku_l11"
},
{
"id": 75,
"seed": 67,
"from": null,
"to": "sku_l11"
}
]
},
"group_representative": {
"individual": {
"facings": 109,
"catalog_facings": 64,
"shown": 63,
"correct": 55,
"wrong": 8,
"visible_coverage": 0.5779816513761468,
"correct_coverage": 0.859375,
"precision": 0.873015873015873,
"false_label_rate": 0.07339449541284404,
"unknown_false_accepts": 8,
"unknown_total": 45,
"sibling_confusions": 0,
"wrong_catalog": 0,
"blank_ratio": 0.42201834862385323,
"rescued_correct": 0,
"corrected_wrong": 0,
"damaged_correct": 0
},
"group": {
"facings": 109,
"catalog_facings": 64,
"shown": 64,
"correct": 56,
"wrong": 8,
"visible_coverage": 0.5871559633027523,
"correct_coverage": 0.875,
"precision": 0.875,
"false_label_rate": 0.07339449541284404,
"unknown_false_accepts": 8,
"unknown_total": 45,
"sibling_confusions": 0,
"wrong_catalog": 0,
"blank_ratio": 0.4128440366972477,
"rescued_correct": 1,
"corrected_wrong": 0,
"damaged_correct": 0
},
"ocr_calls": 49,
"ocr_calls_per_facing": 0.44954128440366975,
"ocr_ms_serial_projection": 675.6,
"matcher_calls": 218,
"matcher_ms_serial_projection": 1236.3,
"read_coverage": 30,
"ocr_ids": [
9,
14,
16,
17,
23,
25,
30,
31,
32,
35,
36,
39,
41,
45,
47,
53,
56,
57,
59,
60,
61,
62,
63,
64,
65,
70,
77,
78,
79,
80,
81,
84,
85,
88,
90,
91,
93,
96,
98,
99,
102,
103,
104,
105,
106,
107,
108,
109,
110
],
"rescues": [
{
"id": 73,
"seed": 67,
"from": null,
"to": "sku_l11"
}
]
}
}
}
}