An Efficient Fashion Recommendation System Using A Deep CNN Model
An Efficient Fashion Recommendation System Using A Deep CNN Model
Department of CSE
Department of CSE
Vignan’s Foundation for Science, Technology & Research
Vignan’s Foundation for Science, Technology & Research
(Deemed to be University)
(Deemed to be University)
Vadlamudi, Guntur, AP, India
Vadlamudi, Guntur, AP, India
[email protected]
[email protected]
Abstract— The primary goal of the recommender system The term Recommendation System (RS) is used to
is to make suggestions for products that are comparable to the describe a method of user decision-making in a multi-
given query image. It can be difficult to separate related faceted data location [4]. The RS has been also categorized
objects from a vast data set. Systems for online purchasing are as an e-commerce tool that facilitates searches based on
looking into how to make product recommendations based on
the user's interests. In the past, different statistical techniques
information about a user's individual preferences and
and similarity measures were employed to gather comparable interests. When one does not have access to a wealth of
items, which resulted in less accurate and precise product personal information or awareness of something like the
recommendations. An efficient Deep CNN model is proposed alternatives, RS can be used to augment social processes
for classifying the given product. The proposed model is through the usage of recommendations from other users.
evaluated using fashion products data set, and the results are Through individualized attention, unique material, and
pleasing. This makes it possible to reliably and precisely customized recommendations, RS helps its customers
recommend the products with an accuracy percentage of overcome the problem of information overload [5-6].
89.02%. The proposed model outperforms other existing The building blocks of any trimming recommendation
models in terms of classification metrics
system are the results of several iterations of the
Keywords— Content-based Filtering; Deep Convolutional recommendation system's design process. There are three
Neural Network; Image-based search; Product distinct stages, and they are known as information
Recommendation Systems; gathering, learning, and recommendation. All of these steps
in making a recommendation are connected as shown in Fig.
I. INTRODUCTION 1. This demonstrates that the first step in RS is gathering
data, which is then followed by the learning stage and finally
Fast fashion has experienced a phenomenal expansion in
the recommendation stage. Information acquired in the first
the textile and apparel industries in recent years. An
phase can be used to inform the recommendation made in
effective recommendation system is vital on e-commerce
the second.
platforms due to the high volume of products and
The three primary categories of recommender systems
information that needs to be sorted, ordered, and
are content-based, collaborative-based, and hybrid-based.
communicated to consumers. As they allow customers to
A content-based approach considers some discrete
tailor their buying experience, image-based fashion
characteristics of an item to recommend for a person based
recommendation systems (FRSs) have garnered a lot of
on their choices with similar properties to the user's interests
interest from fast fashion merchants [1]. As the technology
and preferences. An example of a Content-based approach
for doing so improves, this subfield of AI shows great
is as follows: If user A reads an item from the internet then
promise for applications such as image processing, parsing,
the system finds similar items and recommends the items
classification, and segmentation. As promising as this area
to A which can be seen in Fig. 1.
is, there is a dearth of scholarly literature on the subject. The
current research does not give a comprehensive analysis of
filtering methods or fashion recommendation systems [2].
Some user-friendly purchasing platforms powered by
deep learning have emerged in recent years. When it comes
to fashion, these sites often provide users with
recommendations for complementary pieces or full
ensembles [3]. Different from the fashionable match
suggestion system, which models the style qualities of
clothes to offer fashion items that make appropriate matches
with provided clothes, such as a shirt and matching pants,
the complete outfit recommendation system suggests a
collection of garments, which make up whole outfits, with
comparable attributes, such as patterns and colors. Fig. 1. Content-based Recommended System
A subset of machine learning called deep learning (DL) preferences into account. The AlexNet model is used to
concentrates on learning from several levels of data construct two convolutional neural networks that identify
abstractions and representations. To improve the client different types of clothing and the characteristics that go
experience, some tech companies are already utilizing DL with each type. The user's choice for a mix of several
systems built on various neural networks (NNs). For elements is then assessed using two sorts of scores, which
instance, deep neural networks (DNNs) are preferred by are then continually updated to produce recommendations
YouTube, eBay, Yahoo, and Twitter, whereas that are more appropriate for each user. Liu et al.[12] have
convolutional neural networks are preferred by Spotify proposed a new deep model that predicts landmarks and
(CNNs) [6]. Recently, there has been a lot of focus on garment properties simultaneously to learn clothing
CNNs –which can offer matching clothes automatically to aspects. Reddy et al.[13] Have presented a content-based
users with the usage of CNN techniques. filtering strategy based on genre correlation. The model is
Historically, recommender systems have used applied to the Movie Lens dataset. Kayed [14] has
approaches such as nearest neighbor, clustering, and matrix presented a CNN-based LeNet-5 model and experimented
factorization. Deep learning's development has improved on Fashion MNIST dataset.
recommender systems as well. Modern deep learning The following limitations are inferred from this
algorithms, as opposed to more conventional approaches literature survey
[7-9]. To recommend items we need similar items, to get • Most fashion recommendation systems are
similar items clustering or classification can be performed. implemented using machine learning
However, with this approach of clustering, we could get the techniques.
most similar items with less precision. To avoid the • All models are working with good accuracy but
problem we classify the given product and recommend the are limited to low data set size.
most similar items from that category. We present a new • Some of the Models are facing the problem of
Deep Convolution Neural Network classifier model to overfitting.
classify the given product. To avoid the reported limitations, we proposed a deep CNN
The following contributions are made to this paper. model for classifying fashion products.
• We proposed an efficient fashion
recommendation system to classify fashion III. PROPOSED MODEL
products. First load the data set, and extracted the features by
• We designed and implemented a deep CNN using a pre-trained model, after pre-processing split the data
model by adding more layers. set into two parts such as the training data set and the testing
• The proposed model has been tested on the data set. Apply the Deep Convolution Neural Network
Fashion product data set. model on the training data set to train the model and update
the weights accordingly. Use the test data set to see the
• Also, achieved superior accuracy than the model performance. The procedure we used is first we
existing model used for comparative analysis. classify the given product using the proposed model of a
The organization of the paper is as follows. Section 2 given test data, extracted the images to create a class label
describes the background investigation of the product data set, and extracted the top k similar images based on the
recommendation system. Section 3 describes the suggested similar features for the recommendation purpose. The entire
model for product recommendations. The results of the procedure is explained in Figure 2. The proposed model is
experiment are presented in Section 4. The paper's explained in Figure 3.
conclusion and future scope are discussed in Section 5.
II. RELATED WORK
This section has discussed various existing research
works on fashion recommendation systems over several
years. Also, we surveyed various deep learning models that
were developed for fashion recommendation systems. Ay et
al.[10] have proposed a recommendation module of Protus,
a programming tutoring system that can dynamically adjust
to learners' interests and skill levels. By analyzing learners'
server logs and testing their learning styles, this system may
identify various learning patterns and behaviors. It begins
by processing the clusters according to various learning
methods. The AprioriAll method is then used to mine the
frequently occurring sequences to understand the learning
styles and interests of the students. Finally, this system
completes individualized learning content Fig. 2. Proposed Model
recommendations based on the Protus system's ratings of
A. Deep CNN model
these common sequences. Stan and Mocanu[11] presented
an automated system that can suggest an entire outfit based An efficient Deep CNN model is proposed for classifying the
given product to generate predictions with higher accuracy.
on a piece of clothing while also taking the user's
The proposed deep convolutional neural network model to steps per epoch is 128. The model was applied on Fashion
classify the product is explained below. Product Images (Small) with 150 epochs. We stopped the
process as there is not much impact on accuracy after
running 150 epochs. Results obtained after applying the
model on the test data set are presented in Table 1.
Algorithm 1: Extraction of images
Input: Data set
Output: Extraction of the required data
Procedure:
n<-no of samples of a given data set
df<-be a data frame with n no of samples.
Df1<- a data frame that contains samples belonging to 12
classes
X=[] is an empty array to store features
Y=[] is empty to store labels of the image
for i in range(0,n):
if i in df1.index:
image,label=extract image and it's class from the
directory
pre-process image
append features to X
append label to Y
Fig. 3. Proposed Deep CNN Model end of if
The model is as follows three sets of Conv2d, Max end of for
Pooling, and Dropout. Flatten and 2 Dense layers which can
be seen in Fig. 3. To calculate the similarity between the images we used
cosine similarity.
IV. EXPERIMENTATION AND RESULTS ∑𝑛
𝑖=1 𝑎𝑖 ∗𝑏𝑖
cos 𝜃 = (5)
2
√∑𝑛 2 𝑛
𝑖 𝑎𝑖 ∗√∑𝑖=1 𝑏𝑖
A. Description of the data set
We applied the proposed model on a benchmark dataset Where a is the vector of the test image features and b is
Fashion product data set downloaded from the Kaggle[16]. the features of the extracted images of the classified
Fashion Product Images (Small) from the Kaggle website is product.
the used data set used to apply the model for article B. Experimental Environment
prediction, and recommendation processes. There are The performance of the model is implemented in
44,000 images with 143 classes of various product types in python in Google collaboratory.
this collection. In this data set, 50% of the photos are things
for men, 42% products for women, and 8% of are unisex, C. Evaluation metrics
Girls and boys. In this, we applied our model on 12 The most significant parameter for classification is
categories such as 14795 images belonging to APPAREL classification accuracy. Apart from classification accuracy,
data similar to authors in [15]. the metrics used for the study of the suggested method are
Initially, the data set size is 44000×11 with the accuracy, precision, recall, and F1-score, and the formulas
attributes. We extracted 12 classes namely, Waistcoat, are given in equations 1,2,3,4, and 5 respectively.
Stockings, Skirts, Jackets, Track pants, Dresses, Trousers, The accuracy formula here refers to how many samples
Shorts, Jeans, Tops, Shirts, and T-shirts. Extract 12 classes are correctly identified out of all of them. i.e.
images data by using the article type and concatenated all
those 12 class information. Created another data frame with 𝐴𝑐𝑐𝑢𝑟𝑎𝑐𝑦 =
𝑇𝑃+𝑇𝑁
(1)
14795×2 such as the image file name and type. Algorithm 1 𝑇𝑃+𝑇𝑁+𝐹𝑃+𝐹𝑁
deliberates the process involved in the extraction of product
images. Precision is True positives by the total number of
After pre-processing, we divided the data into training positives in the data set.
𝑇𝑃
and testing halves. Where 20% of the data is test data. 𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛 = (2)
Images used for training are 11832 and 2959 for testing. The 𝑇𝑃 + 𝐹𝑃
model is applied on fashion product images small data set To calculate recall, the formula is
𝑇𝑃
with a batch size of 256, the number of epochs are 150, and 𝑅𝑒𝑐𝑎𝑙𝑙 = (3)
𝑇𝑃+𝐹𝑁
[13] Reddy, S., Nalluri, S., Kunisetti, S., Ashok, S., Venkatesh, B. (2019).
Content-Based Movie Recommendation System Using Genre
Correlation. In: Satapathy, S., Bhateja, V., Das, S. (eds) Smart
Intelligent Computing and Applications . Smart Innovation, Systems
and Technologies, vol 105. Springer, Singapore.
https://doi.org/10.1007/978-981-13-1927-3_42
[14] M. Kayed, A. Anter and H. Mohamed, "Classification of Garments
from Fashion MNIST Dataset Using CNN LeNet-5 Architecture,"
2020 International Conference on Innovative Trends in
Communication and Computer Engineering (ITCE), 2020, pp. 238-
243, doi: 10.1109/ITCE48509.2020.9047776.
[15] N. Yarahmadi Gharaei, C. Dadkhah and L.Daryoush,"
Content-based Clothing Recommender System using Deep Neural
Fig. 9. Recommended Items for Test Image-1 Network," 2021 26th International Computer Conference,
Computer Society of Iran (CSICC), 2021, pp.1-
6,doi:10.1109/CSICC52343.2021.9420544.
V. CONCLUSION
[16] https://www.kaggle.com/datasets/paramaggarwal/fashion-product-
An efficient Deep CNN model has been proposed for images-datase.
classifying the given fashion product. The proposed model
outperforms current approaches in terms of accuracy and
other classification metrics. Results show that the proposed
algorithm is giving better accuracy 89 compared with other
works. In the future we consider the gender and color of the
product to give better recommendations. Furthermore, we
will work on ensemble classifiers and similarity measures
for better recommendations.
REFERENCES
[1] Y. Hu, X. Yi, and L. S. Davis, “Collaborative fashion
recommendation: A functional tensor factorization approach,” in
Proc. ACM Int. Conf. Multimedia, 2015, pp. 129–138.
[2] H. Lee, J. Seol, and S.-G, Lee, “Style2Vec: Representation Learning
for Fashion Items from Style Sets,” arXiv preprint
arXiv:1708.04014.
[3] E. Simo-Serra and H. Ishikawa, “Fashion style in 128 floats: Joint
ranking and classification using weak data for feature extraction,” in
Proceedings of the IEEE Conference on Computer Vision and
Pattern Recognition, 2016, pp. 298–307.
[4] Z. Liu, P. Luo, S. Qiu, X. Wang, and X. Tang, “Deepfashion:
Powering robust clothes recognition and retrieval with rich
annotations,” in Proceedings of the IEEE Conference on Computer
Vision and Pattern Recognition, 2-16, pp. 1096-1104.
[5] Q. Chen, J. Huang, R. Feris, L. M. Brown, J. Dong, and S. Yan,
“Deep domain adaptation for describing people based on fine-
grained clothing attributes,” in Proceedings of the IEEE conference
on computer vision and pattern recognition, 2015, pp. 5315-5324.
[6] W. Di, C. Wah, A. Bhardwaj, R. Priamuthu, and N. Sundaresan,
“Style finder: Fine-grained clothing style detection and retrieval,” in
Proceedings of the IEEE Conference on Computer Vision and
Pattern Recognition, 2013, pp. 8-13.
[7] J. McAuley, C. Targett, Q. Shi, and A. van den Hengel, “Image-
based recommendations on styles and substitutes,” in Proc. Int.
ACM SIGIR Conf. Res. Develop Inf. Retrieval, 2015, pp. 43–52.
[8] R. He, C. Packer, and J. McAuley, “Learning compatibility across
categories for heterogeneous item recommendation,” in Proceedings
of the IEEE conference on Data Mining, 2016, pp. 937-942.
[9] A. Veit, B. Kovacs, S. Bell, J. McAuley, K. Bala, and S. Belongie,
“Learning visual clothing style with heterogeneous dyadic co-
occurrences,” In Proceedings of the IEEE International Conference
on Computer Vision, 2015, pp. 4642-4650.
[10] B. Ay, G. Aydın, Z. Koyun and M. Demir, "A Visual
Similarity Recommendation System using Generative Adversarial
Networks," 2019 International Conference on Deep Learning
and Machine Learning in Emerging Applications (Deep-ML), 2019,
pp. 44-48, doi:10.1109/Deep-ML.2019.00017.
[11] C. Stan and I. Mocanu, "An Intelligent Personalized Fashion
Recommendation System," 2019 22nd International Conference on
Control Systems and Computer Science (CSCS), 2019, pp. 210-215,
doi: 10.1109/CSCS.2019.00042.
[12] Ziwei Liu, Ping Luo, Shi Qiu, Xiaogang Wang, Xiaoou Tang;
Proceedings of the IEEE Conference on Computer Vision and
Pattern Recognition (CVPR), 2016, pp. 1096-1104