Transforming Fashion Retail with Generative AI Design

Alex Dmitrewski
DataReply
Published in
6 min readSep 19, 2023

AI had already made inroads into the world of fashion, with techniques such as product visual similarity (Bala, S. B., Kavita.) and neural style transfer (Gatys, L. A., Ecker, A. S., & Bethge, M) appearing in recent years.

Both have improved the retail experience of both customers and businesses alike; with visual similarity we can quickly find other products which are most alike in appearance (helpful for when a specific item is out of stock), and neural style transfer allows users to imprint chosen patterns onto existing products (such as a piece of artwork onto a t-shirt).

However, where Stable Diffusion is a gamechanger is in the raw design of fashion products. It has the capability to design garments from scratch, using a simple text description, as well as performing both generic and specific editing to existing product images — such as altering the style of a t-shirt, or adding a strap to a handbag.

This will not only enhance the customer experience, where existing wardrobes will be easily editable with the click of a button, but it will also be a boon to the fashion design journey of businesses. Designers be able to draw inspiration from the wide array of designs that Stable Diffusion can quickly output, and it will be quicker than ever to explore new ideas — successful designs will take less time from initiation to completion, improving operational efficiency, while ultimately unsuccessful ideas will use up minimal precious time and resources.

Understanding Stable Diffusion and How to get started

Stable diffusion comes from a family of “latent diffusion” deep learning models, pioneered by the company StabilityAI. It’s mainly comprised of 3 sections as shown in the image below. The first is a text encoder responsible for converting textual input into a numeric and machine-interpretable format. The second is an image information creator that takes input from this textual encoded information and adds it to the image. The last section is an image decoder which takes all this encoded information and translates it back into a human-seeable format.

By Jay Alammar (https://jalammar.github.io/illustrated-stable-diffusion/)

The entire diffusion process can be thought of as a sequence of latent diffusion models laid out end to end that sequentially “denoise” a particular image where it is run through the model multiple times. This process can be seen below.

By Jay Alammar (https://jalammar.github.io/illustrated-stable-diffusion/)

Stable Diffusion has three primary features when it comes to generating content: ‘txt2img’, ‘img2img’, and ‘depth2img’. These features utilise different parameters when it comes to creating or modifying images, and the majority of these will be covered later with an example.

  • Txt2img primarily uses text prompts, both positive and negative, and uses these prompts as textual guides whilst create an image.
  • Img2img works slightly differently, in that it takes an image as an input as well as textual prompts. The image can range from photos to sketches.
  • Depth2img was also introduced with Stable Diffusion 2.0, which uses a textual prompt as well as depth information inferred from an input image.

The technique of inpainting can be used in Stable Diffusion and is part of the img2img capabilities. This is where the user can draw a ‘mask’ on an existing image, indicating the area to be generated by the model. This technique can be used to fix errors or imperfections, as well as to generate designs with new colours or styles. We see an example of this below:

Example 1 (original image on left):

Prompt 1 = “blue jeans with slight rips at knees”

Prompt 2 = “blue jeans with embroidered dogs”

Example 2 (original image on left):

Prompt = “leather handbag with gold buckles”

Future Work and Enhancements

As mentioned earlier, the use of generative AI tools such as Stable Diffusion will bring benefits to both customers and businesses — and this will only improve over time as further developments are made that can utilise Stable Diffusion.

One of these possibilities is the creation of a plug & play virtual wardrobe tool. While virtual wardrobes may already exist, the addition of AI would allow the user to change specific pieces of clothing — and then they could either find the most similar existing design, or order a custom-made item based on their changes.

This however only takes the customer perspective into consideration; a product designer might benefit just as much while designing new clothing articles. After all, a new clothing item is not truly appreciated until we see it worn, and this is what a virtual wardrobe would allow designers to see while essential changes are made to perfect designs.

What we have described so far would only give a 2D perspective — this is simply what Stable Diffusion can produce. The next stage to this would be the integration of a tool which transforms 2D images to a 3D object, such as NeRF (Salian, I.).

By inputting as few as 4/5 images, NeRF allows us to produce a 3D representation of the object, allowing the user to rotate it and a view from different angles.

So, by utilising NeRF on images output by Stable Diffusion, we would have a 3D model wearing the newly designed or altered clothes, giving a 360-degree view for either the customer or designer, and thus further improving the design and retail experiences.

Conclusion

With the advent of e-commerce, we saw the fashion retail world changed forever — and we are perhaps now seeing the next radical change, where the bounds of creativity will be further expanded. Generative AI models such as Stable Diffusion will lead the charge, and with constant breakthroughs in AI, we expect to see the fashion retail landscape be continuously moulded for the years to come.

While we may struggle to keep up with the advent of new tools such as Stable Diffusion, and we must be aware of the possible effects of fast fashion due to quick and easy product design, their adoption will be necessary for businesses to stay ahead and attract customers. Customers and businesses alike will reap the rewards, with effects such as efficiency, customisability and accessibility coming into force as the tools become more widespread.

Excited about unlocking limitless design possibilities in fashion with AI?

At Data Reply, our team of professionals stands ready to help fashion brands and designers seamlessly integrate stable diffusion models and expand their creative horizons. Partner with us and let’s revolutionise the world of fashion design.

Get in touch at info.data.uk@reply.com or contact our Data Science Manager, Perumal S K

References

--

--