Retail-786k: a Large-Scale Dataset for Visual Entity Matching
- Publication
- ICLR DMLR Workshop 2024Workshop
- First submitted to arXiv
- arXiv:2309.17164
Cite this paper · BibTeX
The citation identifies the linked source version. It cites the original paper and its authors.
@misc{retailproductretail786k2023,
title = {{Retail-786k: a Large-Scale Dataset for Visual Entity Matching}},
author = {Bianca Lamm and Janis Keuper},
year = {2023},
eprint = {2309.17164},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2309.17164}
}
The supermarket leaflets that land in the mailbox every week are retail's oldest battleground for price comparison.
Supermarket A's leaflet shows a strawberry yogurt at €2.49; supermarket B's shows cherry at €2.29; supermarket C's shows vanilla at €2.59. All three prices actually describe one thing, what this brand's yogurt in this size costs this week, whatever the flavor.
A price-comparison company has to put these three images in one group before it can compare the prices. Today this is mostly done by hand.
The first author works at Markant in Germany, a company that provides price-monitoring services to European retailers; the second author is a researcher at Offenburg University. They turned leaflet data the company had sorted by hand over many years into a public dataset called Retail-786k.
Problem Definition
The authors first define two terms.
A product is a GTIN. A GTIN is the internationally used barcode number for a product, 14 digits long; change the packaging design or the size and the number changes. So the strawberry yogurt and the vanilla yogurt are two products.
An entity is "a group of products that should be compared on price". In leaflets, retailers often use a photo of one product to promote a whole group of interchangeable products.

This is what the authors call visual entity matching. Given a product image cropped from a leaflet, decide which entity it belongs to.
The authors argue that this task differs from both classification and retrieval as they existed. Variation within an entity is large. Each retailer's leaflet has its own layout and background, prints a different flavor, shows the product at a different angle, and even the colors can drift in printing. Variation between entities is small: three different "apple purée" entities may differ only in brand, or in one saying g and the other ml. Worse still, which products count as one group is decided by the price-comparison application and has no direct relation to appearance, so the model has to work out that criterion from examples on its own.
Dataset
The source is full-page leaflets collected by Markant from about 130 European retail chains between 2016 and 2022, some high-resolution scans of printed leaflets, some publicly available digital ones. The products are mostly food and beverages, with household goods, cosmetics, pet food and small appliances as well.
Construction took three steps. First, each leaflet page was cut by hand into "product information boxes", each containing the product image, the price and the description; this step took 23 people about two years and was already part of the company's price-monitoring workflow. Next, each box was cropped out. Finally, the images were assigned to entities.
The final dataset has 786,179 images and 3,298 entities, covering more than 18,000 products. The training set has 748,715 images and the test set 37,464; each entity has at least 10 images in training and at least 3 in test. In the split, all images of an entity from the same retailer (subsidiaries included) land on one side only, training or test, so the model can't score by memorizing a particular retailer's leaflet layout.
The dataset ships only the cropped product images. The original full-page leaflets and text such as prices, brands and product descriptions are not provided, even though the prices and descriptions are printed right there in the images.
Discussion

The authors built two baselines to show that standard methods fall short, without setting out to solve the problem themselves.
As Classification
The first baseline treats each entity as a class, which makes it a 3,298-way classification problem. ConvNeXt does best, with 85.5% test accuracy and a macro F1 of 0.832; ViT gets 83.4% and ResNet-50 82.4%. ConvNeXt trained for 76 hours.
At first glance that isn't bad, but the authors point out that the classification setting itself is unrealistic. Retailers replace about 40% of their products every year, so entities keep appearing and disappearing, and a classifier with a fixed set of classes goes stale quickly.
As Retrieval
The second baseline is closer to the real need: given a query image, find images of the same entity among all the others. The authors use ROADMAP, a metric-learning method that directly optimizes average precision, with a ResNet-50 backbone and 512-dimensional embeddings.
The result is a Recall@1 of 44.85% and a Recall@10 of 56.34%. In other words, more than half the queries get the wrong answer at rank one, and for over 40% of queries not a single correct image shows up in the top ten. When the authors analyze the errors, the most common ones are the same product in a different size and different products from the same brand.
A Number That Doesn't Add Up
The paper also reports a mAP@R of 72.23%, and in the appendix sets it beside ROADMAP's results on other datasets: CUB birds 25.27, iNaturalist 27.01, Stanford Online Products 56.64. By that comparison, Retail-786k comes out as the easiest of the lot.
Next to Recall@10, though, this number doesn't quite add up. By definition, mAP@R first counts, for each query, how many images in the database share its class, calls that , and then takes the average precision over the top results. If the top 10 contain no correct answer and , that query scores 0.
The test set averages about 11 images per entity, with a minimum of 3, so for most queries won't be much larger than 10. Going by the Recall@10 of 56.34%, 43.66% of queries get the whole top ten wrong, and nearly all of them have a mAP@R of 0; even if every other query scored perfectly, mAP@R would have a hard time getting past 60%. Yet 72.23% is higher than Recall@10 and far higher than Recall@1, the reverse of the usual pattern on other datasets, where mAP@R sits clearly below Recall@1.
The paper doesn't explain the discrepancy; the two metrics may have used different evaluation settings. Until the official evaluation code clears this up, it's safer to go by Recall@K when comparing Retail-786k retrieval scores with other datasets.
The Limitations the Authors List
In their discussion, the authors list three limitations. The data may still contain mislabels that nobody caught. The text in the images, such as prices, discounts and product descriptions, was not extracted, and that is exactly what existing text-based entity-matching methods rely on most. And the entity definition is tied to one specific application, leaflet price comparison; for other price-comparison needs, the same products might have to be grouped differently.
Their societal-impact paragraph is just as blunt. This kind of automation will affect the people who compare prices by hand today, but it can also make it easier for consumers, low-income households in particular, to find cheaper products.
Conclusion
Retail-786k is the first public, large-scale dataset for visual entity matching. It carries a real business process, leaflet price comparison, over into a research problem intact: more than 780,000 product images cropped from real leaflets, sorted into over 3,000 entities defined by price-comparison needs.
The difficulty lies in the definition itself. Entities are grouped by whether they can be compared on price, whether or not they look alike; images in one group can look completely different, and images in different groups can differ by a single unit of volume. A standard classifier reaches 85%, but has to be retrained whenever the classes change; the more practical retrieval approach gets less than half right at Recall@1.
For price monitoring or product matching, this dataset is very close to conditions in the field. The paper doesn't include the leaflet text, though, and prices, sizes and product names are all printed in the images, so adding OCR is probably the most direct next step. The same authors later published mSOP-765k, which tackles multimodal structured output prediction.