E-Commerce product image background removal with machine learning

High-quality product images are critical for e-commerce sites. Clean backgrounds allow customers to focus on the products and provide a sense of consistency. However, manually removing or replacing backgrounds is an expensive and time-consuming process. Levi9’s data scientist, Simona Stolnicu, automated this process using deep learning image segmentation models. She improved the client’s time for image processing 36.000 times over—from 12 hours to 1.2 seconds for hundreds of images.

Levi9 worked with Wehkamp, a rapidly scaling e-commerce site, to better manage product image background removal. With over half a million daily visitors generating up to 30,000 transactions, Wehkamp processes orders amounting to €3 million in sales each day. Their catalog contains over 400,000 distinct clothing products. Wehkamp adds 10,000 new product listings every month, requiring an efficient system to handle the product images.

Wehkamp used to pay a contracted service up to twelve hours for each batch of several hundred images to be manually edited and prepared. The delivery deadlines were also frequently pushed back. This delay prevented new products from being added to the site promptly, which hampered the rapid iteration that was essential to the business.

Levi9 aimed to reduce the manual post-processing delay by creating its own model to separate products from their photo background. The technical challenge faced by Simona and her colleagues was training an algorithm to generate masks for images in order to delete the background of the apparel photos.

The machine learning project had five phases: data ingestion, data preparation, model training, model deployment, and monitoring.

Data ingestion: quality is key

The data ingestion phase was focused on developing a robust, accurate dataset. As Simona put it, “the first step in any machine learning project is gathering quality data.”

Levi9 obtained a set of 32,000 product images along with their corresponding human-made masks from Wehkamp’s third-party processing vendor. This “ground truth” data served as the predictive model’s target variable. These pairings between the real image and the binary mask would be used to test various technical solutions, types of algorithms, and finally to find the deep learning solution and train the algorithm.

Data preparation: clustering for better performance

The data ingestion phase was focused on developing a robust, accurate dataset. As Simona put it, “the first step in any machine learning project is gathering quality data.”

Levi9 spent a significant amount of time and effort preparing the dataset before training could begin. “We went through several stages of work,” Simona Stolnicu explained. “We manually analyzed the images, and then we noticed visually on certain sub-samples that the images are quite different, with far more pants than beach clothes.”

Based on preliminary tests, the team noticed that this variety affected algorithm performance and decided to cluster the images in several categories: long pants; shorts; short-sleeved tops or dresses; long-sleeved tops or dresses; beachwear, sportswear, accessories; and white-color products. All samples were resized to the same dimensions to ensure a consistent image size of 320×320 pixels.

Clustering was done using a semi-automated process that used principal component analysis (PCA) and k-means to group products into visually and stylistically similar categories. Afterwards, the team employed manual verification to polish the goups further.

Some images required augmentation during this stage due to the low contrast between the object of the image and the background. The team tested several augmentation techniques, such as vertically flipping the images or cropping, and performed small initial tests with the algorithm to find the optimal combination between the augmentation techniques and image segmentation.

In total, the team prepared a dataset of 32,000 images grouped into six product clusters. They used approximately 26.000 images for actual model training and 6.000 images for model validation.

Model training: finding the right architecture and performance metrics

To find the most suitable neural network architecture for the task, Simona did some research on the most popular State of the Art papers in the field. After experimenting with MaskRCNN and BASNet, Levi9’s data scientist found inspiration in a paper published in 2020 that detailed an image segmentation architecture called U^2-Net. “The architecture has a U shape, and in each block, the image is processed again in a U shape. Then each block returns a binary mask prediction, and all of these are aggregated together to obtain the final prediction,” explains Simona.

The U-net architecture proposed in the paper can be trained from the ground up to perform competitively. The innovative architecture enables the network to dig deeper and achieve high resolution while reducing memory and compute costs dramatically.

The core idea of training an image segmentation model relies on providing the algorithm with the original image to let it compute the image mask for background removal and then compare the model output with a human-made, validated image mask.

The optimization metric for this comparison is the so-called Intersection over Union (IoU) percent, which measures the similarity percent between the algorithm-generated mask and the real mask. It takes the two masks and calculates the area of the joint images and the area where they intersect. The higher the overlap, the better the IoU score. And the higher the IoU score, the more performant the algorithm is, explains Simona.

