Classifying East Asian traditional dresses using Deep Learning and Computer Vision

Varun Dhingra
3 min readOct 17, 2019

--

Note: This article is just meant to publish my journey in the Fast AI course and nothing else. I have tried to cite the Image sources as best as I could. If it is insufficient or needs to follow a certain reference format, do let me know and I will be happy to make the necessary changes.

I have just completed the second video of Fast AI’s Deep Learning — Part I series. I decided to make a classifier that could classify Traditional East Asian dresses into 3 categories : Kimono, Qipao and Hanbok.

Below are examples from each of the three categories. The following images have been taken from Google Images.

Kimono. [Source URL : https://www.klook.com/activity/2125-kimono-experience-tokyo/]
Qipao. [Source URL : https://www.dhgate.com/product/shanghai-story-knee-length-qipao-silk-cheongsam/409299328.html]
Hanbok. [Source URL : https://www.aliexpress.com/item/32692240051.html]

I used the RESNET36 architecture to train the model.

Number of Epochs

The training phase at first consisted of transfer learning of upto 15 epochs. The error rate began with a 42% error rate then dropped to a 5.4% error rate and then went up again to a 7% error rate.

The above suggested to me that the model was overfitting and perhaps I should reduce the number of epochs.

However, I tried checking the error rate with same number of epochs after unfreezing the model. The error rate had dropped to 4.5% and remained stable, indicating to me that perhaps there is no Overfitting.

Learning Rate

The learning rate graph as shown by the lr_find() was as shown below:

Based on the above graph, I selected the Learning rate as :

learn.fit_one_cycle(15, max_lr=slice(1e-45,1e-03))

Interpretation

The model predicts accurately for Qipao but sometimes confuses between Kimono and Hanbok.

Confusion matrix:

I tried cleaning the images, a few different epochs, different learning rate and even retraining the model couple of times but these were the best results I got. Can anyone please suggest me on how to make this model more accurate ?

Results:

Correct result for Qipao
Correct classification for Kimono
Correct classification for Hanbok
Hanbok INCORRECTLY classified as Kimono

The web service to the Production can be found at:

https://traditional-dress-classifier.onrender.com/

Other Projects:

Tennis Players in a Wimbledon match using Computer Vision, Image Processing and Deep Learning : https://medium.com/@varundhingra004/detecting-tennis-players-in-a-wimbledon-match-using-computer-vision-image-processing-and-deep-5c2bd9170162

--

--