Find out more
Problem, solved.
Using AI and computer vision to turn millions of store photos into a clear view of what is on the shelf, anywhere and at any point in time.
The Background
Our field sales agents visited partner stores every day, and every visit ended with photos of the shelves. Over the years, millions of these images had piled up. They were shared once on Teams, used for a quick check, then forgotten.
In April 2023, Meta released Segment Anything, an open-source model that can cut any object out of an image, even objects it was never trained on. I saw the connection straight away. If we could segment a shelf into individual boxes, we could finally read the photos our agents were already taking. I hired a small team and gave them room to test the idea, without asking the organisation for a big commitment upfront.
The Problem
LEGO had no reliable way to know what was physically on partner shelves. Were the top products in stock? In the right place? Were the displays and promotions we had agreed with retailers actually in the store?
Before starting, we went to the field. We spent a day with a sales agent in Hamburg, ran workshops with two regions, surveyed 46 people and interviewed 20 across six regions. Every region worked differently, with its own tools, KPIs and processes, and up to 18 tools per region. Agents lost 10 to 15 minutes per visit counting by hand. The one thing everyone had in common was the photos.
Traditional computer vision could not solve this at a reasonable cost. It needed one tightly framed photo per product and a hand-labelled dataset for every new item. With new sets launching every year, that would never scale.
The Solution
The team built a pipeline of three models, each trained and replaceable on its own:
- Segment Anything finds every object on the shelf and its position.
- A model we trained in-house filters out everything that is not LEGO: walls, floors, other brands.
- A classifier identifies the product, or a simpler attribute when that is more reliable.
The results are then linked to the store, the retailer and sales data, so a photo becomes something the business can act on.
The key idea was synthetic data. LEGO boxes are almost all rectangular, designed to stand out, and placed on shelves in only a few ways. That makes them ideal for 3D rendering. The team generated around 10,000 images per product in Unity, from every angle and in every light. This let us train a model on a new set before it ever reached a store.
Synthetic data gave us something even more valuable: tests with a known answer. The generator knows exactly where every box is, at what angle and how much of it is hidden. We could change one condition, measure the effect on the whole chain, and learn where the system worked and where it did not. With three models in a row, small errors multiply. Testing the chain, not just each model, was how we earned trust.
The Benefits
The prototype, tested with photos from a LEGO Store, showed four ways to use a single shelf photo:
- See recent sales performance directly on the shelf
- Search for any product across all store photos
- Filter by product group, for example by price range
- Check compliance: shelf position, adjacency, displays and promotions
It also taught us something important. The models were not the biggest barrier. Access to clean product and sales data was. That changed the plan: data contracts and integration became part of the product, not someone else’s dependency.
I presented the opportunity to our CDTO with a business case built from the field: less time counting, better availability of top products, proof that promotions happened, and fewer tools per region. For field agents, nothing changed in their routine. They kept taking photos, and the photos started working for them.
“Start in the field. Test where you know the answer. Earn trust, then scale.”
– Retail Vision’s guiding principle
Digital
problem
solver…
Let’s get together and talk about your unique challenges – I’m friendly, approachable and love to work with other people to quickly solve digital problems using innovative technology.
Contact me
Oops! We could not locate your form.