Smart Clothing Fabric Color Matching with Reference to Popular Colors

2022-09-29 01:46ZHANGYani张亚妮ZHUANGJianqiang庄剑强HUANGRongDONGAihua董爱华YUANHaodong袁浩东
关键词:爱华

ZHANG Yani(张亚妮), ZHUANG Jianqiang(庄剑强), HUANG Rong(黄 荣), 2*, DONG Aihua (董爱华), 2, YUAN Haodong (袁浩东), 2

1 College of Information Science and Technology, Donghua University, Shanghai 201620, China

2 Engineering Research Center of Digitized Textile & Fashion Technology, Ministry of Education, Donghua University, Shanghai 201620, China

Abstract: Color economy and market fashion trend have an increasing impact on clothing fabric color matching. Therefore, a smart clothing fabric color matching system with reference to popular colors is designed to realize the diversification of clothing color matching, which includes a palette generation module and a clothing fabrics-palette color matching network (CF-PCN). Firstly, palette generation module generates palettes referring popular colors while maintains color styles of clothing fabrics. Secondly, CF-PCN generates color matching images containing color information of palettes. The experimental results show that the color matching system has a higher average pixel ratio of palette colors and contains more palette color information. It demonstrates that the system achieves color matching innovation referring popular colors while retaining color style of clothing brands and provides designers with appropriate color matching solutions.

Key words: popular color; clothing fabric color matching; support vector machine (SVM); discrete particle swarm optimization algorithm; generative adversarial network

Introduction

Clothing and its fabric color matching is of great importance to the competitiveness of brands. In the field of clothing fabric color matching, popular colors are gaining more and more attention from clothing brands and designers[1]. Popular colors are predicted by international trend experts and published on well-known trend websites such as Worth Global Style Network (WGSN), which represents popular trends, reflects the preferred colors of the public to some extent and is important for clothing brand sales[2]. As an element of clothing fashion, popular colors can promote and lead consumer behavior and improve the competitiveness of brands. Whenever a new sales season comes, brand clothing will replace the old products with the new ones in order to attract customers, and the selection of popular colors for clothing fabric color matching is an important tool. A seasonal popular colors often include more than a dozen. How to choose the right brand color among them poses a challenge to designers. Most of the existing researches on popular colors focus on analyzing the color characteristics, but little attention has been paid to the method of selecting color from popular colors for clothing brands.

In addition, clothing brands have unique clothing styles including color styles as a way to establish consumer loyalty to the brands. Seasonal popular colors can attract customers to buy new clothes in stores, while keeping the color style of clothes unchanged can build customers’ loyalty to the brand and thus enhance the competitiveness of the clothing brand. Therefore, when designers develop a suitable color palette for clothing fabrics with reference to popular colors, they may consider maintaining the original style characteristics of the clothing brand while pursue color innovation to attract consumers.

Currently, there are three main research directions in the field of color matching of clothing fabrics, in terms of color harmony theory, knowledge engineering theory and intelligent technology, respectively[3 -5]. The first two traditional methods rely on the designer’s professional knowledge and manual operation taking time and effort. Therefore, using intelligent technology for automatic color matching of clothing fabrics by means of intelligent algorithms and artificial intelligence has become a hot topic of research for scholars at home and abroad.

Changetal.[6]proposed a color transfer algorithm for recoloring images using palettes. Zhangetal.[7]set up convolutional neural networks to directly map palettes in the library for color matching. The above smart color matching models improved the color matching efficiency of clothing fabrics, but their color selection mostly came from expert libraries and databases, and little attention was given to popular colors and clothing fabric styles of certain brand.

This paper proposes a smart clothing fabric color matching system with reference to popular colors. Firstly, a palette generation module consisting of a support vector machine (SVM)-based clothing fabric style classification model and a popular color selection model is designed. The purpose of the module is to select the color palettes with color innovation from the seasonal popular colors on the basis of maintaining the original color style of clothing brands. Secondly, the clothing fabrics-palette color matching network (CF-PCN) module is designed. The CF-PCN designs a U-Net architecture based main color matching network and a conditional network to color the clothing fabric with popular color palettes. In this paper, intelligent algorithms and artificial intelligence technology in terms of SVM, the discrete particle swarm optimization algorithm, and the conditional generative adversarial network are employed to match the color of clothing fabrics with reference to popular colors, providing an exploration strategy in the field of clothing color matching.

The rest of the paper are organized as follows. Section 1 discusses the color palette generation module with reference to popular colors. Section 2 illustrates the working theme of CF-PCN and shows the experimental results. Section 3 draws the conclusions.

1 Color Palette Generation Module with Reference to Popular Colors

The overall structure diagram of the color palette generation module with reference to popular colors is shown in Fig. 1. The original color style of clothing fabric for one certain brand is discriminated by SVM-based clothing fabric style classification model, and then the popular color selection model based on discrete particle swarm optimization algorithm is designed to select the popular color palettes from the seasonal popular colors.

Fig. 1 Structure diagram of color palette generation module with reference to popular colors

1.1 Color style of clothing fabric and popular colors

The color style of clothing fabric classification method adopts the language image coordinate system proposed by Kobayashi[8]. According to 5-color combinations in clothing fabric, the language image coordinate system classifies color styles of clothing fabric into 16 categories, for example, rough, dynamic, luxurious,etc. Each category has hundreds of combinations. Table 1 shows 7 categories and their representative 5-color combination samples. Full table of 16 categories is shown in Appendix A.

Table 1 Clothing fabric style table in language image coordinate system (7 categories)

The popular colors chosen for this paper are 14 seasonal popular colors in the spring/summer of 2021 released by the WGSN trend agency[9], as shown in Fig. 2.

Fig. 2 Popular color chart the spring/summer of 2021

1.2 SVM-based clothing fabric style classification model

The SVM-based clothing fabric style classification model is designed to classify the original color style of clothing fabrics for one certain brand.K-means clustering algorithm and SVM model are engaged to extract 5 main colors of the original clothing fabric and discriminate its style respectively.

K-means clustering algorithm is engaged to extract 5 main colors from the image of the original clothing fabric for one certain brand. Firstly,Kclass centers (Kis 5 in this paper) are randomly selected in the image, and the Euclidean distance of the color features in terms of RGB from each pixel in the image to the 5 class centers is calculated. Each pixel is assigned to its nearest class center. After that, the mean location of pixels belonging to one class center is calculated and set as the new class center. The procedure repeats iteratively until 5 class centers change no more. Five main colors of the original brand clothing fabric are obtained. The combined features in RGB[10], hue saturation value (HSV[11]) and Lab[12]color space of the above 5 main colors are set as the input to SVM-based clothing fabric style classification model.

The SVM model is a linear binary classifier with maximum interval in the feature space[13]. In this paper, the SVM binary classification is expanded into 16 classifications by a one-to-one approach, corresponding to 16 color style of clothing fabrics. The SVM models are trained by combining these 16 classifications two by two, for a total of 120 models. Equation (1) shows the training formulation.

(1)

1.3 Popular color selection model based on discrete particle swarm optimization algorithm

Popular color selection model based on discrete particle swarm optimization algorithm is designed to realize the innovation of color matching with seasonal popular colors while retaining the original color style of clothing fabrics for one certain brand. In the discrete particle swarm optimization algorithm[14], the particle encoding, corresponding fitness function and constraint are formulated to select the optimal 5-color popular palette among the seasonal popular colors.

The discrete particles designed in this paper are binary encoded and 14-dimension matrix particle is set for 14 popular colors in the spring/summer of 2021 in Fig. 2. In the matrix, 1 and 0 means whether the color is selected or not, respectively. One particle represents a 5-color popular color palette. Figure 3 gives an example of the particle encoding [1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0], its corresponding color and the 5-color palette.

Fig. 3 Particle encoding correspondence table

Fig. 4 Overall structure diagram of CF-PCN: (a) generative network G1; (b) discriminatory network D1

Fitness function and constraints are defined to pursue color matching innovation and maintain brand color, respectively.

In order to realize the innovation of color matching, the fitness functionJis designed to maximize the color transformation between the original clothing fabric image of the brand and the generated 5-color palette. The fitness function is defined as follows: sum up the Euclidean distance among the 5 main colors of the original clothing fabric image and the generated 5-color palette normalized in RGB color space. Besides, the difference of hueHchannel normalized in HSV color space is set as the offset term inJ, shown as

(2)

where,R′i,G′i, andB′iare the values of R, G and B of theith main color in the original clothing fabric image;Ri,GiandBiare the R, G and B of theith color in the generated 5-color popular palette;H′irepresents theHvalue of theith color in the 5-color popular palette; the hyper parameterα= 0.5.

The constraint condition is to maintain the color style of clothing fabric, and the formula is shown as

SSVM(m)=x,

(3)

wheremis the 5-color popular palette generated in the algorithm,SSVM(m)represents its style category obtained by the SVM model designed in section 1.2, andxrepresents the color style category of the original clothing fabric for the brand. Only the particles whose 5-color popular palette is consistence to the original clothing fabric for the brand in the style will be alive and join in the iteration in the algorithm.

