Implementing a virtual try-on network using deep generative models

author

Author: Aman Shenoy

Researcher & Engineer

Dec 27, 2019

Category: Retail

hero

Introduction

For the previous five months, I had the opportunity to intern at CAI Stack as a Data Science Intern. I worked on mostly research-oriented projects with the Data Science team. This post will mark the end of my internship here and will be a summary of my experience and work during these 5 months. It has been a brilliant learning experience, where I was able to learn about very recent technologies and how they could be used in a commercially feasible and practical manner while working within reasonable constraints. This not only helped me to learn about these technologies but also taught me to be able to optimize, to be able to get the best results quickly and easily.

Image description

My projects mainly revolved around potential use cases for generative networks in fashion. Broadly speaking, the end goal of my project here was to implement a virtual try-on network-essentially taking in-shop clothing and a person image as input to give output as an image of a person wearing those clothes. The model implemented has been done with a focus on tops, with complete apparel transfer being potential future work.

The Segmentation Algorithm

For this, we initially needed to be able to implement a segmentation algorithm. Even though open-source state-of-the-art models could have been used to implement this, we stuck with robust image processing techniques for segmentation. With the idea being to localize the face and understand the skin color of the model from the face image to be able to divide an image into hair, clothes, skin, and background.

Example of segmentation

Geometric Matching Module

Once we have the clothing segment, we can now geometrically compare this clothing segment to the in-shop clothing. Our goal is now to be able to learn transforms on the in-shop clothing to make it as geometrically similar to the model clothing. To visually describe this one can refer to the image below. The example is a grid of six images. Top left is the in-shop clothes, top right being the clothing segment of the model, the top middle being the transform (bottom left) applied on the in-shop clothes.

Geometric matching example

The above examples are generated during training and hence the in-shop clothing and the model clothing are the same. This can also lead to an easier qualitative assessment. The network architecture to learn this transform is briefly described below.

Network architecture for geometric matching
Network architecture for geometric matching

We call the learning of this transformation as the Geometric Matching Module, as it matches the in-shop clothing to the current clothing trying to get them to match geometrically. Some of the results after training are shown below.

Results after training

Try-On Module

The instinctive approach to imposing the new clothing now is to simply paste it over the image, but as one can see this will cause problems due to overlap with hair and hands, and the previous clothing stays, making it look very unrealistic. The solution to this was the try-on module, where we implement an encoder-decoder network to smoothen out the image.

Encoder-decoder network

This gives a smoothened image that looks much more realistic than the results we would have if we were to paste the image over the model. The article has avoided any in-depth description of the work done and for a thorough description of the model and training strategy, it is advisable to read the paper here.

Smoothened image result
Smoothened image result

Conclusions

The project described above was one of the many things I worked on during my internship at CAI Every one of my projects led to immense learning and taught me the importance of being a quick learner. Almost all of the concepts used throughout the internship were new to me and I had to get an in-depth understanding relatively quickly. Overcoming this was not only enjoyable but also instilled confidence in me.

I am really thankful for all my mentors who guided me in different aspects such as improving code performance, debugging skills, writing clean and modularized code. I am definitely taking a lot of learnings to build upon.

Subscribe to Our Newsletter

Stay updated with our latest insights.

Share with Your Network:

Similar Posts

Re-imagining Human Resources with AI Agents
AI HR Agent

Re-imagining Human Resources with AI Agents

Sep 25, 2024Read More
Generative AI in Supply Chain Control Tower
Retail, Generative AI

Generative AI in Supply Chain Control Tower

Jul 23, 2024Read More
Ensuring Reliability and Compliance: The Role of Model Governance in Finance
Finance, Governance

Ensuring Reliability and Compliance: The Role of Model Governance in Finance

Jul 18, 2024Read More
Optimizing Returns Processes with Advanced Generative AI CAI Solutions
Retail, Generative AI

Optimizing Returns Processes with Advanced Generative AI CAI Solutions

Jul 17, 2024Read More
MLOps: Streamlining Machine Learning with Efficient Operations
ML

MLOps: Streamlining Machine Learning with Efficient Operations

Jul 15, 2024Read More
Optimizing AI: Strategies for Advanced Model Performance
Model, AI, ML

Optimizing AI: Strategies for Advanced Model Performance

Jul 11, 2024Read More
Enhancing Machine Learning Model Performance Part- 2
ML, Model

Enhancing Machine Learning Model Performance Part- 2

Jul 10, 2024Read More
Enhancing Machine Learning Model Performance
ML, Model

Enhancing Machine Learning Model Performance

Jul 10, 2024Read More
Transforming the Finance Industry Through Artificial Intelligence (AI)
Finance, AI

Transforming the Finance Industry Through Artificial Intelligence (AI)