The Levi9 team aimed for a score of over 99%. After each round of training, the score would be checked and fed back to the algorithm so that it could adjust its weights for the upcoming training epoch.

The model was taken through 30 such training rounds, or epochs, which took 9 hours. To accelerate the model training, the team split the training data into several batches and used the Horovod library for distributed, parallelized processing across 20 single GPU machines. After each Horovod averages the scores computed on each device after every batch, it automatically adjusts algorithms on each machine.

After 24 rounds, the model had already achieved a 99% IoU score, but training continued for six more epochs. The final model reached a 99.4% score, with the highest score for images of shorts and the lowest score for white-colored clothes and beachwear. Careful inspection revealed remaining errors stemming primarily from low-contrast products or thin straps or details.

Deployment: instant triggers for background removal

Following successful training, the model was deployed in production using AWS Lambda functions. Any delay was eliminated by configuring a trigger function to fire at each new upload of a product image. This immediately passes the visual asset through a pipeline that checks for the product type and proceeds with the background removal step.

After this process, a team takes control of the image and uploads it to the website. Due to minor errors in the algorithm, about 600 images out of 10.000 still need manual adjustment. They are most commonly associated with low-contrast images, clothing that is the same color as the background, and very thin straps where the shadow may be the same color as the strap.

Ongoing maintenance: monitoring for decreased performance

The model’s performance is likely to deteriorate over time. This is why, in an ideal pipeline of production, the performance of the model should be carefully monitored, and lower IoU scores should trigger a retraining on new sets of data. Even a 6% error rate on real images could be significantly reduced with careful data set curation and adjustments.

After one and a half years of work, the deep learning algorithm now handles the majority of background removal for the e-commerce store. The model has been in production for over a year and flawlessly processes over 94% of product images without the need for manual intervention. The system has transformed the image processing workflow at Wehkamp, allowing for faster product launches and accelerating business growth.


Arch9 Amsterdam | Timetable

Timetable

12.30-18.00h November 22nd 2023

Architects, CIO's, CTO's, Other Experts

12:30 - 13:00

Walk in with coffee and small bite

13:00 - 13:05

Kick-off by Jan Dolinaj, Country Director Serbia, Levi9

13:05 - 13:55

Keynote: The Power & Complications of AI by Tim Huckaby

The Chapel

14:00 - 14:25

Pioneering a traceability and sustainability platform in a large fashion company

14:30 - 15:10

What comes after Relational Databases? Endless Flexibility!

15:15 - 15:55

State of (Applied) AI – Skip past the hype and jump to real-life cases

16:00 - 16:30

Run your containers efficiently in the cloud with Azure Container Apps and Azure Kubernetes Services

16:30 - 17:00

Revolutionize your Business and Tech with AWS Step Functions

Tech Studio

14:00 - 14:55

Panel Discussion: Software Development on AI Steroids

15:00 - 15:30

Where Low-code meets Pro-Code

15:30 - 16:25

Panel Discussion: Dealing with Data

16:30 - 17:00

Team Topologies – designing and executing the perfect agile teams structure

17:00 - 18:00

Drinks & Bites with peers


Arch9 Amsterdam | The Speakers

Speakers & Time table

12.00-18.00h November 22nd 2023

Architects, CIO's, CTO's, Other Experts

Keynote by Tim Huckaby

Tim Huckaby is an industry luminary focused on AI, Computer Vision, Machine Learning, AR/MR, Data Visualization, & Edge computing.  Currently serving as CTO of Lucihub, Mr. Huckaby founded InterKnowlogy and VSBLTY Mr. Huckaby has worked on and with product teams at Microsoft for 25+ years, has authored books & several publications, and is a frequent conference speaker.

Time Table

12:30 - 13:00

Walk in with coffee and small bite

13:00 - 13:05

Kick-off by Jan Dolinaj, Country Director Serbia, Levi9

13:05 - 13:55

Keynote: The Power & Complications of AI by Tim Huckaby

The Chapel

14:00 - 14:25

Pioneering a traceability and sustainability platform in a large fashion company

14:30 - 15:10

What comes after Relational Databases? Endless Flexibility!

15:15 - 15:55

State of (Applied) AI – Skip past the hype and jump to real-life cases

16:00 - 16:30

Run your containers efficiently in the cloud with Azure Container Apps and Azure Kubernetes Services

16:30 - 17:00

Revolutionize your Business and Tech with AWS Step Functions

Tech Studio

14:00 - 14:55

Panel Discussion: Software Development on AI Steroids

15:00 - 15:30

Where Low-code meets Pro-Code

15:30 - 16:25

Panel Discussion: Dealing with Data

16:30 - 17:00

Team Topologies – designing and executing the perfect agile teams structure

17:00 - 18:00

Drinks & Bites with peers


Arch9 Amsterdam | AI, Security, Agile, and Beyond

The Future of Software Development

Latest trends in AI, Data, Cloud Agile, and Beyond

Want to stay ahead of the curve and lead your team to success in the ever-changing field of software development? Lets talk AI, Data, Agile, Cloud, Testing and much more...

12.30-18.00h November 22nd 2023

Hotel Arena Amsterdam

Architects, CIO's, CTO's, Other Experts

This isn’t just an event; it’s an intellectual playground where diverse ideas converge to empower your decision-making. Walk out not just inspired, but armed with actionable steps and meaningful connections that will propel you forward. Stay tuned for more details—but don’t wait, spots are limited! Reserve your seat now by filling out the form below. Seize the opportunity to transform your tomorrow, today!

Program

#9Inspiration 2023

#9Inspiration 2023

#9Inspiration Conference Belgrade Serbia

Share. Learn. Connect.

Welcome to the second edition of the #9Inspiration conference! In this dynamic market and specific year, we are delighted to announce a new opportunity to unite Serbian IT professionals from diverse backgrounds and organizations to inspire, learn, and connect!

Learning and networking are pivotal factors for achieving personal and professional success. Join our conference to get the both, in one day. The objective of the #9Inspiration conference is to provide a platform where IT experts can enrich their knowledge, broaden their skill sets, and create valuable connections.

But, its not only about you. Our efforts don’t just end there. Levi9 commitment to this conference goes beyond just organizing it. By participating in the #9Inspiration conference, you will not only benefit yourself but also support NURDOR, making a meaningful contribution to society.

So, don’t miss out on your “Back to the Future” moment — join us on Friday, 29 September, in Belgrade to learn, connect, and make a difference!

Agenda

  • 09:00 – 09.45 Registration & Coffee
  • 09.45 – 10.00 Conference Opening
  • 10:00 – 11:00 Software Is Details – KEYNOTE SPEECH, Kevlin Henney
  • 11:00 – 11:45 AI topic – To Be Announced, Mladen Jovanović
  • 11:45 – 12:15 Coffee Break
  • 12:15 – 13:00 When nimble is not fast enough: Will AI and Data leverage your DevSecOps journey, Radovan Baćović
  • 13:00 - 13:45 Multiple Ships to the Island – Micro Frontends & Island Architectures, Florian Rappl
  • 13:45 – 14:45 Lunch
  • 14:45 – 15:15 Quality Quest – From Epics Creation to an EPIC Application, Jovana Milanović & Marina Zvicer
  • 15:15 – 16:00 Secure9 Topic To Be Announced, Edwin van Andel
  • 16:00 – 16:15 Break
  • 16:15 – 16:45 Levi9 Talk: Mobile topic – To Be Announced, Žolt Varga
  • 16:45 – 17:45 The sociotechnical path to high-performing teams – KEYNOTE SPEECH, Charity
Register Now!

Belgrade, Serbia

Time

09.00 - 18.00h (CEST)

Date

September 29th, 2023

Register Now!

Customer Focus Week 2023

Customer Focus Week 2023

86%

Fan Score

84%

Customer Delight Score


89%

Communication

88%

Trustworthiness

84%

Customer Focus

83%

Competence


We prioritise personal relationships with our customers and colleagues and believe in sharing experiences for happy people and happy customers. Join our annual Customer Focus Week, where we will share personal stories, invite a customer experience expert, and provide insights on how to make a difference through value creation and delivery. Don’t miss out on this opportunity to connect, learn, and grow with us!

100%

Value

Daily Program

Great Customer Experiences don't happen by accident