2 CF-PCN Module

The CF-PCN module generates clothing fabric color matching images according to the optimal solution of 5-color popular palette. CF-PCN is a conditional generative adversarial network, which includes a generative network and a discriminatory network. The former one is composed of a U-Net structure-based main color matching network and a conditional network. The latter one is a classier.

2.1 Generative network of CF-PCN

The purpose of the generative network is to make the generated clothing fabric color matching image close to the expected clothing fabric color matching image as much as possible. The generative networkG1consists of a main color matching network and a conditional network. Figure 4(a) shows the structure ofG1.

The upper part in Fig. 4(a) is a conditional network. It is composed of three 3-kernel 2-step convolutional layers and one 3-kernel 1-step convolutional layer. The bottom part in Fig. 4(a) is the main color matching network. It adopts the U-Net architecture with eight 3×3 convolutional layers and three 4×4 convolutional layers[15]. Its skip structure could avoid information loss during down-sampling. It helps to recover spatial information and enhance the generative capacity of the network.

The conditional network is composed of four convolutional layers, and the palette size input by the conditional network is 256×256×15. The conditional network extracts features with color information by convolving layer by layer and outputs a feature map of 32×32×512, while the features of layers 1, 2 and 4 are copied spatially and integrated into layers 9, 8 and 4 of the main color matching network, respectively. This ensures that the color matching image contains the color information of palettepin a high degree.

The main color matching network model consists of 8 convolutional layers and 3 deconvolutional layers. It has an input grayscale image of 256×256×1 and outputs a clothing fabric color matching image of 256×256×1 which incorporates the color information of the color palette. The convolutional layers use the convolutional kernel of 3×3, the deconvolutional layers use the kernel of 4×4, and the network adopts rectified linear unit ReLU activation function.

2.2 Discriminatory network of CF-PCN

The discriminatory networkD1is a binary classifier, whose function is to distinguish the expected clothing fabric color matching image and the generated one. Figure 4(b) shows the structure ofD1.

2.3 CF-PCN loss functions

The generative networkG1and discriminatory networkD1models are trained against each other. Loss functions are defined to improve the quality of generated clothing fabric color matching image. Equations (4) and (5) are loss functions ofD1andG1, respectively.

(4)

(5)

3 Experimental Results and Analysis

This paper proposes a smart clothing color matching method with reference to popular colors and demonstrates the effectiveness of this method through experiments.

3.1 Experimental results of SVM-based clothing fabric style classification model

The proposed SVM model is implemented in Python language. SVC class in sklearn.svm library is chosen to train the model while the radial basis function (RBF) is selected as the kernel function. A voting strategy is designed for classification. In this paper, 16 color styles of clothing fabrics are labeled with labels 0 to 15, and each label has 300 samples and a total of 4 800 5-color palettes for training.

The trained SVM model is applied to classify the color styles of clothing fabrics for certain brands. Figure 5 shows 4 examples of the classification results. In Fig. 5, from top to bottom, there are clothing fabric images, 5 main colors obtained by theK-means clustering algorithm, fabric color styles classified by the SVM model, and the one representative 5-color combination sample of the corresponding category in Table 1. The 5 main colors of each fabric image is quite similar to the representative sample in Table 1 previously mentioned, which verifies the classification capacity of the proposed SVM model.

Fig. 5 Examples of SVM-based clothing fabric style classification model result: (a) rough; (b) natural; (c) dynamic; (d) classical

Fig. 6 Example 1 of the popular color selection model based on discrete particle swarm optimization algorithm: (a) clothing fabric image; (b) palette; (c) fitness curve; (d) popular color chart

Fig. 7 Example 2 of the popular color selection model based on discrete particle swarm optimization algorithm: (a) clothing fabric image; (b) palette; (c) fitness curve; (d) popular color chart

3.2 Experimental results of popular color selection model

Matlab language is applied to implement the popular color selection model. The initialization parameters of popular color particle population are set as follows: the population size is 30, the maximum number of iterations is 50, weight coefficientsc1andc2are 2, and the initialization speed of particlesviis [-4, 4].

Figures 6 and 7 show two optimal solutions of 5-color popular palette and the corresponding fitness curves. Figures 6(a) and 7(a) are images of clothing fabrics for two different certain brands. The upper part of Figs. 6(b) and 7(b) are 5 main colors of the original clothing fabric obtained byK-means clustering algorithm, and the lower part of Figs. 6(b) and 7(b) are the optimal solutions of the 5-color palette obtained by the popular color selection model. The color styles classified by the SVM model are shown in the lower part of Figs. 6(b) and 7(b) and the color styles are rough and dynamic, respectively. Figures 6(c) and 7(c) are the algorithm fitness curves, and Figs. 6(d) and 7(d) are the popular color charts in the spring/summer of 2021. The optimal solutions are obtained at the 16th and 15th iteration in the two examples, whose fitness function valuesJare 4.16 and 3.96, respectively.

