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.
This commit is contained in:
parent
fbf31d74fe
commit
0cf64a18bf
171 changed files with 554214 additions and 35 deletions
|
|
@ -107,6 +107,7 @@ def _cosine_decision(
|
|||
"status": level,
|
||||
"method": method,
|
||||
"best_sku": top_sku if level == IDENTITY_ACCEPTED else None,
|
||||
"provisional_sku": top_sku,
|
||||
"score": float(top_score),
|
||||
"confidence": float(top_score),
|
||||
"identity_level": level,
|
||||
|
|
@ -200,6 +201,7 @@ def decide_identity(
|
|||
"status": IDENTITY_REJECTED,
|
||||
"method": method,
|
||||
"best_sku": None,
|
||||
"provisional_sku": None,
|
||||
"score": 0.0,
|
||||
"confidence": 0.0,
|
||||
"identity_level": IDENTITY_REJECTED,
|
||||
|
|
@ -243,6 +245,7 @@ def decide_identity(
|
|||
"status": "success" if level == IDENTITY_ACCEPTED else level,
|
||||
"method": method,
|
||||
"best_sku": best,
|
||||
"provisional_sku": top_sku if top_score > 0.0 else None,
|
||||
"score": round(top_score, 2),
|
||||
"confidence": round(top_score, 4),
|
||||
"identity_level": level,
|
||||
|
|
@ -263,6 +266,7 @@ def decide_identity(
|
|||
"status": "success" if level == IDENTITY_ACCEPTED else level,
|
||||
"method": method,
|
||||
"best_sku": best,
|
||||
"provisional_sku": top_sku if top_score > 0.0 else None,
|
||||
"score": round(top_score, 2),
|
||||
"confidence": confidence,
|
||||
"identity_level": level,
|
||||
|
|
@ -296,6 +300,7 @@ def decide_identity(
|
|||
"status": "success" if level == IDENTITY_ACCEPTED else level,
|
||||
"method": method,
|
||||
"best_sku": best,
|
||||
"provisional_sku": top_sku if top_score > 0.0 else None,
|
||||
"score": round(top_score, 2),
|
||||
"confidence": confidence,
|
||||
"identity_level": level,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue