Photo-to-SKU Matching When Barcodes Fail

Published 2026-09-01 by Faraz Rahimi

A phone camera can recover identity when a label cannot. The trick is preprocessing for warehouse light, a tight product library, and a UI that lets people reject bad matches.

Photo-to-SKU Matching When Barcodes Fail

Tags: Computer Vision, OpenCV, SKU, Mobile, Warehouse, unlisted

The first photo-to-SKU demo always looks magic in an office. Then you take it into a metal aisle under sodium lights and the model starts matching every black box to every other black box.

Warehouse photos fail in boring ways: mixed color temperature, motion blur from someone walking, glare off polybags, and a hand covering the distinctive part of the item.

Preprocess like the floor is hostile

I resize aggressively, run a cheap contrast stretch, and drop frames that are obviously blurry before they hit the matcher. OpenCV is enough here. You do not need a research stack to reject a useless image and ask for a second shot.

The product library matters more than the backbone. If you only have catalog shots on white, you will lose to real shelves. I keep a small set of floor photos per SKU whenever someone confirms a match. That library compounds.

Show three candidates, not one

A single wrong answer destroys trust. Three cards with a clear "none of these" button keeps the system honest and gives you training signal. The last-scanned bin should sit on the card so the operator can walk while they decide.

If they stay on a record, I treat that as weak confirmation. If they hit not this item, I store the lookalike pair. That is how you stop confusing two SKUs that share a housing.

Original post: https://farazrahimi.com/posts/photo-to-sku-matching-when-barcodes-fail