It is obvious that the lower part of Figs. 6(b) and 7(b) are selected from Figs. 6(d) and 7(d). The popular color selection model designed in this paper can obtain an innovative popular color matching image on the basis of maintaining the original color style of clothing fabrics.

3.3 Experimental results of CF-PCN model

CF-PCN model is implemented in Python language. A Pytorch 3.6.5 deep learning framework is built on a Ubuntu 16.04 system with a NVIDIA-RTX3090 GPU and a 32 G of video memory. The data set is bird256 and the size of training set is 10 600 while that of test set is 1 100. The training batch size is 16 and the Adam optimizer is used to optimize the loss function by setting the learning rate to 0.000 2. Totally 1 000 iterations are trained.

Six sets of color matching results using the proposed CF-PCN is shown in Fig. 8. The model in Ref.[6] is engaged as a comparison here.

Fig. 8 Comparison of color matching results

In Fig. 8, the first and the second columns are the input clothing fabric grayscale images and the 5-color popular palette while the third and the fourth columns are color matching results of Ref.[6] and proposed CF-PCN, respectively. In order to evaluate the color matching effect of CF-PCN, evaluation index of palette color proportion is designed and user research in the form of questionnaires is carried out. The 50 sets of color matching samples using the CF-PCN model and the model in Ref.[6] are studied for the evaluation.

Fig. 9 Results of smart clothing fabric color matching system with reference to popular colors: (a) rough; (b) natural; (c) dynamic; (d) romantic; (e) lovely; (f) luxurious

The evaluation index of palette color proportionpcis defined in Eq. (6). It counts the pixel ratio of colors in the 5-color popular palette among the clothing fabric color matching image. The higher palette color proportion is, the better the color matching image is

(6)

wherepirepresents the number of pixels of theith color in the 5-color popular palette, andpsumrepresents the total number of pixels in the clothing fabric color matching image.

A questionnaire was designed to compare the given color matching results of the CF-PCN model and the model in Ref.[6] among 50 users. The users were asked to select the better color matching effect in each set among the 50 sets. The rates of votes obtained by the two models were counted.

Table 2 Evaluation comparison of color matching effects

Table S1 Clothing fabric style table in language image coordinate system (16 categories)

The proposed smart fabric color matching system is applied to generate color palette with reference to popular colors and color the clothing fabrics. And the analysis of the results is presented.

Figure 9 shows 6 groups of color matching results. The first column is the grayscale image of clothing fabrics, the second column is the 5-color popular palette, the third column is the clothing fabrics color matching image generated by CF-PCN model using the 5-color popular palette, and the fourth column is the original clothing fabric image of the brand. The color style categories classified by SVM model of the generated color matching image and the original one are given in the bottom of columns 3 and 4. It is clear that the styles of two images are of consistence. The CF-PCN model is capable of obtaining the color matching image of clothing fabrics with reference to popular color palette. Compared with the original images, the color matching images of clothing fabrics have enough visual changes. Therefore, on the basis of maintaining the original color style of clothing fabrics for one certain brand, the goal of pursuing color matching innovation is realized.

4 Conclusions

This paper designs a smart clothing fabric color matching system with reference to popular colors. The method includes two parts: a palette generation module referring to popular colors and CF-PCN. In the part of the palette generation, an SVM-based clothing fabric style classification model is designed to judge the color style of the original clothing fabric image for one certain brand. A popular color selection model based on a discrete particle swarm optimization algorithm is designed to select the appropriate 5-color popular palette by iterations. The CF-PCN employs a U-Net structure-based conditional generative adversarial network to generate clothing fabric color matching images according to the optimal 5-color popular palettes. The average pixel ratio of the color palette in the proposed clothing color matching image reaches 90.2%, which is 29.6% higher than that of the model in Ref.[6]. Moreover, the vote rate in the user research is much higher than that of the latter. The results of the smart clothing fabric color matching system with reference to popular colors provide color matching images for maintaining the original brand style and pursuing color innovation. The proposed method thus explores feasible strategy for designers.

Appendix A

猜你喜欢
爱华
求解含参不等式恒成立问题的三种途径
例析不同形状容器中液体压强的判断
紫色的钢笔
野花
倾注爱心 点亮希望
第一次拔牙
神奇的光
在厦金胞张爱华孝亲牵起两岸情
爱在下雪时