ResearchPublication
Large scale image recognition for online trading platforms
Earlier work, a post written in 2020 by Selcuk Sandıkcı of Prosus. A model trained on more than five million images in almost 3000 categories tells what a listing on OLX’s trading platforms is from its pictures, to make it easier to find.

Where this comes from
This is a post on the Prosus AI Tech Blog, written by Selcuk Sandıkcı and published on 17 December 2020. It reports work for OLX Group, a division of Prosus whose trading platforms let people buy, sell and exchange used goods and services, with pictures from one of OLX Group’s companies. It is listed here as earlier work from Prosus’s AI team. What follows is from the post.
What the post asks
On OLX’s platforms, sellers post listings with a title, a description and pictures of the item, and buyers find them by typing a search. Search has to return the most relevant listings, and as few searches as possible should come back empty. To help it, the team set out to predict the category of every listing automatically, so that listings become easier to search.
At this scale that is hard. There are thousands of categories, most sellers are individuals who follow no listing standard, and the pictures vary widely across millions, or even billions, of images.
From pictures to search
A deep neural network is trained to classify the pictures of listings. Its predictions for the listings in the database make an index, and together with what users do, such as their searches, the listings they click and the messages they send, the index maps searches to categories. The pictures can then serve search as an extra filter by category. A second way the post names is to learn embeddings of searches, listings and categories from the index and from user behavior. The post itself is about the image recognition.
The data and the model
The labeled images come from one of OLX Group’s companies: more than five million of them across almost 3000 categories, which the post reckons five times the size of ImageNet with almost three times its categories. The categories form a hierarchy more than five levels deep, and the images are spread over them unevenly.
The model is Inception ResNet V2, chosen for a good trade-off between accuracy and complexity. It joins inception blocks, small networks inside the network that run convolutions of different sizes and pooling side by side, with the residual connections of ResNet, which let much deeper networks be trained. It was trained in Keras with a TensorFlow backend.
Start from ImageNet
The weights come from a model trained on ImageNet, with a new last layer for the dataset’s own categories.
Train the last layer
Every other layer is frozen, and the last layer is trained for several epochs, until its training accuracy is high and levels off.
Train the whole network
All the layers are unfrozen and trained. The post says this lowers the risk of destroying the pre-trained weights and presumably shortens training.
What it found
- top-1 mean prediction accuracy, on a test split of the dataset
- 62.5%
- top-3 mean prediction accuracy
- 80.4%
- top-5 mean prediction accuracy
- 85.6%
Many categories are fine-grained, such as gaming, wireless and Apple keyboards under Keyboards and Mouse. So the post also measures accuracy with each prediction collapsed to its parent higher up the hierarchy, where a gaming keyboard taken for a wireless one counts as right. It gives two measures: micro-average accuracy, the share of all images classified correctly, and macro-average accuracy, the plain average of each category’s accuracy.
- micro-average accuracy, with categories collapsed to the second level
- 85%
- macro-average accuracy at the same level
- 84%
- accuracy with categories collapsed to the third level
- 76%
Accuracy rises as categories are collapsed to higher levels, as expected. Some mistakes come from categories that are hard to tell apart in pictures taken by people who are not professionals, such as a GPS and an iPad. Others are the model’s own, such as a massage bed taken for an Xbox One.
In production
The model runs on AWS SageMaker, behind endpoints built with SageMaker and TensorFlow Serving that scale automatically and answer HTTP POST requests. A listing’s category is the first step, and the team’s post on attribute extraction describes the next. A general model decides which specialized model to call: a picture it classifies as a watch goes on to a model that extracts a watch’s attributes. The post says these chains of models keep the work modular and easier to maintain.
What comes next
The post finds that the classifieds domain “presents unique challenges due to its extremely dynamic nature and diverse set of products and users”. It concludes that it might be more accurate to split the categories into smaller groups, such as consumer electronics, animals and transport, and train a model on each, and that data and networks of this size need training spread over several GPUs. It suggests training image embeddings from what users do, for visual search and recommendation. At the time, the team was moving to the EfficientNet architecture, with a family of models for different needs, from high accuracy to low latency with acceptable accuracy.
The post
Large Scale Image Recognition for Online Trading PlatformsSelcuk Sandıkcı. Prosus AI Tech Blog, 2020Author
Selcuk Sandıkcı
References
- Large Scale Image Recognition for Online Trading PlatformsSelcuk Sandıkcı. Prosus AI Tech Blog, Medium, 17 December 2020
- Large scale image recognition for online trading platformsSelcuk Sandıkcı. Prosus, 17 December 2020
- Inception-v4, Inception-ResNet and the Impact of Residual Connections on LearningChristian Szegedy, Sergey Ioffe, Vincent Vanhoucke, Alex Alemi. arXiv, 2016