Jul 9, 2024Read More
Revolutionizing Retail with Artificial Intelligence (AI)
Retail, AI

Revolutionizing Retail with Artificial Intelligence (AI)

Jul 8, 2024Read More
GenAIOps: Revolutionizing the Operations of Generative AI Models
Generative AI

GenAIOps: Revolutionizing the Operations of Generative AI Models

Jul 8, 2024Read More
Unleashing the Future: The Power and Potential of Machine Learning
ML

Unleashing the Future: The Power and Potential of Machine Learning

Jul 5, 2024Read More
Combating LLM Hallucinations with Retrieval Augmented Generation (RAG)
LLM, RAG

Combating LLM Hallucinations with Retrieval Augmented Generation (RAG)

Jul 3, 2024Read More
Beyond Boundaries: Orchestrating LLMs for Next-Level AI Integration
LLM, AI

Beyond Boundaries: Orchestrating LLMs for Next-Level AI Integration

Jul 2, 2024Read More
AI Governance: Ensuring Ethical, Safe, and Responsible AI Development
AI, Governance

AI Governance: Ensuring Ethical, Safe, and Responsible AI Development

Jul 2, 2024Read More
LLMOps: Optimizing the Operations of Large Language Models
LLM

LLMOps: Optimizing the Operations of Large Language Models

Jul 1, 2024Read More
Transforming Personalized Search with Generative AI
Retail, Generative AI

Transforming Personalized Search with Generative AI

Jun 26, 2024Read More
What is Artificial Intelligence (AI)?
AI

What is Artificial Intelligence (AI)?

Jun 25, 2024Read More
Supply Chain Management Transformed by Generative AI
Retail, Generative AI

Supply Chain Management Transformed by Generative AI

Jun 24, 2024Read More
Harnessing the Power of AI in Demand Forecasting
Retail, AI

Harnessing the Power of AI in Demand Forecasting

Jun 17, 2024Read More
How AI is Shaping the Future of Warehouse Management
Retail, AI

How AI is Shaping the Future of Warehouse Management

Jun 12, 2024Read More
Model Governance for the Modern Enterprises
Model, Governance, AI

Model Governance for the Modern Enterprises

May 16, 2024Read More
Assortment Planning and Recommendation: Optimizing Product Selection for Retail Success
Retail, AI, ML

Assortment Planning and Recommendation: Optimizing Product Selection for Retail Success

Apr 16, 2024Read More
Unlocking the Power of Personalized Recommendations: A Guide to Tailored Experiences
Retail, AI

Unlocking the Power of Personalized Recommendations: A Guide to Tailored Experiences

Mar 22, 2024Read More
Unlocking the Power of AI in the Fraud Detection Module
Finance, AI

Unlocking the Power of AI in the Fraud Detection Module

Mar 13, 2024Read More
Revolutionizing Cosmetics Shopping: Leveraging CAI Stack for Enhanced Virtual Makeup Try-On
Retail

Revolutionizing Cosmetics Shopping: Leveraging CAI Stack for Enhanced Virtual Makeup Try-On

Mar 4, 2024Read More
Empowering Business Communication: A Deep Dive into Unified Communications as a Service (UCaaS)
Retail, AI

Empowering Business Communication: A Deep Dive into Unified Communications as a Service (UCaaS)

Feb 20, 2024Read More
The Transformative Impact of AI in Retail and Lifestyle
Retail, AI

The Transformative Impact of AI in Retail and Lifestyle

Feb 16, 2024Read More
Virtual Try-On Using Images: An Ideal Application of Generative AI and Pattern Recognition
Retail

Virtual Try-On Using Images: An Ideal Application of Generative AI and Pattern Recognition

Feb 9, 2024Read More
Untangling Gen AI and LLM's : Unveiling the Power and Limitations
Generative AI, LLM

Untangling Gen AI and LLM's : Unveiling the Power and Limitations

Dec 5, 2023Read More
Retrieval Augmented Generation (RAG): Unlocking the Power of AI
RAG, AI

Retrieval Augmented Generation (RAG): Unlocking the Power of AI

Nov 5, 2023Read More
Unlocking Creativity : The Power of Generative AI (Gen AI) with CAI Stack
Generative AI

Unlocking Creativity : The Power of Generative AI (Gen AI) with CAI Stack

Oct 1, 2023Read More
Power of MLOps: Features and Advantages of a Cutting-Edge Platform
ML

Power of MLOps: Features and Advantages of a Cutting-Edge Platform

Sep 1, 2023Read More
Implementing a virtual try-on network using deep generative models
Retail

Implementing a virtual try-on network using deep generative models

Dec 27, 2019Read More

Partner with Our Expert Consultants

Empower your AI journey with our expert consultants, tailored strategies, and innovative solutions.

robot