Nienke Bloem MBA CCXP is called the Customer Experience Thoughtleader. She is a global keynote speaker on Customer Focus and inspires audiences with best practices and proven methodologies. When it comes to CX, she leads a speaking practice, a game company, and an Education business. So, you could say ‘she breathes CX’. With her 20 years’ experience in strategic change management positions within telecom, travel, financial and IT businesses, she knows how businesses work and she speaks the language. But on stage, her talks are inspiring and hands-on. She is a true Dutchy, so expect some directness and a practical approach. That fits perfect with her brand promise “Making Customer Experience Work!” and yes, she will wear her (Levi9😉) blue dress.


How we deliver value at Kompas Publishing

Dariia Boieva will share insights over the past few years, how Kompasses Schoolbank has evolved from a mere support system to an actively developed platform with new and innovative features. The team’s focus on a product-driven mindset has led to a key value proposition for its customers, generating revenue for clients while efficiently and effectively solving their problems. The team’s hard work has resulted in a growing number of premium memberships, along with increased advertising clicks and revenue. With new promotions and values, the team’s data analysis and usage are well on their way to achieving even greater success.

Floor is lava at Backbase

Stanislav Perevezentsev & Oleksandra Zhdanova discuss the challenges Backbase is facing in meeting the different requirements and regulations of its customers, maturing its product by dropping beta, facing non-functional requirements and a lack of data to test, an avalanche of maintenance that requires attention, and maintaining feature parity between its platforms. To tackle these challenges, Backbase is taking several actions, including implementing direct communication with customers, reviewing the maintenance process, analyzing the root cause of problems with deep RFF analysis, configuring and mapping requirements, prioritizing support over new features, understanding the product on the team level, moving to Kanban, and improving documentation. These actions are aimed at ensuring successful project launches despite the tight timeline.


Value discovery: An unexpected journey

This year, our special guest Andrei Postolache will share his  story about the journey from imagined value, to real value. From ivory tower ideas of value, to real life, on the ground value. Together with our colleagues Codrin Baleanu and Radu Ciocan we will discuss where to start, explore the challenges we may face and identify who or what can help us overcome them. This session is designed to be informative and engaging, offering you insights into the concept of value and how to apply it to your work.


How to Discover and Deliver Value

It is crucial to understand the value that our customers seek, as it allows us to make an impact on their customers’ business. To discover this value we need to ask ourselves questions as;

  • Why is it important to understand what value means for our customers?
  • How do we discover that value in order to make an impact on our customers’ business?
  • What are the common challenges our teams face in this process?
  • How do we measure that value?

Join us and learn from Jelena Kutlaca Milosevic, Simona Temelkova Nikolic, Dario Djurica, and Igor Jankovic. Discussion is moderated by Vanja Al-Halidi. They will answer the prior questions and more…


Delivering Value at Sendcloud. Let’s hear it from the customer!

Evgeny Sharypin is Engineering Manager at Sendcloud, Europe’s #1 shipping automation tool. Sendcloud connects a big number of e-commerce systems and postal carriers together in one system, allowing webshops to optimise their shipping process and save a lot of time and money while doing so.

At Sendcloud, Evgeny is responsible for the technical handling of the carrier integrations for the last three years. Together with Levi9 in 2021-2022 we have carried out a huge project that resulted in a microservice transformation of our carrier integration landscape.  We currently run a fleet of 60 services that connect the core of our platform with postal services, and that could have not been possible without our fruitful cooperation with Levi9.


October 1st - Inspiration Conference

October 1st 2022

Share. Learn. Connect.

The moment we’ve been waiting for has finally arrived – registration for the 9Inspiration conference is open!

You will have the opportunity to hear world-class speakers who will share their experience from leadership expert positions in companies such as Amazon, Glovo, Ikea, and Upbound. Two of them are AWS Data Heroes!

Program of the Levi9 Conference

See the full agenda here.

Levi9 Conference ticket

You will activate Levi9 Conference ticket, after donating money directly to NURDOR Serbia. All the details will be sent via email after you complete the registration form. The number of places is limited, so hurry up.

Let’s create an impact together!

Donate to NURDOR

Is there anything better than doing the right thing for right cause 

When we decided to create unique opportunity to gather Serbian IT community on the conference where they can learn, connect, and share experience, we wanted to do the same for our local community. This is why we chose NURDOR, as the only association of this kind in Serbia that deals with comprehensive psycho-social support for families and system solutions that enable the health care sector of pediatric oncology in our country to function better.  

