CN114187495A - An Image-Based Apparel Trend Prediction Method - Google Patents
An Image-Based Apparel Trend Prediction Method Download PDFInfo
- Publication number
- CN114187495A CN114187495A CN202210127383.3A CN202210127383A CN114187495A CN 114187495 A CN114187495 A CN 114187495A CN 202210127383 A CN202210127383 A CN 202210127383A CN 114187495 A CN114187495 A CN 114187495A
- Authority
- CN
- China
- Prior art keywords
- image
- clothing
- foreground
- fashion trend
- trend prediction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 30
- 238000000605 extraction Methods 0.000 claims abstract description 39
- 238000004364 calculation method Methods 0.000 claims abstract description 6
- 238000007781 pre-processing Methods 0.000 claims abstract description 4
- 238000011176 pooling Methods 0.000 claims description 48
- 230000004927 fusion Effects 0.000 claims description 36
- 230000006870 function Effects 0.000 claims description 33
- 230000011218 segmentation Effects 0.000 claims description 24
- 238000000354 decomposition reaction Methods 0.000 claims description 16
- 230000003044 adaptive effect Effects 0.000 claims description 12
- 239000000203 mixture Substances 0.000 claims description 12
- 230000004913 activation Effects 0.000 claims description 10
- 238000013527 convolutional neural network Methods 0.000 claims description 10
- 238000010606 normalization Methods 0.000 claims description 10
- 230000008569 process Effects 0.000 claims description 9
- 238000004458 analytical method Methods 0.000 claims description 7
- 238000013461 design Methods 0.000 claims description 6
- 238000011156 evaluation Methods 0.000 claims description 6
- 239000011159 matrix material Substances 0.000 claims description 6
- 238000012545 processing Methods 0.000 claims description 6
- 238000013480 data collection Methods 0.000 claims description 4
- 230000004931 aggregating effect Effects 0.000 claims description 3
- 238000009499 grossing Methods 0.000 claims description 3
- 238000007620 mathematical function Methods 0.000 claims description 3
- 238000005457 optimization Methods 0.000 claims description 3
- 238000012549 training Methods 0.000 claims description 3
- 238000013277 forecasting method Methods 0.000 claims 3
- 238000013135 deep learning Methods 0.000 abstract description 4
- 230000000694 effects Effects 0.000 abstract description 2
- 206010063385 Intellectualisation Diseases 0.000 abstract 1
- 238000013528 artificial neural network Methods 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 101100481876 Danio rerio pbk gene Proteins 0.000 description 1
- 101100481878 Mus musculus Pbk gene Proteins 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/25—Fusion techniques
- G06F18/253—Fusion techniques of extracted features
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/194—Segmentation; Edge detection involving foreground-background segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Business, Economics & Management (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Computation (AREA)
- Human Resources & Organizations (AREA)
- General Engineering & Computer Science (AREA)
- Strategic Management (AREA)
- Economics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Game Theory and Decision Science (AREA)
- Health & Medical Sciences (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Entrepreneurship & Innovation (AREA)
- Marketing (AREA)
- Operations Research (AREA)
- Quality & Reliability (AREA)
- Tourism & Hospitality (AREA)
- General Business, Economics & Management (AREA)
- Development Economics (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Image Analysis (AREA)
Abstract
Description
技术领域technical field
本发明属于智能服装技术领域,更具体地,涉及一种基于图像的服装流行趋势预测方法。The invention belongs to the technical field of intelligent clothing, and more particularly, relates to an image-based clothing fashion trend prediction method.
背景技术Background technique
目前,在线上服装领域,通常会由设计师通过自己的学识经验来设计新的服饰,每次设计一款服饰要消耗大量的时间和精力,设计师也不可能面面俱到的设计出所需的每一种风格的服饰,未来各个地区所流行的服饰并不能被轻易的预测,通常还需要多个熟悉该地区的设计师参与。因此,在服装领域,对服装未来发展趋势的智能预测拥有潜在且巨大的应用场景。At present, in the field of online clothing, designers usually design new clothing through their own knowledge and experience. It takes a lot of time and energy to design a piece of clothing each time, and it is impossible for designers to design every piece of clothing required. For a style of clothing, the clothing that will be popular in various regions in the future cannot be easily predicted, and usually requires the participation of multiple designers who are familiar with the region. Therefore, in the field of clothing, the intelligent prediction of the future development trend of clothing has potential and huge application scenarios.
公开号为CN110705755A的中国专利公开了“一种基于深度学习的服装流行趋势预测方法与装置”,从电商服装网站采集历年的流行服装图片和信息,进行特征提取和整合,再根据模型结果输出服装流行度为topk的服装排名的方案,但是这种方案对于服装流行趋势预测不准确,还需进一步优化。The Chinese patent with publication number CN110705755A discloses "a method and device for predicting clothing trends based on deep learning", which collects pictures and information of popular clothing over the years from e-commerce clothing websites, performs feature extraction and integration, and then outputs according to the model results. The scheme of clothing rankings whose clothing popularity is topk, but this scheme is inaccurate for the prediction of clothing fashion trends and needs to be further optimized.
发明内容SUMMARY OF THE INVENTION
针对现有技术的以上缺陷或改进需求,本发明提供了一种基于图像的服装流行趋势预测方法,其目的在于通过收集当下各大网上服装购物网站的服装图片,通过深度学习方法预测服装流行趋势,可靠且具有实时性。In view of the above defects or improvement needs of the prior art, the present invention provides an image-based clothing fashion trend prediction method, the purpose of which is to predict the clothing fashion trend through a deep learning method by collecting clothing pictures from major online clothing shopping websites. , reliable and real-time.
为实现上述目的,按照本发明的一个方面,提供了一种基于图像的服装流行趋势预测方法,包括如下步骤:In order to achieve the above object, according to one aspect of the present invention, a method for predicting a fashion trend of clothing based on an image is provided, comprising the following steps:
步骤1,首先搜集服装图像数据集,并对服装图像数据进行预处理;Step 1, first collect the clothing image data set, and preprocess the clothing image data;
步骤2,使用基于图像多尺度分解的前景提取模型提取服装图像前景;Step 2, using the foreground extraction model based on image multi-scale decomposition to extract the foreground of the clothing image;
步骤3,基于多卷积核深度卷积神经网络的服装图像特征提取与融合,得到最终的服装图像特征图;Step 3, based on multi-convolution kernel deep convolutional neural network clothing image feature extraction and fusion, to obtain the final clothing image feature map;
步骤4,构建服装流行趋势预测模型,将最终的服装图像特征作为服装流行趋势预测模型的输入,得到当前服装流行趋势;Step 4, constructing a clothing fashion trend prediction model, and using the final clothing image feature as the input of the clothing fashion trend prediction model to obtain the current clothing fashion trend;
所述服装流行趋势预测模块包括:自适应加权池化层、全连接层和softmax层。The clothing fashion trend prediction module includes: an adaptive weighted pooling layer, a fully connected layer and a softmax layer.
进一步的,步骤1中,通过网络爬虫、手工采集方式搜集各大购物网站的服装图像,其中购物网站包括亚马逊-网上购物商城、天猫商城、淘宝网以及京东商城。Further, in step 1, the clothing images of major shopping websites are collected by means of web crawlers and manual collection, wherein the shopping websites include Amazon-Online Shopping Mall, Tmall Mall, Taobao.com and Jingdong Mall.
进一步的,服装图像数据预处理包括:通过双线性插值法调整图像大小,然后进行图像尺度归一化和图像标准化。Further, the preprocessing of the clothing image data includes: adjusting the image size through bilinear interpolation, and then performing image scale normalization and image normalization.
进一步的,步骤2的具体实现方式如下;Further, the specific implementation of step 2 is as follows;
Step21,运用全变分对图像进行多尺度分解得到一系列平滑图像;Step21, use total variation to decompose the image at multiple scales to obtain a series of smooth images;
Step22,将给定平滑图像前景颜色分布表示为高斯混合模型,并运用直方图形状分析方法优化高斯混合模型的高斯函数个数;Step22, express the foreground color distribution of the given smooth image as a Gaussian mixture model, and use the histogram shape analysis method to optimize the number of Gaussian functions of the Gaussian mixture model;
Step23,根据不同平滑图像的分割结果设计迭代终止条件,使得从平滑图像的分解尺度中提取前景。Step 23: Design iteration termination conditions according to the segmentation results of different smooth images, so that the foreground is extracted from the decomposition scale of the smooth images.
进一步的,Step22中运用直方图形状分析方法优化高斯混合模型的具体实现方式如下;Further, the specific implementation of optimizing the Gaussian mixture model using the histogram shape analysis method in Step 22 is as follows;
第 m个区域的高斯分布表示如下,The Gaussian distribution of the mth region is expressed as follows,
式中,G表示高斯函数,μ m 和∑m分别是该区域颜色分布的均值向量和协方差矩阵,u(i)表示平滑图像u中的第i个像素,计算时取像素值;det为数学函数,用于求一个方阵的行列式;In the formula, G represents the Gaussian function, μ m and ∑ m are the mean vector and covariance matrix of the color distribution in the region, respectively, u ( i ) represents the ith pixel in the smooth image u , and the pixel value is taken during calculation; det is Mathematical function for finding the determinant of a square matrix;
利用直方图的每个波峰表示图像区域亮度分布,用中值滤波进行平滑处理,平滑 后的直方图为,直方图中共有256个值,分别用表示,利用直方图波谷将图像分为N个区域,结合分割曲线计算出前景F 和背景B中区域个数,像素u(i)属于前景或背景的可能性为: Each peak of the histogram is used to represent the brightness distribution of the image area, and the median filter is used for smoothing. The smoothed histogram is , there are 256 values in the histogram, respectively means that the image is divided into N regions by using the histogram trough, and the number of regions in the foreground F and the background B is calculated by combining the segmentation curves. The possibility that the pixel u ( i ) belongs to the foreground or background is:
式中,表示分割结果,其中,x n =1表示前景,x n =0表示 背景,L F 和L B 分别表示像素是u(i)前景和背景的可能性,ω F 和ω B 分别表示前景和背景的参 数,n F 表示前景像素个数,n B 表示背景像素个数;优化后高斯混合模型表示为: In the formula, represents the segmentation result, where x n =1 represents the foreground, x n =0 represents the background, LF and LB represent the possibility that the pixel is u ( i ) foreground and background, respectively, ω F and ω B represent the foreground and background, respectively The parameters of , n F represents the number of foreground pixels, n B represents the number of background pixels; the optimized Gaussian mixture model is expressed as:
其中,U(x,w,u)为参数w下x对平滑图像u的分割结果评价;w表示前、背景颜色分布参数。Among them, U ( x, w, u ) is the evaluation of the segmentation result of the smooth image u by x under the parameter w ; w represents the front and background color distribution parameters.
进一步的,Step23中结合CrabCut和平滑图像的颜色分布模型,将前景提取转换为分割和分解尺度的联合优化,前景提取的能量泛函x*为:Further, in Step 23, combining CrabCut and the color distribution model of the smooth image, the foreground extraction is converted into a joint optimization of segmentation and decomposition scale. The energy functional x* of foreground extraction is:
式中,α和β表示权重;第一项M(u,u 0 )是图像多尺度分解,u 0 表示原始图像,u为平滑图像;第二项为平滑图像的前景提取,S(x,w,u)表示为:In the formula, α and β represent weights; the first term M ( u, u 0 ) is the multi-scale decomposition of the image, u 0 represents the original image, and u is the smooth image; the second term is the foreground extraction of the smooth image, S ( x, w,u ) is expressed as:
式中,U(x,w,u)为参数w下x对平滑图像u的分割结果评价;w表示前、背景颜色分布 参数,表示分割结果,其中,x n =1表示前景,x n =0表示背景;V(x, u)定义为将分割曲线放置在前景边界上的惩罚,如下式: In the formula, U ( x, w, u ) is the evaluation of the segmentation result of the smooth image u by x under the parameter w ; w represents the front and background color distribution parameters, represents the segmentation result, where x n =1 represents the foreground and x n =0 represents the background; V ( x, u ) is defined as the penalty for placing the segmentation curve on the foreground boundary, as follows:
式中,A i 是第i个像素的相邻像素集,j为A i 中的像素;dis(∙)表示像素对的欧几里得距离;[∙]是指示函数;γ和β表示权重;u(∙)表示平滑图像。In the formula, A i is the adjacent pixel set of the ith pixel, j is the pixel in A i ; dis (∙) represents the Euclidean distance of the pixel pair; [∙] is the indicator function; γ and β represent the weight ; u(∙) denotes a smooth image.
进一步的,所述多卷积核深度卷积神经网络包括多卷积核特征提取模块和多卷积核特征融合模块,具体实现方式如下;Further, the multi-convolution kernel deep convolutional neural network includes a multi-convolution kernel feature extraction module and a multi-convolution kernel feature fusion module, and the specific implementation is as follows;
(31)使用多卷积核特征提取模块提取服装图像特征,包括款式、色系和风格;(31) Use the multi-convolution kernel feature extraction module to extract clothing image features, including style, color and style;
首先,对输入的图像进行两次卷积操作和激活函数操作,对图像特征进行提取,生成维度为224×224×64的服装图像特征图,并在此基础上对提取到的特征图像进行最大池化操作,将特征图维度转换至112×112×64;然后,进行卷积操作和激活函数操作,并对经过相应操作后提取到的特征图进行最大池化操作,生成维度为56×56×128的特征图,作为多卷积核融合模块的输入;First, perform two convolution operations and activation function operations on the input image, extract the image features, and generate a clothing image feature map with a dimension of 224 × 224 × 64. The pooling operation converts the dimension of the feature map to 112×112×64; then, perform the convolution operation and the activation function operation, and perform the maximum pooling operation on the feature map extracted after the corresponding operation, and the generated dimension is 56×56 The feature map of ×128 is used as the input of the multi-convolution kernel fusion module;
(32)使用多卷积核特征融合模块对提取的特征进行融合,得到最终的服装图像特征图(32) Use the multi-convolution kernel feature fusion module to fuse the extracted features to obtain the final clothing image feature map
多卷积核特征融合模块包括:模块内特征信息融合和模块间特征信息融合;The multi-convolution kernel feature fusion module includes: intra-module feature information fusion and inter-module feature information fusion;
其中,模块内特征信息融合包括三个分支,三个分支分别使用尺寸为3×3和5×5以及7×7的卷积核对多卷积核特征提取模块输出的特征进行进一步的特征提取,三个分支使用并联方式对特征进行提取,模块间特征信息融合通过对模块内特征信息融合中的三个分支进行聚合后分别进行3×3的卷积操作然后输入到模块内特征信息融合部分再次进行聚合服装特征信息,最后再通过1×1卷积操作对提取到的特征信息进行融合并与输入特征信息再次聚合,达到将所提取的特征信息进行融合的目的,上述卷积操作中,除1×1卷积操作外,其他卷积操作后面都连接Relu激活函数。Among them, the feature information fusion in the module includes three branches, and the three branches use convolution kernels with sizes of 3×3, 5×5 and 7×7 to further extract the features output by the multi-convolution kernel feature extraction module. The three branches are used to extract features in parallel, and the feature information fusion between modules is performed by aggregating the three branches in the feature information fusion within the module, and then performing a 3 × 3 convolution operation, and then inputting it to the feature information fusion part of the module again. Aggregate clothing feature information, and finally fuse the extracted feature information through a 1×1 convolution operation and aggregate it again with the input feature information to achieve the purpose of fusing the extracted feature information. In the above convolution operation, except Except for the 1×1 convolution operation, other convolution operations are followed by the Relu activation function.
进一步的,自适应加权池化层的具体处理过程包括;Further, the specific processing process of the adaptive weighted pooling layer includes;
输入:待池化的特征图、池化窗口大小n,损失函数J、学习率β;Input: feature map to be pooled, pooling window size n , loss function J , learning rate β ;
Step41:对于每个池化层,根据该层的池化窗口大小选择重要性参数的个数,对于有n个特征值α i 的池化窗口随机初始化n个重要性参数k i ,i=1,2,...,n;Step41: For each pooling layer, select the number of importance parameters according to the size of the pooling window of the layer, and randomly initialize n importance parameters k i for the pooling window with n eigenvalues α i , i =1 ,2,..., n ;
Step42:将每个池化窗口中的特征值按从大到小进行排序得到; Step42: Sort the eigenvalues in each pooling window in descending order to get ;
Step43:将初始化的重要性参数进行softmax 归一化得到权重参数;Step43: Perform softmax normalization on the initialized importance parameters to obtain weight parameters;
Step44:将权重参数与每个池化窗口中对应的特征值相乘后累加得到池化结果:Step44: Multiply the weight parameter with the corresponding eigenvalue in each pooling window and accumulate to obtain the pooling result:
Step45:初始化的后的权重参数w i ,在训练的过程中会随着反向传播的进行通过梯度下降不断迭代优化,直至收敛:Step45: The initialized weight parameter w i will be iteratively optimized through gradient descent with the progress of backpropagation during the training process until convergence:
其中,α i 为特征值,k i 为池化窗口随机初始化参数,w i 为权重参数,z为权重参数与每个池化窗口中对应的特征值相乘后累加得到池化结果,∂表示偏微分。Among them, α i is the eigenvalue, ki is the random initialization parameter of the pooling window, wi is the weight parameter, z is the weight parameter multiplied by the corresponding eigenvalue in each pooling window, and then accumulated to obtain the pooling result, ∂ represents partial differential.
进一步的,整个服装流行趋势预测模型的损失函数和自适应加权池化层中的损失函数J相同,采用交叉熵损失函数:Further, the loss function of the entire clothing fashion trend prediction model is the same as the loss function J in the adaptive weighted pooling layer, and the cross entropy loss function is used:
其中,x表示输入模型的服装图像特征图,p和q分别代表服装分类的分类真实值和服装分类预测值。Among them, x represents the clothing image feature map of the input model, and p and q represent the true value of the clothing classification and the predicted value of the clothing classification, respectively.
进一步的,softmax层的处理过程如下;Further, the processing process of the softmax layer is as follows;
其中,Z i 为第i个结点的输出值,C为输出结点的个数,即最终分类结果的类别个数。Among them, Z i is the output value of the ith node, and C is the number of output nodes, that is, the number of categories of the final classification result.
按照本发明的另一个方面,提供了一种基于图像的服装流行趋势预测系统,包括如下模块:According to another aspect of the present invention, an image-based clothing fashion trend prediction system is provided, comprising the following modules:
服装图像数据采集模块,用于搜集服装图像数据集,并对服装图像数据进行预处理;The clothing image data collection module is used to collect clothing image data sets and preprocess the clothing image data;
图像前景提取模块,用于使用基于图像多尺度分解的前景提取模型提取服装图像前景;The image foreground extraction module is used to extract the clothing image foreground using a foreground extraction model based on image multi-scale decomposition;
服装图像特征提取模块,用于基于多卷积核深度卷积神经网络的服装图像特征提取与融合,得到最终的服装图像特征图;The clothing image feature extraction module is used for the clothing image feature extraction and fusion based on the multi-convolution kernel deep convolutional neural network to obtain the final clothing image feature map;
服装流行趋势预测模块,用于构建服装流行趋势预测模型,将最终的服装图像特征作为服装流行趋势预测模型的输入,得到当前服装流行趋势;The clothing fashion trend prediction module is used to construct a clothing fashion trend prediction model, and the final clothing image feature is used as the input of the clothing fashion trend prediction model to obtain the current clothing fashion trend;
所述服装流行趋势预测模型包括:自适应加权池化层、全连接层和softmax层。The clothing fashion trend prediction model includes: an adaptive weighted pooling layer, a fully connected layer and a softmax layer.
总体而言,通过本发明所构思的以上技术方案与现有技术相比,能够取得下列有益效果:In general, compared with the prior art, the above technical solutions conceived by the present invention can achieve the following beneficial effects:
(1)本发明提供的一种基于图像的服装流行趋势预测方法,利用服装图像预测服装流行趋势,包括服装款式、色系和风格,通过深度学习方法预测服装流行趋势,可靠且具有实时性;(1) An image-based clothing fashion trend prediction method provided by the present invention uses clothing images to predict clothing fashion trends, including clothing styles, colors and styles, and predicts clothing fashion trends through a deep learning method, which is reliable and real-time;
(2)本发明提供的一种基于图像的服装流行趋势预测方法,相比于现有技术,本发明可极大减少计算成本和降低系统复杂性,提高了流行预测的效果和质量。(2) An image-based clothing fashion trend prediction method provided by the present invention, compared with the prior art, the present invention can greatly reduce the calculation cost and system complexity, and improve the effect and quality of fashion prediction.
附图说明Description of drawings
图1是本发明实施例提供的一种基于图像的服装流行趋势预测系统流程示意图;1 is a schematic flowchart of an image-based clothing fashion trend prediction system provided by an embodiment of the present invention;
图2是本发明实施例提供的多卷积核深度卷积神经网络结构图。FIG. 2 is a structural diagram of a deep convolutional neural network with multiple convolution kernels provided by an embodiment of the present invention.
具体实施方式Detailed ways
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。此外,下面所描述的本发明各个实施方式中所涉及到的技术特征只要彼此之间未构成冲突就可以相互组合。In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
图1所示,是实施例提供的一种基于图像的服装流行趋势预测系统流程示意图,包括服装图像数据采集模块、图像前景提取模块、服装图像特征提取模块以及服装流行趋势预测模块4个部分,各个模块的具体处理过程如下:As shown in Fig. 1, it is a kind of schematic flow chart of the clothing fashion trend prediction system based on image provided by the embodiment, including clothing image data collection module, image foreground extraction module, clothing image feature extraction module and clothing fashion trend prediction module 4 parts, The specific processing process of each module is as follows:
服装图像数据采集模块,用于搜集服装图像数据集,并对服装图像数据进行预处理;The clothing image data collection module is used to collect clothing image data sets and preprocess the clothing image data;
图像前景提取模块,用于使用基于图像多尺度分解的前景提取模型提取服装图像前景;The image foreground extraction module is used to extract the clothing image foreground using a foreground extraction model based on image multi-scale decomposition;
服装图像特征提取模块,用于基于多卷积核深度卷积神经网络的服装图像特征提取与融合,得到最终的服装图像特征图;The clothing image feature extraction module is used for the clothing image feature extraction and fusion based on the multi-convolution kernel deep convolutional neural network to obtain the final clothing image feature map;
服装流行趋势预测模块,用于构建服装流行趋势预测模型,将最终的服装图像特征作为服装流行趋势预测模型的输入,得到当前服装流行趋势;The clothing fashion trend prediction module is used to construct a clothing fashion trend prediction model, and the final clothing image feature is used as the input of the clothing fashion trend prediction model to obtain the current clothing fashion trend;
所述服装流行趋势预测模型包括:自适应加权池化层、全连接层和softmax层。The clothing fashion trend prediction model includes: an adaptive weighted pooling layer, a fully connected layer and a softmax layer.
与系统对应,本发明还提供的一种基于图像的服装流行趋势预测方法,包括如下步骤:Corresponding to the system, the present invention also provides an image-based clothing fashion trend prediction method, comprising the following steps:
(1)首先搜集服装图像数据集,并对服装图像数据进行预处理;(1) First collect the clothing image data set, and preprocess the clothing image data;
本实施例中通过网络爬虫、手工采集方式搜集各大购物网站的服装图像,对服装图像进行图像尺度归一化和图像标准化,其中购物网站包括亚马逊-网上购物商城(amazon.com)、天猫商城(tmall.com)、淘宝网(taobao.com)以及京东商城(jd.com)。In this embodiment, the clothing images of major shopping websites are collected by means of web crawlers and manual collection, and image scale normalization and image standardization are performed on the clothing images, wherein the shopping websites include Amazon-online shopping mall (amazon.com), Tmall Mall (tmall.com), Taobao (taobao.com) and Jingdong Mall (jd.com).
其中,服装图像数据预处理包括:通过双线性插值法调整图像大小,然后进行图像尺度归一化和图像标准化。实施例中,图像大小为224×224×3。Among them, the preprocessing of clothing image data includes: adjusting the image size by bilinear interpolation, and then performing image scale normalization and image normalization. In an embodiment, the image size is 224×224×3.
(2)图像前景提取,用于获取前景图像;(2) Image foreground extraction, which is used to obtain foreground images;
使用基于图像多尺度分解的前景提取模型提取服装图像前景。The foreground of clothing images is extracted using a foreground extraction model based on image multi-scale decomposition.
Step21:运用全变分对图像进行多尺度分解得到一系列平滑图像,该分解保护了图像边缘并平滑了纹理,压缩了图像区域颜色的分布范围;Step21: Use total variation to decompose the image at multiple scales to obtain a series of smooth images. The decomposition protects the edge of the image, smoothes the texture, and compresses the color distribution range of the image area;
Step22:将给定平滑图像前景颜色分布表示为高斯混合模型,并运用直方图形状分析方法优化高斯混合模型的高斯函数个数;Step22: Express the foreground color distribution of the given smooth image as a Gaussian mixture model, and use the histogram shape analysis method to optimize the number of Gaussian functions of the Gaussian mixture model;
其中,对于每个平滑图像,采用直方图形状分析方法对其颜色分布进行准确建模。Among them, for each smooth image, the histogram shape analysis method is used to accurately model its color distribution.
其中,直方图形状分析方法优化高斯混合模型。假设平滑图像中每个区域颜色分布紧凑,区域颜色分布可表示为高斯函数,以第 m个区域为例:Among them, the histogram shape analysis method optimizes the Gaussian mixture model. Assuming that the color distribution of each region in the smooth image is compact, the regional color distribution can be expressed as a Gaussian function, taking the mth region as an example:
式中,G表示高斯函数,μ m 和∑m分别是该区域颜色分布的均值向量和协方差矩阵,u(i)表示平滑图像u中的第i个像素,计算时取像素值;det为数学函数,用于求一个方阵的行列式;In the formula, G represents the Gaussian function, μ m and ∑ m are the mean vector and covariance matrix of the color distribution in the region, respectively, u ( i ) represents the ith pixel in the smooth image u , and the pixel value is taken during calculation; det is Mathematical function for finding the determinant of a square matrix;
利用直方图的每个波峰表示图像区域亮度分布,用中值滤波进行平滑处理,平滑 后的直方图为,直方图中共有256个值,分别用表示,利用直方图波谷将图像分为N个区域,结合分割曲线计算出前景F 和背景B中区域个数,像素u(i)属于前景或背景的可能性为: Each peak of the histogram is used to represent the brightness distribution of the image area, and the median filter is used for smoothing. The smoothed histogram is , there are 256 values in the histogram, respectively means that the image is divided into N regions by using the histogram trough, and the number of regions in the foreground F and the background B is calculated by combining the segmentation curves. The possibility that the pixel u ( i ) belongs to the foreground or background is:
式中,表示分割结果,其中,x n =1表示前景,x n =0表示 背景,L F 和L B 分别表示像素是u(i)前景和背景的可能性,ω F 和ω B 分别表示前景和背景的参 数,n F 表示前景像素个数,n B 表示背景像素个数;优化后高斯混合模型表示为: In the formula, represents the segmentation result, where x n =1 represents the foreground, x n =0 represents the background, LF and LB represent the possibility that the pixel is u ( i ) foreground and background, respectively, ω F and ω B represent the foreground and background, respectively The parameters of , n F represents the number of foreground pixels, n B represents the number of background pixels; the optimized Gaussian mixture model is expressed as:
其中,U(x,w,u)为参数w下x对平滑图像u的分割结果评价;w表示前、背景颜色分布参数。Among them, U ( x, w, u ) is the evaluation of the segmentation result of the smooth image u by x under the parameter w ; w represents the front and background color distribution parameters.
Step23:根据不同平滑图像的分割结果设计迭代终止条件,使得从平滑图像的分解尺度中提取前景。Step23: Design iteration termination conditions according to the segmentation results of different smooth images, so that the foreground is extracted from the decomposition scale of the smooth images.
其中,结合CrabCut和平滑图像的颜色分布模型,将前景提取转换为分割和分解尺 度的联合优化。一副具有N个像素的原始图像被初始矩形框划 分为背景区域B和带有少量背景像素的前景区域F,RGB分别表示红绿蓝,u R 表示红像素的集 合,u G 表示绿像素的集合,u B 表示蓝像素的集合,表示原始图像u 0 中所有像素的集合。其 前景提取的能量泛函x*为: Among them, the combination of CrabCut and the color distribution model of smooth images transforms foreground extraction into a joint optimization of segmentation and decomposition scales. an original image with N pixels It is divided into a background area B and a foreground area F with a small number of background pixels by the initial rectangular frame, RGB represents red, green and blue respectively, u R represents the set of red pixels, u G represents the set of green pixels, u B represents the set of blue pixels , represents the set of all pixels in the original image u0 . Its foreground extracted energy functional x* is:
式中,α和β表示权重;第一项M(u,u 0 )是图像多尺度分解,u 0 表示原始图像,u为平滑图像;第二项为平滑图像的前景提取,S(x,w,u)表示为:In the formula, α and β represent weights; the first term M ( u, u 0 ) is the multi-scale decomposition of the image, u 0 represents the original image, and u is the smooth image; the second term is the foreground extraction of the smooth image, S ( x, w,u ) is expressed as:
式中,U(x,w,u)为参数w下x对平滑图像u的分割结果评价;w表示前、背景颜色分布 参数,表示分割结果,其中,x n =1表示前景,x n =0表示背景;V(x, u)定义为将分割曲线放置在前景边界上的惩罚,如下式: In the formula, U ( x, w, u ) is the evaluation of the segmentation result of the smooth image u by x under the parameter w ; w represents the front and background color distribution parameters, represents the segmentation result, where x n =1 represents the foreground and x n =0 represents the background; V ( x, u ) is defined as the penalty for placing the segmentation curve on the foreground boundary, as follows:
式中,A i 是第i个像素的相邻像素集,j为A i 中的像素;dis(∙)表示像素对的欧几里得距离;[∙]是指示函数;γ和β表示权重;u(∙)表示平滑图像。In the formula, A i is the adjacent pixel set of the ith pixel, j is the pixel in A i ; dis (∙) represents the Euclidean distance of the pixel pair; [∙] is the indicator function; γ and β represent the weight ; u(∙) denotes a smooth image.
具体实施例中,γ取50,为确保上式的能量在低梯度时较大,而在高梯度时较小,,其中〈∙〉表示均值。 In a specific embodiment, γ is taken as 50, in order to ensure that the energy of the above formula is larger when the gradient is low, and small when the gradient is high, , where <∙> represents the mean.
(3)基于多卷积核深度卷积神经网络进行服装图像特征提取与融合,得到最终的服装图像特征图,所述多卷积核深度卷积神经网络包括多卷积核特征提取模块和多卷积核特征融合模块;(3) Extract and fuse clothing image features based on a multi-convolution kernel deep convolutional neural network to obtain the final clothing image feature map. The multi-convolution kernel deep convolutional neural network includes a multi-convolution kernel feature extraction module and a multi- Convolution kernel feature fusion module;
(31)使用多卷积核特征提取模块提取服装图像特征,包括款式、色系和风格。(31) Use a multi-convolution kernel feature extraction module to extract clothing image features, including style, color, and style.
具体实施例中,首先,对输入的图像进行两次卷积操作和激活函数操作,对图像特征进行提取,生成维度为224×224×64的服装图像特征图,并在此基础上对提取到的特征图像进行最大池化操作,将特征图维度转换至112×112×64。然后,进行卷积操作和激活函数操作,并对经过相应操作后提取到的特征图进行最大池化操作,生成维度为56×56×128的特征图,作为多卷积核融合模块的输入。In a specific embodiment, first, perform two convolution operations and activation function operations on the input image, extract the image features, and generate a clothing image feature map with a dimension of 224×224×64, and on this basis, extract the extracted image features. The feature image of the max pooling operation is performed to convert the feature map dimension to 112×112×64. Then, perform the convolution operation and activation function operation, and perform the maximum pooling operation on the feature map extracted after the corresponding operation to generate a feature map with a dimension of 56×56×128, which is used as the input of the multi-convolution kernel fusion module.
(32)使用多卷积核特征融合模块对提取的特征进行融合,得到最终的服装图像特征图。(32) Use the multi-convolution kernel feature fusion module to fuse the extracted features to obtain the final clothing image feature map.
如图2所示,是实施例提供的多卷积核特征融合模块网络结构图,其中,多卷积核特征融合模块包括:模块内特征信息融合和模块间特征信息融合。As shown in FIG. 2 , it is a network structure diagram of a multi-convolution kernel feature fusion module provided by an embodiment, wherein the multi-convolution kernel feature fusion module includes: intra-module feature information fusion and inter-module feature information fusion.
其中,模块内特征信息融合包括三个分支,三个分支分别使用尺寸为3×3和5×5以及7×7的卷积核对多卷积核特征提取模块输出的特征进行进一步的特征提取,三个分支使用并联方式对特征进行提取,模块间特征信息融合通过对模块内特征信息融合中的三个分支进行聚合后分别进行3×3的卷积操作然后输入到模块内特征信息融合部分再次进行聚合服装特征信息,最后再通过1×1卷积操作对提取到的特征信息进行融合并与输入特征信息再次聚合,达到将所提取的特征信息进行融合的目的,上述卷积操作中,除1×1卷积操作外,其他卷积操作后面都连接Relu激活函数。Among them, the feature information fusion in the module includes three branches, and the three branches use convolution kernels with sizes of 3×3, 5×5 and 7×7 to further extract the features output by the multi-convolution kernel feature extraction module. The three branches are used to extract features in parallel, and the feature information fusion between modules is performed by aggregating the three branches in the feature information fusion within the module, and then performing a 3 × 3 convolution operation, and then inputting it to the feature information fusion part of the module again. Aggregate clothing feature information, and finally fuse the extracted feature information through a 1×1 convolution operation and aggregate it again with the input feature information to achieve the purpose of fusing the extracted feature information. In the above convolution operation, except Except for the 1×1 convolution operation, other convolution operations are followed by the Relu activation function.
(4)构建服装流行趋势预测模型,将最终的服装图像特征作为服装流行趋势预测模型的输入,得到当前服装流行趋势。(4) Construct a clothing fashion trend prediction model, and use the final clothing image features as the input of the clothing fashion trend prediction model to obtain the current clothing fashion trend.
其中,所述服装流行趋势预测模块包括:自适应加权池化层、全连接层和softmax。Wherein, the clothing fashion trend prediction module includes: adaptive weighted pooling layer, fully connected layer and softmax.
其中,自适应加权池化层的处理过程具体包括:Among them, the processing process of the adaptive weighted pooling layer specifically includes:
输入:待池化的特征图、池化窗口大小n,损失函数J、学习率β;Input: feature map to be pooled, pooling window size n , loss function J , learning rate β ;
Step41:对于每个池化层,根据该层的池化窗口大小选择重要性参数的个数,对于有n个特征值α i 的池化窗口随机初始化n个重要性参数k i ,i=1,2,...,n;Step41: For each pooling layer, select the number of importance parameters according to the size of the pooling window of the layer, and randomly initialize n importance parameters k i for the pooling window with n eigenvalues α i , i =1 ,2,..., n ;
Step42:将每个池化窗口中的特征值按从大到小进行排序得到; Step42: Sort the eigenvalues in each pooling window in descending order to get ;
Step43:将初始化的重要性参数进行softmax 归一化得到权重参数;Step43: Perform softmax normalization on the initialized importance parameters to obtain weight parameters;
Step44:将权重参数与每个池化窗口中对应的特征值相乘后累加得到池化结果:Step44: Multiply the weight parameter with the corresponding eigenvalue in each pooling window and accumulate to obtain the pooling result:
Step45:初始化的后的权重参数w i ,在训练的过程中会随着反向传播的进行通过梯度下降不断迭代优化,直至收敛:Step45: The initialized weight parameter w i will be iteratively optimized through gradient descent with the progress of backpropagation during the training process until convergence:
其中,α i 为特征值,k i 为池化窗口随机初始化参数,w i 为权重参数,z为权重参数与每个池化窗口中对应的特征值相乘后累加得到池化结果,∂表示偏微分。Among them, α i is the eigenvalue, ki is the random initialization parameter of the pooling window, wi is the weight parameter, z is the weight parameter multiplied by the corresponding eigenvalue in each pooling window, and then accumulated to obtain the pooling result, ∂ represents partial differential.
其中,整个服装流行趋势预测模型的损失函数和自适应加权池化层中的损失函数J相同,采用交叉熵损失函数:Among them, the loss function of the entire clothing fashion trend prediction model is the same as the loss function J in the adaptive weighted pooling layer, and the cross entropy loss function is used:
其中,x表示输入模型的服装图像特征图,p和q分别代表服装分类的分类真实值和服装分类预测值。经过交叉熵损失函数计算后得到的数值不一定满足概率分布的条件和意义,所以需要最终经过softmax激活函数,将数据处理成为概率分布的形式,满足服装图像算法的多分类任务要求。Among them, x represents the clothing image feature map of the input model, and p and q represent the true value of the clothing classification and the predicted value of the clothing classification, respectively. The value obtained after the calculation of the cross entropy loss function does not necessarily meet the conditions and meaning of the probability distribution, so it is necessary to finally process the data into the form of a probability distribution through the softmax activation function to meet the multi-classification task requirements of the clothing image algorithm.
其中,Z i 为第i个结点的输出值,C为输出结点的个数,即最终分类结果的类别个数。Among them, Z i is the output value of the ith node, and C is the number of output nodes, that is, the number of categories of the final classification result.
本领域的技术人员容易理解,以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。Those skilled in the art can easily understand that the above are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention, etc., All should be included within the protection scope of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210127383.3A CN114187495A (en) | 2022-02-11 | 2022-02-11 | An Image-Based Apparel Trend Prediction Method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210127383.3A CN114187495A (en) | 2022-02-11 | 2022-02-11 | An Image-Based Apparel Trend Prediction Method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114187495A true CN114187495A (en) | 2022-03-15 |
Family
ID=80545831
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210127383.3A Pending CN114187495A (en) | 2022-02-11 | 2022-02-11 | An Image-Based Apparel Trend Prediction Method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114187495A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116188792A (en) * | 2023-02-23 | 2023-05-30 | 四川大学 | A quantitative analysis method and system for whole blood cell scattergram |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103718166A (en) * | 2011-08-02 | 2014-04-09 | 索尼公司 | Information processing apparatus, information processing method, and computer program product |
CN108960499A (en) * | 2018-06-27 | 2018-12-07 | 东华大学 | A kind of Fashion trend predicting system merging vision and non-vision feature |
CN110705755A (en) * | 2019-09-07 | 2020-01-17 | 创新奇智(广州)科技有限公司 | Garment fashion trend prediction method and device based on deep learning |
CN112434210A (en) * | 2020-12-14 | 2021-03-02 | 武汉纺织大学 | Clothing fashion trend prediction system and method |
CN112819510A (en) * | 2021-01-21 | 2021-05-18 | 江阴逐日信息科技有限公司 | Fashion trend prediction method, system and equipment based on clothing multi-attribute recognition |
CN113159826A (en) * | 2020-12-28 | 2021-07-23 | 武汉纺织大学 | Garment fashion element prediction system and method based on deep learning |
-
2022
- 2022-02-11 CN CN202210127383.3A patent/CN114187495A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103718166A (en) * | 2011-08-02 | 2014-04-09 | 索尼公司 | Information processing apparatus, information processing method, and computer program product |
CN108960499A (en) * | 2018-06-27 | 2018-12-07 | 东华大学 | A kind of Fashion trend predicting system merging vision and non-vision feature |
CN110705755A (en) * | 2019-09-07 | 2020-01-17 | 创新奇智(广州)科技有限公司 | Garment fashion trend prediction method and device based on deep learning |
CN112434210A (en) * | 2020-12-14 | 2021-03-02 | 武汉纺织大学 | Clothing fashion trend prediction system and method |
CN113159826A (en) * | 2020-12-28 | 2021-07-23 | 武汉纺织大学 | Garment fashion element prediction system and method based on deep learning |
CN112819510A (en) * | 2021-01-21 | 2021-05-18 | 江阴逐日信息科技有限公司 | Fashion trend prediction method, system and equipment based on clothing multi-attribute recognition |
Non-Patent Citations (3)
Title |
---|
王斌 等: ""基于图像多尺度分解的前景提取"", 《四川大学学报(自然科学版)》 * |
赵长乐: ""基于卷积神经网络的服装图像分类与去噪研究"", 《万方数据》 * |
龚柯: ""基于卷积神经网络的服装分类算法研究"", 《中国优秀硕士学位论文全文数据库 (工程科技Ⅰ辑)》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116188792A (en) * | 2023-02-23 | 2023-05-30 | 四川大学 | A quantitative analysis method and system for whole blood cell scattergram |
CN116188792B (en) * | 2023-02-23 | 2023-10-20 | 四川大学 | Quantitative analysis method and system for whole blood cell scatter diagram |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112766199B (en) | Hyperspectral image classification method based on self-adaptive multi-scale feature extraction model | |
CN109614985B (en) | Target detection method based on densely connected feature pyramid network | |
CN110110624B (en) | Human body behavior recognition method based on DenseNet and frame difference method characteristic input | |
CN109145992B (en) | Collaborative Generative Adversarial Networks and Space Spectrum Joint Method for Hyperspectral Image Classification | |
WO2021073418A1 (en) | Face recognition method and apparatus, device, and storage medium | |
CN109558806A (en) | The detection method and system of high score Remote Sensing Imagery Change | |
CN111931637A (en) | Cross-modal pedestrian re-identification method and system based on double-current convolutional neural network | |
CN109766858A (en) | Three-dimensional convolution neural network hyperspectral image classification method combined with bilateral filtering | |
CN112801015B (en) | Multi-mode face recognition method based on attention mechanism | |
CN110837768B (en) | An online detection and identification method for rare animal protection | |
CN106169081A (en) | A kind of image classification based on different illumination and processing method | |
CN109684922A (en) | A kind of recognition methods based on the multi-model of convolutional neural networks to finished product dish | |
CN110097029B (en) | Identity authentication method based on high way network multi-view gait recognition | |
CN110427821A (en) | A kind of method for detecting human face and system based on lightweight convolutional neural networks | |
CN110334584B (en) | Gesture recognition method based on regional full convolution network | |
CN117876890B (en) | A multi-source remote sensing image classification method based on multi-level feature fusion | |
CN113128308B (en) | Pedestrian detection method, device, equipment and medium in port scene | |
CN111222545B (en) | Image classification method based on linear programming incremental learning | |
CN111091129B (en) | Image salient region extraction method based on manifold ordering of multiple color features | |
CN109002755A (en) | Age estimation model building method and estimation method based on facial image | |
CN104751186A (en) | Iris image quality classification method based on BP (back propagation) network and wavelet transformation | |
WO2023179099A1 (en) | Image detection method and apparatus, and device and readable storage medium | |
CN114219824A (en) | Visible light-infrared target tracking method and system based on deep network | |
CN114330516A (en) | Small sample logo image classification based on multi-graph guided neural network model | |
CN113095218A (en) | Hyperspectral image target detection algorithm |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20220315 |