Machine Learning in Fashion industry — Part 1

Elvin Wong
5 min readNov 8, 2018

--

From 10 years ago IBM’s Deep blue defeated a western chess world champion, Kasparov, to about 2 years ago Google’s AlphaGo achieved 4–1 victory against the best Go chess in the world, AI obtained a great advancement ever in history. Yet still a few year ago many people might still think AI is something more or less just about chess games. However, today machine learning has already gets into our daily life, from determine cancer in Xray images, assist in trading strategy in financial industry to very popular iPhone’s Face ID that recognise human faces. AI has been already vastly used among us.

As computer vision is already very mature. It is very intuitive to ask, apart from human face recognition, dogs and cats or, ice and salt classifications, is machine learning capable of having a sense of Art like human designer? Given an image of a cloth, a logo or even the dressing of a model, is machine capable to tell which brand it belongs to?

Find three very famous brands for the test

  1. Balenciaga
Balenciaga coat

2. Burberry

Burberry cloths (I guess probably most people can distinguish this brand)

3. Nike

Nike coat

Personally i would say Burberry and Nike are pretty easy to distinguish, as there are certain repetitive patterns on the cloths and Balenciaga is more difficult to tell.

Download the sample data from Google

Download image via google images
Around 600 images for each brand

Feed the Data into the model

Train the model

Seems not bad we have like 0.278% error rate. Which means for about 3/4 of the images that the machine gets it correctly.

Fine tune the model

The error rate improve a lot by unfreezing the model and trains all layers with adjusted learning rates.

error rate improved

Result

The error rate drops to 0.22 which is pretty good to me. As the images include not only cloths but also logo, shoes, models wearing the entire set of the cloths of a brand or even a few of models standing together in the same image.

There is a lot of room to improve such as:

1. Reduce the noise. Removing unrelated images which I do not have time to do so.
2. Reduce variance. Classify the categories (shoes, clothes…etc) before training.
3. Prepare more data. 600 images is perhaps too small when considering we are comparing all the products! (clothes, shoes, bags, coat, logos, all of them)

Interpret the result

By studying the confusion matrix, we can see that brand Balenciaga is some how more confused with Burberry and less with nike. Which may imply Balenciaga and Burberry is more likely a potential competitors in the market rather than a competitor with Nike.

When looking into the result, we can get a lot information by comparing different brands products, or even compare the product of the brands itself. For examples:

  1. Which brand are potential competitor?
  2. Is the new seasons products align with the Brand style?
  3. How much the designer’s product aligns with Brand and at the same time bringing new elements to the brand? By studying the data the machine can give quantified result.
  4. Is the Brand new seasons product adds (enough or too much) different new elements of next year’s trends?
  5. How the styles of the brand correlates with different human emotions/feelings?
  6. What picture does customer raise in their mind when they first see the new line products?

All the above questions can be answered more concretely with the assistance of machine learning.

Lets add top 10 brands for more testing

  1. https://www.businessinsider.com/hottest-fashion-brands-in-the-world-2018-7#7-versace-4

Brands:

classes = [‘balenciaga’, ‘burberry’, ‘dolce_n_gabbana’, ‘fendi’, ‘givenchy’, ‘gucci’, ‘nike’, ‘off-white’, ‘prada’, ‘versace’, ‘vetements’]

Prepare data

Download around 600 images for each brands

Train the model

The error rates goes up to 0.568%. This is not surprising as we added 300% more brands and 600 images are simply not enough as the training data. Considering so many parameters: 11 brands, many different categories (shoes, clothes, pants, jackets, logos, even the model themselves may already represents the brands styles (as they are carefully selected)!).

Can you tell me which brand of this cloth belongs to? Don’t look into the brand label.

Fine tune the model

The error rate get a lot better by adjusting the learning rate and re-train on all layers.

Interpretation

By studying the data, we may have an idea that Gucci and Dolce and Gabbana are the most potential competitor of each other. While Givenchy and Versace are less likely to compete directly.

All these information help to make very important decision for the brands themselves.

Conclusion

Obviously, by just looking into a few brand and so small sample of the data, we can already extract so much valuable information from the images. This is reasonable to predict that the fashion industry will soon also apply machine learning to the field and enjoy the benefits that AI brings to them.

--

--