Co-creating an AI-driven image search function for a jewelry webshop

For a jewelry webshop, we built an AI-driven image search function based on similarity embedding to simplify the classification of jewels together.

Daphné Vermeiren - 13/4/2022

Before explaining why artificial intelligence (AI) is relevant for a large jewelry webshop, we might have to put you into an imaginary scenario. So, imagine: we give you a box filled with 1000 rings. There are three different, specific rings that you have to classify manually, for example:

rings classified with AI

The differences between the rings are, as you can see, very minimal. Often, there’s only a minimal, barely noticeable difference that you can hardly spot. It’s pretty clear that this task is very time-consuming, right?

As you can probably guess, this was a daily reality for our client. The company receives packages filled with thousands of unclassified jewels to replenish its inventory. When these jewels arrive in their warehouse, employees have to put them in the right spot, which takes some time.

Similarity embedding

The client had a specific technical solution in mind to solve this problem, namely a classical classification tool powered by AI. The idea: a machine learning algorithm that could scan every jewelry bag and suggest which product it is exactly. A great idea to get started, but we decided to challenge the concept and specify the role machine learning could play in this case.

There are a few reasons why we believe that classical classification was not the way to go in this instance. For example, adding a new product would require us to retrain the whole AI model, and this isn’t a small task. Each product - and product number - would need a minimum of 50 to 100 different images to train the model correctly. Finally, classical classification doesn’t work for extensive classes, and in this instance, there are more than a thousand products. Conclusion: not ideal.

All the reasons above are why we proposed to work with another approach, namely similarity embedding. Similarity embedding is a machine learning method where an algorithm compares the products in a database and selects the top n-matches in terms of visual similarity. The matches are then shown in order of relevance.

This way of working enables us to work more accurately for extensive classes. Moreover, adding a new product does not require retraining the whole AI model. What’s even better about this approach is that a single image per class already suffices. Of course, more images per class improve accuracy, but it is not required to add multiple images.

Analysis and co-creation

Our sister company Brainjar took care of the AI part for this project. However, our product owners made sure that we co-created this solution optimally. This means that we started with technical analysis and drafted a design document that we improved along the way with the client.

In addition to iterations to the design document, our side of this project was making sure that the development process went smoothly by communicating with the development, client, and budgetary side.

Results

In the beginning of the project, we established some non-functional requirements with the client. First, the search speed (how fast a similar image is shown) should be max. 10 seconds. Second, the accuracy (how many times our algorithm is correct) should be above 90%. Thanks to Brainjar’s talented developers, we smashed those results as the search speed ended up at 5 seconds and the model’s accuracy was 93%. And, as it is an AI algorithm, it will keep getting smarter, of course.

Overview