All the money from registration fee will be donated to NURDOR, to help them achieve efforts in supporting paediatrics oncology. Our goal is to raise 500.000 RSD and starting price for registration is 1.000 RSD. Number of participants is limited to 500. 

We encourage all participants to pay as much as they want, with minimum of 1.000 RSD, and no maximum limit set.   

Let’s help kids and families who are fighting the most important battle! 

Belgrade, Serbia

Time

09.00 (CEST)

Date

October 1st, 2022

Register Now!

Levi9 modern working space

[Past Event] 26 October - QA Online Meetup Ukraine

October 26th 2021

QA Online Meetup

Join our QA Meetup on October 26 at 19:00!

Discuss current issues in the world of QA and share your experience with peers at this FREE online event from Levi9. Join the meet-up to get practical knowledge from our QA experts.

What are we going to talk about:

  • “Migration from protractor: which tool is the most promising”, –– Khotemsky Alexander, SDET at Doxy.me
  • “OOP design patterns in e2e tests”, –– Mykhailo Lepsky, Test Automation Engineer (JS) at Levi9
    Moderator: Sobur Sergey, Test Lead / Principal QA Engineer at Levi9

Levi9 works with JS / TS, Java, Python, C #, Mobile on Microsoft and AWS platforms. We implement projects with various stacks, platforms and tools, including: WebdriverIO, Cypress, Protractor, Playwright, Appium, RestAssured, Gatling, k6, Browserstack, SauceLabs and many others. Our QA team has more than 30 technicians who will share their experience and help develop your hard & soft skills.

How to sign-up?

Registration: https://bit.ly/3AWz22F

Ukraine Online Event

Time

19:00 (EEST)

Date

October 26, 2021

Location

Online

Save your spot!

[Past Event] 26 October - PY9 Meetup Serbia

October 26th 2021

FastAPI in a Modern Environment

You’re invited to our #PYTHON meetup, which takes place on October 26 at Dorćol Platz, in compliance with the prescribed COVID measures.

FastAPI in a modern environment
SLS Components @Edge

FastAPI is currently one of the most exciting web frameworks of today. This is because it uses more Python programming functions than any other framework, and some of them are type hints, async, wait, dataclasess and many others. There is a large selection of different frameworks for anyone looking to develop API solutions in Python, and FastAPI is more than a great choice. This meetup will show you some tricks to help you get started.

Serverless components allow us to quickly deployment the entire infrastructure with the help of Serverless framework. Similar to the CI / CD product, it allows real time logs within the console for fast debugging. They also allow you to create your own components as well as share them. Ideally it covers every type of application from prototype to enterprise.

About the speakers

Đjorđe Ristić, Medior Python Developer, Levi9
Đjorđe is a Python developer and levi niners who inspires innovation. Follow best practices for developing secure, scalable, and reliable applications.

Milos Cvetkovic, Javascript Tech Lead, Levi9
Milos is an experienced JavaScript programmer who enjoys new technologies. Serverless enthusiasts.

How to sign-up?

The number of places is limited, and applications are required. Free parking is provided for all participants, in front of the Levi9 company, which is located in the immediate vicinity.

You can find the REGISTRATION link in the event header, or copy it directly → https://www.surveymonkey.com/r/py9meetup

Belgrade, Serbia

Time

18:00 (CEST)

Date

October 26, 2021

Location

Dorćol Platz

Save your spot!

Levi9 work space

[Past Event] Java Meetup Ukraine

June 17th 2021

Java is our thing.

We are happy to invite you to the Java meetup by Levi9 on June 17.

What is in the program?

  • On the way to the cloud with Quarkus, Java and Graal - Alexey Loubyansky, Principal Software Engineer @Red Hat
  • Performance: nuance versus evidence - Sergii Tsypanov, Senior Java Developer, Levi9
  • Event moderator: Dmytro Panin, Levi9 Delivery Director, Kyiv.

When: 17 June, 2021 at 19:00 (EEST)

Cost to join: FREE! 100%

 

Register and join the meetup now!

Don’t miss your cool Java summer evening!

Online Event Ukraine

Time

19:00 (EEST)

Date

June 17, 2021

Location

Online

Save your spot!