Product recognition demo for supermarket shelf images
Two corrections, both found by the deep review. 1. The number printed large beside the sale price is NOT the JAN's last three digits. Checked against the manufacturer, キユーピー ゼロ ノンコレステロール 310g is JAN 4901577092381 - it ends in 381, not the 357 the tag prints. The number is the regular (pre-discount) price, and all three tags on the demo shelf confirm it against their printed discount: (357-269)/357 = 24.6 % -> 2.4割引, (400-379)/400 = 5.25 % -> 0.5割引, (248-199)/248 = 19.8 % -> 1.9割引. The field is renamed `regular_price`, the barcode keeps its own name, and the discount is now a second arithmetic check alongside the tax-included price - so a tag can be checked against itself twice. 2. A price is only readable when that arithmetic corroborates it. Measured on a live walk before this: 90 tracks carried a tag marked readable, with prices of 20, 23, 36, 50, 72, 2002 and 4508. The gate has three strengths - an exact tax pair, an agreeing printed discount, or both plus agreeing digits - and `TagRecord.state` now consults it, so the wire cannot call an uncorroborated read readable. Also fixed while measuring: voting picks each field independently, so a record could publish a price from one frame beside a tax-included price from another (measured: price 149 with unit 214.92, which never appeared together - 214.92/1.08 = 199). The arithmetic is now re-run on the values actually being published, stale flags are dropped, and an implausible regular price (3050 beside 349) is suppressed rather than published with a discount derived from it. Measured through the real still path: readable tags 9 -> 5, every published price now satisfies its own tax-included price, and the live walk publishes none instead of publishing garbage. 162 tests pass. Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> |
||
|---|---|---|
| recognization | ||
| .gitignore | ||