+

CN112861929B - An Image Classification Method Based on Semi-Supervised Weighted Transfer Discriminant Analysis - Google Patents

An Image Classification Method Based on Semi-Supervised Weighted Transfer Discriminant Analysis Download PDF

Info

Publication number
CN112861929B
CN112861929B CN202110075846.1A CN202110075846A CN112861929B CN 112861929 B CN112861929 B CN 112861929B CN 202110075846 A CN202110075846 A CN 202110075846A CN 112861929 B CN112861929 B CN 112861929B
Authority
CN
China
Prior art keywords
domain
semi
discriminant analysis
supervised
matrix
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.)
Active
Application number
CN202110075846.1A
Other languages
Chinese (zh)
Other versions
CN112861929A (en
Inventor
臧绍飞
马建伟
李兴海
张淼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Henan Plin Automatic Control Equipment Co ltd
Original Assignee
Henan University of Science and Technology
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Henan University of Science and Technology filed Critical Henan University of Science and Technology
Priority to CN202110075846.1A priority Critical patent/CN112861929B/en
Publication of CN112861929A publication Critical patent/CN112861929A/en
Application granted granted Critical
Publication of CN112861929B publication Critical patent/CN112861929B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2413Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an image classification method based on semi-supervised weighted migration discriminant analysis, and belongs to the technical field of machine learning. The method introduces the difference weight of a sample on the basis of the traditional feature migration method, constructs a feature migration classification model and solves the problem of image cross-domain classification. The invention firstly designs a cross-domain mean value approximation weight. And secondly, introducing cross-domain mean value approximation weight into the MMD, and improving and modifying the JDA. Then, adding a semi-supervised discriminant analysis SDA, fully mining the original spatial structure information of the label information and the data, and improving the class separability of the algorithm. The method can effectively extract high-quality shared features among fields, improve the transfer efficiency of knowledge among the fields and obtain higher classification precision.

Description

一种基于半监督加权迁移判别分析的图像分类方法An Image Classification Method Based on Semi-Supervised Weighted Transfer Discriminant Analysis

技术领域technical field

本发明涉及机器学习技术领域,特别涉及一种基于半监督加权迁移判别分析的图像分类方法。The invention relates to the technical field of machine learning, in particular to an image classification method based on semi-supervised weighted migration discriminant analysis.

背景技术Background technique

现有技术中采用机器学习方法进行迁移学习获得广泛研究。面对大数据技术快速发展和移动互联网、5G网络和高清摄像头等设备的推广与应用,人类接收高维视觉数据呈现指数增长,如何快速高效地挖掘此类数据的有价值信息成为一项重要挑战。特征提取将高维特征空间通过变换转化为相应的低维表示空间,且在低维空间尽可能地保持原有空间的判别信息,在充分利用数据有用信息的同时又可以避免出现维数灾难,已成为数据挖掘、机器学习、模式识别等领域的研究热点。In the prior art, transfer learning using machine learning methods has been extensively studied. In the face of the rapid development of big data technology and the promotion and application of mobile Internet, 5G network and high-definition cameras and other equipment, human beings receive high-dimensional visual data showing exponential growth. How to quickly and efficiently mine the valuable information of such data has become an important challenge. . Feature extraction converts the high-dimensional feature space into the corresponding low-dimensional representation space through transformation, and maintains the discriminative information of the original space as much as possible in the low-dimensional space. It can avoid the disaster of dimensionality while making full use of the useful information of the data. It has become a research hotspot in data mining, machine learning, pattern recognition and other fields.

当前学者提出了诸多特征提取算法,如主成分分析(Principal ComponentAnalysis,PCA)、线性判别分析(Linear Discriminant Analysis,LDA)、极大边界准则等。上述算法均为全局性算法,无法提取图像中的局部流形结构信息。为此又出现了诸多基于局部流形结构的特征提取算法,如:局部线性嵌入、等距特征映射、拉普拉斯特征映射、局部保持投影(Locality Preserving Projection,LPP)和邻域保持嵌入等。尽管它们可以提取数据集的局部结构信息,但无法解决对于外样本的学习问题。另外,还存在从其它非图论模型获取的特征提取算法,如非负矩阵分解和字典学习稀疏表示等。但是,它们均未将标签信息和几何结构统一到一个目标函数内同时利用。为此,现有技术又设计了半监督判别分析(Semi-supervised Discriminant Analysis,SDA),它在半监督情形下,同时整合了Fisher判别准则、局部保持正则化及Tikhonov正则化。通过对有标记数据保持类间散度最大化,且对有标记数据和无标记数据的内在空间结构进行保持,来实现特征提取。其他半监督特征提取方法,如半监督最大边界准则和半监督流形保持嵌入等也同样采用未标记样本来提升算法性能。At present, scholars have proposed many feature extraction algorithms, such as principal component analysis (Principal Component Analysis, PCA), linear discriminant analysis (Linear Discriminant Analysis, LDA), maximum boundary criterion and so on. The above algorithms are all global algorithms and cannot extract the local manifold structure information in the image. For this reason, many feature extraction algorithms based on local manifold structure have appeared, such as: local linear embedding, isometric feature map, Laplacian feature map, locality preserving projection (Locality Preserving Projection, LPP) and neighborhood preserving embedding, etc. . Although they can extract the local structure information of the dataset, they cannot solve the learning problem of out-of-sample. In addition, there are feature extraction algorithms derived from other non-graph-theoretic models, such as non-negative matrix factorization and dictionary learning sparse representation, etc. However, none of them unify label information and geometric structure into one objective function to exploit simultaneously. To this end, the prior art has designed a semi-supervised discriminant analysis (Semi-supervised Discriminant Analysis, SDA), which in a semi-supervised situation, simultaneously integrates Fisher's discriminant criterion, local preservation regularization and Tikhonov regularization. Feature extraction is achieved by maximizing the inter-class scatter for labeled data and maintaining the intrinsic spatial structure of both labeled and unlabeled data. Other semi-supervised feature extraction methods, such as semi-supervised maximum margin criterion and semi-supervised manifold-preserving embedding, also use unlabeled samples to improve algorithm performance.

然而通过分析可知,上述的特征提取算法均无法适用于迁移学习环境中。迁移学习突破传统机器学习训练模型的标记数据集与待测试的未标记数据集遵循相同的分布的限制,利用与目标域数据分布不同但相关的源域中的训练数据来帮助目标域中任务进行学习。为在迁移学习环境中进行有效的特征提取,还提出了迁移主成分分析(TransferComponent Analysis,TCA)算法,它将PCA与最大均值差异(Maximum Mean Discrepancy,MMD)相结合,在一定程度上实现了共享特征空间的抽取和知识的跨领域迁移,在迁移学习领域获得广泛应用。为了进一步提升算法性能,在TCA基础上,借助于源域数据标签和迭代精化机制,在目标域没有标记数据场景下,设计了一种新的特征提取算法:联合分布调整(Joint Distribution Adaptation,JDA)。JDA结合了MMD,在迭代过程中同时调整领域间的边缘分布差异和条件分布差异,并把它融入到主成分分析中来构建一个新的特征子空间,在这个新的特征子空间内源域和目标域间数据的边缘分布差异和条件分布差异被进一步缩小。However, it can be seen from the analysis that none of the above feature extraction algorithms can be applied in the transfer learning environment. Migration learning breaks through the limitation that the labeled data set of the traditional machine learning training model follows the same distribution as the unlabeled data set to be tested, and uses the training data in the source domain that is different from the target domain data distribution but related to help the task in the target domain. study. In order to carry out effective feature extraction in the transfer learning environment, the Transfer Component Analysis (TCA) algorithm is also proposed, which combines PCA with Maximum Mean Discrepancy (MMD) to achieve The extraction of shared feature space and the cross-domain transfer of knowledge have been widely used in the field of transfer learning. In order to further improve the performance of the algorithm, on the basis of TCA, with the help of the source domain data label and iterative refinement mechanism, a new feature extraction algorithm is designed in the scene where the target domain has no labeled data: Joint Distribution Adaptation (Joint Distribution Adaptation, JDA). JDA combines MMD to adjust the marginal distribution difference and conditional distribution difference between domains in the iterative process, and integrate it into principal component analysis to construct a new feature subspace, in which the source domain The marginal distribution difference and conditional distribution difference between the data and the target domain are further reduced.

基于半监督加权迁移判别分析的图像分类技术,通过将跨领域均值逼近权重加入到最大均值差异度量中,来改造联合分布调整,并结合半监督判别分析,使得算法在标签迭代精化过程中,充分挖掘标记信息和原始结构信息,以提升跨领域图像分类任务的效率。基于半监督加权迁移判别分析的图像分类技术提出跨领域均值逼近权重,并引入特征迁移学习技术中,是实现共享特征在不同领域间进行重复利用的新技术。The image classification technology based on semi-supervised weighted transfer discriminant analysis, by adding the cross-domain mean approximation weight into the maximum mean difference measure, to transform the joint distribution adjustment, and combined with semi-supervised discriminant analysis, the algorithm makes the algorithm in the process of label iterative refinement, Fully mine labeled information and original structure information to improve the efficiency of cross-domain image classification tasks. The image classification technology based on semi-supervised weighted transfer discriminant analysis proposes cross-domain mean approximation weights, and introduces feature transfer learning technology, which is a new technology to realize the reuse of shared features in different fields.

发明内容Contents of the invention

本发明的目的在于提供一种基于半监督加权迁移判别分析的图像分类方法,解决了当训练和测试样本来自不同分布,传统特征迁移方法在度量领域间分布差异时忽略样本差异性,且对样本标签信息和原始结构信息挖掘不充分,从而严重影响分类性能的问题。The object of the present invention is to provide an image classification method based on semi-supervised weighted transfer discriminant analysis, which solves the problem that when the training and test samples come from different distributions, the traditional feature transfer method ignores the sample difference when measuring the distribution difference between fields, and the sample Insufficient mining of label information and original structure information seriously affects classification performance.

本发明提出一种基于半监督加权迁移判别分析的图像分类方法,包含以下步骤:The present invention proposes a kind of image classification method based on semi-supervised weighted migration discriminant analysis, comprising the following steps:

S1:对源域和目标域图像样本分别进行预处理,获取源域和目标域数据集DS与DTS1: Preprocess the image samples of the source domain and the target domain respectively, and obtain the data sets D S and D T of the source domain and the target domain;

S2:分别采用源域和目标域数据集DS与DT,获取源域和目标域样本的跨领域均值逼近权重wS与wTS2: Obtain the cross-domain mean approximation weights w S and w T of the source domain and target domain samples using the source domain and target domain data sets D S and D T respectively;

S3:通过将wS与wT代入最大均值差异度量MMD,并代入联合分布调整JDA,构建加权联合分布调整方法WJDA,通过同时缩小领域间的边缘分布和条件分布,寻找最优特征子空间,保证源域和目标域间的图像特征在跨领域知识迁移过程中不变;S3: By substituting w S and w T into the maximum mean difference measure MMD, and substituting into the joint distribution adjustment JDA, the weighted joint distribution adjustment method WJDA is constructed, and the optimal feature subspace is found by simultaneously reducing the marginal distribution and conditional distribution between fields, Ensure that the image features between the source domain and the target domain remain unchanged during the cross-domain knowledge transfer process;

同时将半监督判别分析SDA与WJDA相结合,构建半监督加权迁移判别分析模型的目标函数;At the same time, the semi-supervised discriminant analysis SDA and WJDA are combined to construct the objective function of the semi-supervised weighted transfer discriminant analysis model;

采用广义特征分解方法学习特征子空间投影矩阵P*,获得不同领域间样本的共享特征表达Z*={ZS,ZT};Use the generalized eigendecomposition method to learn the feature subspace projection matrix P * , and obtain the shared feature expression Z * = {Z S , Z T } of samples in different fields;

S4:采用源域样本集DS的子空间特征表达ZS及其标签集YS训练k近邻分类器,对所述目标域数据集DT对应子空间特征表达ZT进行标签预测,获取预测结果YT,转至步骤S2,直到达到最大迭代次数或者YT不再变化。S4: Use the subspace feature expression Z S of the source domain sample set D S and its label set Y S to train the k-nearest neighbor classifier, and perform label prediction on the subspace feature expression Z T corresponding to the target domain data set D T to obtain the prediction As a result Y T , go to step S2 until the maximum number of iterations is reached or Y T no longer changes.

进一步地,所述步骤S1中,所述对源域和目标域中的图像样本预处理包含如下步骤:Further, in the step S1, the preprocessing of the image samples in the source domain and the target domain includes the following steps:

S11:对源域和目标域中图像样本DS1与DT1分别进行分辨率一致缩放处理,得到DS2与DT2S11: Scaling and scaling the image samples D S1 and D T1 in the source domain and the target domain respectively to obtain D S2 and D T2 ;

S12:将DS2与DT2分别进行归一化处理,得到DS3与DT3S12: Normalize D S2 and D T2 respectively to obtain D S3 and D T3 ;

S13:将DS3与DT3分别进行PCA降维处理,得到DS与DTS13: Perform PCA dimensionality reduction processing on D S3 and D T3 respectively to obtain D S and D T .

进一步地,所述步骤S2中设计样本的跨领域均值逼近权重,其表达如下:Further, in the step S2, the cross-domain mean value approximation weight of the design sample is expressed as follows:

Figure GDA0003875856420000041
Figure GDA0003875856420000041

其中,

Figure GDA0003875856420000042
μT(S)为目标(源)领域样本的均值。in,
Figure GDA0003875856420000042
μT (S) is the mean value of samples in the target (source) domain.

进一步地,所述步骤S3中加权联合分布调整目标函数构建过程为:Further, the weighted joint distribution adjustment objective function construction process in the step S3 is:

S31:给定来自两个相关的领域的高维数据集源域

Figure GDA0003875856420000043
和目标域
Figure GDA0003875856420000044
两个高维数据集共享标签集合
Figure GDA0003875856420000045
S31: Given a high-dimensional dataset source domain from two related domains
Figure GDA0003875856420000043
and the target domain
Figure GDA0003875856420000044
Two high-dimensional datasets share a set of labels
Figure GDA0003875856420000045

其中,nS和nT分别为两个数据集的样本个数,d为特征空间维数,DT中样本未含标记样本,ySi∈Y,C为类别个数;Among them, n S and n T are the number of samples of the two data sets respectively, d is the dimension of the feature space, the samples in D T do not contain labeled samples, y Si ∈ Y, and C is the number of categories;

联合分布调整(JDA)的目标函数为:The objective function of Joint Distribution Adjustment (JDA) is:

Figure GDA0003875856420000046
Figure GDA0003875856420000046

其中,X={DS∪DT},P为投影矩阵,

Figure GDA0003875856420000047
为中心矩阵,q∈Rn为元素为1的列向量,n=nS+nT;M0为(nS+nT)阶边缘分布差异矩阵,其元素为:Among them, X={D S ∪D T }, P is the projection matrix,
Figure GDA0003875856420000047
is the center matrix, q∈R n is a column vector with an element of 1, n=n S +n T ; M 0 is a (n S +n T ) order marginal distribution difference matrix, and its elements are:

Figure GDA0003875856420000048
Figure GDA0003875856420000048

Mc为条件分布差异权重矩阵,有:M c is the conditional distribution difference weight matrix, which is:

Figure GDA0003875856420000051
Figure GDA0003875856420000051

其中,

Figure GDA0003875856420000052
Figure GDA0003875856420000053
为源域和目标域中标签类别为c的样本子集,
Figure GDA0003875856420000054
Figure GDA0003875856420000055
分别为
Figure GDA0003875856420000056
Figure GDA0003875856420000057
中的样本,
Figure GDA0003875856420000058
分别为
Figure GDA0003875856420000059
Figure GDA00038758564200000510
中的样本个数;in,
Figure GDA0003875856420000052
and
Figure GDA0003875856420000053
is the sample subset of the label category c in the source domain and the target domain,
Figure GDA0003875856420000054
and
Figure GDA0003875856420000055
respectively
Figure GDA0003875856420000056
and
Figure GDA0003875856420000057
in the sample,
Figure GDA0003875856420000058
respectively
Figure GDA0003875856420000059
and
Figure GDA00038758564200000510
The number of samples in ;

S32:将源域和目标域数据集样本的跨领域均值逼近权重引入公式(2),构建跨领域共享特征提取算法:加权联合分布调整WJDA,其目标函数为:S32: Introduce the cross-domain mean approximation weight of the source domain and target domain data set samples into formula (2), and construct a cross-domain shared feature extraction algorithm: weighted joint distribution adjustment WJDA, and its objective function is:

Figure GDA00038758564200000511
Figure GDA00038758564200000511

式中:W0和Wc为边缘分布和条件差异矩阵,其元素分别为:In the formula: W 0 and W c are marginal distribution and conditional difference matrix, whose elements are respectively:

Figure GDA00038758564200000512
Figure GDA00038758564200000512

Figure GDA00038758564200000513
Figure GDA00038758564200000513

其中,

Figure GDA0003875856420000061
Figure GDA0003875856420000062
分别为
Figure GDA0003875856420000063
Figure GDA0003875856420000064
中样本的跨领域均值逼近判别权重,其表达式为:in,
Figure GDA0003875856420000061
and
Figure GDA0003875856420000062
respectively
Figure GDA0003875856420000063
and
Figure GDA0003875856420000064
The cross-domain mean value of the sample in approximates the discriminant weight, and its expression is:

Figure GDA0003875856420000065
Figure GDA0003875856420000065

其中,

Figure GDA0003875856420000066
为目标(源)领域中标签为c类样本集合的均值。in,
Figure GDA0003875856420000066
is the mean value of the sample set labeled c in the target (source) domain.

进一步地,所述步骤S3中半监督加权迁移判别分析目标函数构建过程为:Further, in the step S3, the semi-supervised weighted migration discriminant analysis objective function construction process is:

S33:给定样本集X=XS∪XT,半监督判别分析(SDA)的目标函数如下:S33: Given a sample set X=X S ∪X T , the objective function of semi-supervised discriminant analysis (SDA) is as follows:

Figure GDA0003875856420000067
Figure GDA0003875856420000067

其中,PTXLXTP为图正则项,参数α为图正则项与类间散度的平衡参数,图正则项的拉普拉斯矩阵为L=D-P,

Figure GDA0003875856420000068
G是由X构成的图近邻相似矩阵。Sb和St分别表示类间离散度和总散度矩阵:Among them, P T X L X T P is the graph regularization item, the parameter α is the balance parameter between the graph regularization item and the inter-class divergence, and the Laplacian matrix of the graph regularization item is L=DP,
Figure GDA0003875856420000068
G is the graph neighbor similarity matrix composed of X. S b and S t represent the between-class scatter and the total scatter matrix, respectively:

Figure GDA0003875856420000069
Figure GDA0003875856420000069

Figure GDA00038758564200000610
Figure GDA00038758564200000610

Figure GDA00038758564200000611
Figure GDA00038758564200000611

S34:将WJDA方法与SDA相结合,即合并公式(6)和(10),构建半监督加权迁移判别分析,其目标函数为:S34: Combining WJDA method with SDA, that is, merging formulas (6) and (10), constructing semi-supervised weighted migration discriminant analysis, and its objective function is:

Figure GDA00038758564200000612
Figure GDA00038758564200000612

对公式(13)进行进一步推导,得出:Further deriving the formula (13), we get:

Figure GDA0003875856420000071
Figure GDA0003875856420000071

s.t.PTXHXTP=IstP T X H X T P = I

其中,θ,λ是平衡参数;其中,为控制投影矩阵的稀疏度,在目标函数中加入

Figure GDA0003875856420000072
和平衡参数β,为了减小参数β的搜索范围,设定
Figure GDA0003875856420000073
则公式(14)变为:Among them, θ, λ are balance parameters; among them, in order to control the sparsity of the projection matrix, add in the objective function
Figure GDA0003875856420000072
and balance parameter β, in order to reduce the search range of parameter β, set
Figure GDA0003875856420000073
Then formula (14) becomes:

Figure GDA0003875856420000074
Figure GDA0003875856420000074

S35:当数据为非线性时,将其通过核映射转换到高维空间,即

Figure GDA0003875856420000075
数据集X对应的核矩阵为
Figure GDA0003875856420000076
则目标函数式(15)在非线性空间内,可以表达为:S35: When the data is non-linear, convert it to a high-dimensional space through kernel mapping, ie
Figure GDA0003875856420000075
The kernel matrix corresponding to the data set X is
Figure GDA0003875856420000076
Then the objective function (15) in the nonlinear space can be expressed as:

Figure GDA0003875856420000077
Figure GDA0003875856420000077

进一步地,所述步骤S3中半监督加权迁移判别分析目标函数的求解过程为:Further, the solution process of the semi-supervised weighted migration discriminant analysis objective function in the step S3 is:

S36:采用Lagrange乘子法,将公式(15)的最优化问题转换为特征方程的广义特征值求解:S36: Using the Lagrange multiplier method, the optimization problem of formula (15) is converted into the generalized eigenvalue solution of the characteristic equation:

Figure GDA0003875856420000078
Figure GDA0003875856420000078

其中,Φ=diag(φ1,…,φk)∈Rk×k是由前k个最大特征值构成的对角矩阵,其对应的特征向量矩阵即为投影矩阵P;Among them, Φ=diag(φ 1 ,...,φ k )∈R k×k is a diagonal matrix composed of the first k largest eigenvalues, and its corresponding eigenvector matrix is the projection matrix P;

S37:当数据集X为非线性时,采用Lagrange乘子法,将公式(16)的最优化问题转换为特征方程的广义特征值求解:S37: When the data set X is non-linear, the Lagrange multiplier method is used to convert the optimization problem of formula (16) into the generalized eigenvalue solution of the characteristic equation:

Figure GDA0003875856420000081
Figure GDA0003875856420000081

其中,

Figure GDA0003875856420000082
分别为St、Sb在核映射下的非线性形式。in,
Figure GDA0003875856420000082
are the nonlinear forms of S t and S b under kernel mapping, respectively.

进一步地,所述步骤S4中所述基于半监督加权迁移判别分析的分类过程如下:Further, the classification process based on the semi-supervised weighted transfer discriminant analysis in the step S4 is as follows:

通过半监督加权迁移判别分析模型分别提取源领域图像训练集样本特征ZS和目标领域测试集样本特征ZT。选择线性k近邻分类器,并采用{ZS,YS}训练分类器对ZT进行预测。The sample features Z S of the source domain image training set and the sample features Z T of the target domain test set are extracted by the semi-supervised weighted transfer discriminant analysis model. Choose a linear k-nearest neighbor classifier, and use {Z S , Y S } to train the classifier to predict Z T.

与现有技术相比,本发明具有如下显著优点:Compared with the prior art, the present invention has the following significant advantages:

(1)通过计算每个样本到对方领域均值点的距离设计一种跨领域均值逼近权重,用于体现样本间的差异性;(1) Design a cross-domain mean approximation weight by calculating the distance from each sample to the mean point of the other field to reflect the difference between samples;

(2)将跨领域均值逼近权重引入MMD,对联合调整分布(JDA)的改造,设计了特征迁移方法:加权联合分布调整(Weighed Joint Distribution Adaptation,WJDA),来提升JDA知识的跨领域迁移能力;(2) Introduce the cross-domain mean approximation weight into MMD, transform the Joint Adjusted Distribution (JDA), and design a feature migration method: Weighted Joint Distribution Adaptation (Weighed Joint Distribution Adaptation, WJDA), to improve the cross-domain transfer ability of JDA knowledge ;

(3)将半监督判别分(SDA)引入WJDA中,使得算法在标签精化迭代过程中,充分挖掘标记信息和原始结构信息,以提升领域间高质量共享特征的抽取和知识的跨领域迁移,这样更利于跨领域图像分类任务的效率。(3) Introduce semi-supervised discriminant score (SDA) into WJDA, so that the algorithm can fully mine label information and original structure information in the iterative process of label refinement, so as to improve the extraction of high-quality shared features between domains and the cross-domain transfer of knowledge , which is more conducive to the efficiency of cross-domain image classification tasks.

附图说明Description of drawings

图1是本发明实施例提供的基于半监督加权迁移判别分析的图像分类方法流程图;Fig. 1 is the flow chart of the image classification method based on semi-supervised weighted transfer discriminant analysis provided by the embodiment of the present invention;

图2是本发明实施例提供的实验用数据集部分图像;Fig. 2 is the partial image of the experimental dataset provided by the embodiment of the present invention;

图3是本发明实施例提供的Office+Caltech256数据集跨域图像分类精度曲线图;Fig. 3 is a curve diagram of cross-domain image classification accuracy of the Office+Caltech256 data set provided by the embodiment of the present invention;

图4是本发明实施例提供的PIE数据集跨域图像分类精度曲线图;Fig. 4 is a curve diagram of cross-domain image classification accuracy of the PIE data set provided by the embodiment of the present invention;

图5是本发明实施例提供的MNIST+USPS数据集跨域图像分类精度柱状图;Fig. 5 is a histogram of cross-domain image classification accuracy of the MNIST+USPS data set provided by the embodiment of the present invention;

图6是本发明实施例提供的COIL数据集跨域图像分类精度柱状图;Fig. 6 is a histogram of cross-domain image classification accuracy of the COIL data set provided by the embodiment of the present invention;

图7是本发明实施例提供的特征可视化散点图;Fig. 7 is a feature visualization scatter diagram provided by an embodiment of the present invention;

图8是本发明实施例提供的各参数对算法分类精度影响图;Fig. 8 is a graph showing the influence of each parameter provided by the embodiment of the present invention on the classification accuracy of the algorithm;

图9本发明实施例提供的MMD距离图。Fig. 9 is an MMD distance map provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面结合本发明中的附图,对本发明实施例的技术方案进行清楚、完整的描述,显然,所描述的实施例是本发明的一部分实施例,而不是全部实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都应属于本发明保护的范围。The technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.

本发明提出一种基于半监督加权迁移判别分析的图像分类方法,首先,对源域和目标域中的图像样本分别进行预处理;其次,分别采用源域和目标域数据,获取源域和目标域样本的跨领域均值逼近权重;然后,通过将跨领域均值逼近权重代入代入联合分布调整(JDA),构建加权联合分布调整方法(WJDA),通过同时缩小领域间的边缘分布和条件分布,来寻找最优特征子空间;接着,将半监督判别分析(SDA)与WJDA相结合,构建半监督加权迁移判别分析模型,以提取高质量的领域间共享特征;最后,采用与k近邻分类器相结合的方式对目标域样本标签进行预测。The present invention proposes an image classification method based on semi-supervised weighted transfer discriminant analysis. Firstly, the image samples in the source domain and the target domain are preprocessed respectively; secondly, the source domain and target domain data are respectively used to obtain the source domain and the target domain. The cross-domain mean approximation weight of domain samples; then, by substituting the cross-domain mean approximation weight into the joint distribution adjustment (JDA), the weighted joint distribution adjustment method (WJDA) is constructed, and by simultaneously reducing the marginal distribution and conditional distribution between domains, to Find the optimal feature subspace; then, combine semi-supervised discriminant analysis (SDA) with WJDA to build a semi-supervised weighted transfer discriminant analysis model to extract high-quality shared features between domains; finally, use the k-nearest neighbor classifier Combined methods to predict the sample labels of the target domain.

参照图1-9,本发明提供了一种基于半监督加权迁移判别分析的图像分类方法,包括以下步骤:With reference to Fig. 1-9, the present invention provides a kind of image classification method based on semi-supervised weighted migration discriminant analysis, comprises the following steps:

S1:对源域和目标域中图像样本分别进行预处理,获取源域和目标域图像数据集DS与DT。对源域和目标域中的图像样本预处理包含如下步骤:S1: Preprocess the image samples in the source domain and the target domain respectively, and obtain the image data sets D S and D T in the source domain and the target domain. The preprocessing of image samples in the source and target domains includes the following steps:

(1)对源域和目标域中的图像样本进行分辨率一致缩放处理;(1) Perform resolution-consistent scaling on the image samples in the source and target domains;

(2)将缩放后图像统一进行归一化处理;(2) Normalize the scaled images uniformly;

(3)将归一化处理后的图像进行PCA降维处理(保留98%最大特征向量)。(3) The normalized image is subjected to PCA dimensionality reduction processing (retaining 98% of the largest eigenvectors).

S2:分别采用源域和目标域图像数据集DS与DT设计样本的跨领域均值逼近权重,其表达如下:S2: Using the source domain and target domain image datasets D S and D T to design the cross-domain mean approximation weight of the sample, which is expressed as follows:

Figure GDA0003875856420000101
Figure GDA0003875856420000101

其中,

Figure GDA0003875856420000102
μT(S)为目标(源)领域样本的均值;in,
Figure GDA0003875856420000102
μT (S) is the mean value of samples in the target (source) field;

S3:通过将wS与wT代入最大均值差异度量MMD,并代入联合分布调整JDA,构建加权联合分布调整方法WJDA,通过同时缩小领域间的边缘分布和条件分布,寻找最优特征子空间,保证源域和目标域间的图像特征在跨领域知识迁移过程中不变;S3: By substituting w S and w T into the maximum mean difference measure MMD, and substituting into the joint distribution adjustment JDA, the weighted joint distribution adjustment method WJDA is constructed, and the optimal feature subspace is found by simultaneously reducing the marginal distribution and conditional distribution between fields, Ensure that the image features between the source domain and the target domain remain unchanged during the cross-domain knowledge transfer process;

同时将半监督判别分析SDA与WJDA相结合,构建半监督加权迁移判别分析模型的目标函数;At the same time, the semi-supervised discriminant analysis SDA and WJDA are combined to construct the objective function of the semi-supervised weighted transfer discriminant analysis model;

采用广义特征分解方法学习特征子空间投影矩阵P*,获得不同领域间样本的共享特征表达Z*={ZS,ZT};Use the generalized eigendecomposition method to learn the feature subspace projection matrix P * , and obtain the shared feature expression Z * = {Z S , Z T } of samples in different fields;

S4:采用源域样本集DS的子空间特征表达ZS及其标签集YS训练k近邻分类器,对所述目标域数据集DT对应子空间特征表达ZT进行标签预测,获取预测结果YT,转至步骤S2,直到达到最大迭代次数或者YT不再变化。S4: Use the subspace feature expression Z S of the source domain sample set D S and its label set Y S to train the k-nearest neighbor classifier, and perform label prediction on the subspace feature expression Z T corresponding to the target domain data set D T to obtain the prediction As a result Y T , go to step S2 until the maximum number of iterations is reached or Y T no longer changes.

其中,构建加权联合分布调整目标函数,过程如下:Among them, constructing the weighted joint distribution adjustment objective function, the process is as follows:

(1)给定来自两个相关的领域的高维数据集,源域

Figure GDA0003875856420000103
目标域
Figure GDA0003875856420000104
它们共享标签集合
Figure GDA0003875856420000105
其中,nS和nT分别为两个数据集的样本个数,d为特征空间维数,DT中样本未含标记样本,ySi∈Y,C为类别个数。联合分布调整(JDA)的目标函数为:(1) Given high-dimensional datasets from two related domains, the source domain
Figure GDA0003875856420000103
target domain
Figure GDA0003875856420000104
They share a collection of tags
Figure GDA0003875856420000105
Among them, n S and n T are the number of samples of the two data sets respectively, d is the dimension of the feature space, the samples in D T do not contain labeled samples, y Si ∈ Y, and C is the number of categories. The objective function of Joint Distribution Adjustment (JDA) is:

Figure GDA0003875856420000106
Figure GDA0003875856420000106

其中,X={DS∪DT},P为投影矩阵,

Figure GDA0003875856420000111
为中心矩阵,q∈Rn为元素为1的列向量,n=nS+nT;M0为(nS+nT)阶边缘分布差异矩阵,其元素为:Among them, X={D S ∪D T }, P is the projection matrix,
Figure GDA0003875856420000111
is the center matrix, q∈R n is a column vector with an element of 1, n=n S +n T ; M 0 is a (n S +n T ) order marginal distribution difference matrix, and its elements are:

Figure GDA0003875856420000112
Figure GDA0003875856420000112

Mc为条件分布差异权重矩阵,有:M c is the conditional distribution difference weight matrix, which is:

Figure GDA0003875856420000113
Figure GDA0003875856420000113

其中,

Figure GDA0003875856420000114
Figure GDA0003875856420000115
为源域和目标域中标签类别为c的样本子集,
Figure GDA0003875856420000116
Figure GDA0003875856420000117
分别为
Figure GDA0003875856420000118
Figure GDA0003875856420000119
中的样本,
Figure GDA00038758564200001110
分别为
Figure GDA00038758564200001111
Figure GDA00038758564200001112
中的样本个数;in,
Figure GDA0003875856420000114
and
Figure GDA0003875856420000115
is the sample subset of the label category c in the source domain and the target domain,
Figure GDA0003875856420000116
and
Figure GDA0003875856420000117
respectively
Figure GDA0003875856420000118
and
Figure GDA0003875856420000119
in the sample,
Figure GDA00038758564200001110
respectively
Figure GDA00038758564200001111
and
Figure GDA00038758564200001112
The number of samples in ;

(2)将源域和目标域数据集样本的跨领域均值逼近权重引入公式(2),构建跨领域共享特征提取算法:加权联合分布调整(WJDA),其目标函数为:(2) Introduce the cross-domain mean approximation weights of the source domain and target domain data set samples into formula (2), and construct a cross-domain shared feature extraction algorithm: Weighted Joint Distribution Adjustment (WJDA), whose objective function is:

Figure GDA00038758564200001113
Figure GDA00038758564200001113

式中:W0和Wc为边缘分布和条件差异矩阵,其元素分别为:In the formula: W 0 and W c are marginal distribution and conditional difference matrix, whose elements are respectively:

Figure GDA0003875856420000121
Figure GDA0003875856420000121

Figure GDA0003875856420000122
Figure GDA0003875856420000122

其中,

Figure GDA0003875856420000123
Figure GDA0003875856420000124
分别为
Figure GDA0003875856420000125
Figure GDA0003875856420000126
中样本的跨领域均值逼近判别权重,其表达式为:in,
Figure GDA0003875856420000123
and
Figure GDA0003875856420000124
respectively
Figure GDA0003875856420000125
and
Figure GDA0003875856420000126
The cross-domain mean value of the sample in approximates the discriminant weight, and its expression is:

Figure GDA0003875856420000127
Figure GDA0003875856420000127

其中,

Figure GDA0003875856420000128
为目标(源)领域中标签为c类样本集合的均值;in,
Figure GDA0003875856420000128
is the mean value of the sample set labeled c in the target (source) field;

其中,构建半监督加权迁移判别分析目标函数,过程如下:Among them, the semi-supervised weighted migration discriminant analysis objective function is constructed, and the process is as follows:

(1)给定样本集X=XS∪XT,半监督判别分析(SDA)的目标函数如下:(1) Given a sample set X=X S ∪X T , the objective function of semi-supervised discriminant analysis (SDA) is as follows:

Figure GDA0003875856420000129
Figure GDA0003875856420000129

其中,PTXLXTP为图正则项,参数α为图正则项与类间散度的平衡参数,图正则项的拉普拉斯矩阵为L=D-P,

Figure GDA00038758564200001210
G是由X构成的图近邻相似矩阵。Sb和St分别表示类间离散度和总散度矩阵:Among them, P T X L X T P is the graph regularization item, the parameter α is the balance parameter between the graph regularization item and the inter-class divergence, and the Laplacian matrix of the graph regularization item is L=DP,
Figure GDA00038758564200001210
G is the graph neighbor similarity matrix composed of X. S b and S t represent the between-class scatter and the total scatter matrix, respectively:

Figure GDA00038758564200001211
Figure GDA00038758564200001211

Figure GDA00038758564200001212
Figure GDA00038758564200001212

Figure GDA0003875856420000131
Figure GDA0003875856420000131

(2)将WJDA方法与SDA相结合,即合并公式(6)和(10),构建半监督加权迁移判别分析,其目标函数为:(2) Combining the WJDA method with SDA, that is, merging formulas (6) and (10), constructing a semi-supervised weighted transfer discriminant analysis, and its objective function is:

Figure GDA0003875856420000132
Figure GDA0003875856420000132

对公式(13)进行进一步推导,得出:Further deriving the formula (13), we get:

Figure GDA0003875856420000133
Figure GDA0003875856420000133

其中,θ,λ是平衡参数;其中,为控制投影矩阵的稀疏度,在目标函数中加入

Figure GDA0003875856420000134
和平衡参数β,为了减小参数β的搜索范围,设定
Figure GDA0003875856420000135
则公式(14)变为:Among them, θ, λ are balance parameters; among them, in order to control the sparsity of the projection matrix, add in the objective function
Figure GDA0003875856420000134
and balance parameter β, in order to reduce the search range of parameter β, set
Figure GDA0003875856420000135
Then formula (14) becomes:

Figure GDA0003875856420000136
Figure GDA0003875856420000136

(3)当数据为非线性时,将其通过核映射转换到高维空间,即

Figure GDA0003875856420000137
数据集X对应的核矩阵为
Figure GDA0003875856420000138
则目标函数式(15)在非线性空间内,可以表达为:(3) When the data is non-linear, convert it to a high-dimensional space through kernel mapping, that is,
Figure GDA0003875856420000137
The kernel matrix corresponding to the data set X is
Figure GDA0003875856420000138
Then the objective function (15) in the nonlinear space can be expressed as:

Figure GDA0003875856420000139
Figure GDA0003875856420000139

其中,求解半监督加权迁移判别分析目标函数,过程如下:Among them, the process of solving the semi-supervised weighted transfer discriminant analysis objective function is as follows:

(1)采用Lagrange乘子法,将公式(15)的最优化问题转换为特征方程的广义特征值求解:(1) Using the Lagrange multiplier method, the optimization problem of formula (15) is converted into the generalized eigenvalue solution of the characteristic equation:

Figure GDA0003875856420000141
Figure GDA0003875856420000141

其中,Φ=diag(φ1,…,φk)∈Rk×k是由前k个最大特征值构成的对角矩阵,其对应的特征向量矩阵即为投影矩阵P;Among them, Φ=diag(φ 1 ,...,φ k )∈R k×k is a diagonal matrix composed of the first k largest eigenvalues, and its corresponding eigenvector matrix is the projection matrix P;

(2)当数据集X为非线性时,采用Lagrange乘子法,将公式(16)的最优化问题转换为特征方程的广义特征值求解:(2) When the data set X is nonlinear, the Lagrange multiplier method is used to convert the optimization problem of formula (16) into the generalized eigenvalue solution of the characteristic equation:

Figure GDA0003875856420000142
Figure GDA0003875856420000142

其中,

Figure GDA0003875856420000143
分别为St、Sb在核映射下的非线性形式;in,
Figure GDA0003875856420000143
are the nonlinear forms of S t and S b under kernel mapping, respectively;

其中,通过半监督加权迁移判别分析模型分别提取源领域图像训练集样本特征ZS和目标领域测试集样本特征ZT。选择线性k近邻分类器,并采用{ZS,YS}训练分类器对ZT进行预测。Among them, the sample features Z S of the image training set in the source domain and the sample features Z T of the test set in the target domain are respectively extracted through the semi-supervised weighted transfer discriminant analysis model. Choose a linear k-nearest neighbor classifier, and use {Z S , Y S } to train the classifier to predict Z T.

实施例1Example 1

为了体现算法的可信度和分类性能,实验选用三类基准数据集:手写字体数字数据集USPS+MNIST、物品识别数据集COIL20和物体识别数据集Office+Caltech256,共构建36组跨域分类任务。各数据集统计信息如表1所示,部分数据集图像如图1所示。In order to reflect the credibility and classification performance of the algorithm, three types of benchmark datasets were selected in the experiment: USPS+MNIST handwritten digit dataset, COIL20 object recognition dataset and Office+Caltech256 object recognition dataset, and a total of 36 sets of cross-domain classification tasks were constructed. . The statistical information of each data set is shown in Table 1, and the images of some data sets are shown in Figure 1.

表1实验图像数据集说明Table 1 Explanation of the experimental image dataset

数据集名称dataset name 类型type 类别数Number of categories 子集(样本数×样本维度)Subset (number of samples × sample dimension) USPSUSPS 数字number 1010 USPS(1800×256)USPS (1800×256) MNISTMNIST 数字number 1010 MNIST(2000×256)MNIST (2000×256) COIL20COIL20 物体object 2020 COIL1(1024×720),COIL2(1024×720)COIL1(1024×720), COIL2(1024×720) Officeoffice 对象object 1010 A(985×800),D(157×800),W(295×800)A(985×800), D(157×800), W(295×800) Caltech256Caltech256 对象object 1010 C(1123×800)C(1123×800)

物品识别数据集Office+Caltech256构建跨域分类任务:Office数据集包含有Amazon(A)、DLSR(D)与Webcam(W)三个子数据集,加之Caltech256(C)物品识别数据集,从A、D、W、C数据集中分别选取958、157、295、1123副图像,每张图像用800维特征向量表征,四种数据集共享10种物体类别。从四种数据集中随机选取两种分别作为源域和目标域数据集,一共可以构建12组跨域分类实验:C→A(1)、C→W(2)0、C→D(3),…,D→W(12)。Object recognition dataset Office+Caltech256 constructs cross-domain classification tasks: Office dataset contains three sub-datasets of Amazon(A), DLSR(D) and Webcam(W), plus Caltech256(C) item recognition dataset, from A, D, W, and C data sets respectively select 958, 157, 295, and 1123 images, each image is represented by an 800-dimensional feature vector, and the four data sets share 10 object categories. Randomly select two of the four data sets as the source domain and target domain data sets, and a total of 12 sets of cross-domain classification experiments can be constructed: C→A(1), C→W(2)0, C→D(3) ,..., D → W (12).

手写字体数据集USPS+MNIST构建跨域分类任务:从图1可以看出,USPS与MNIST图像遵从不同分布,但是共享10个字体类别。从USPS与MNIST数据集中分别随机选取1800、2000副图像,将所有图像大小线性缩放至16×16,每张图像用256维特征向量表征,两组数据集共享10种字体类别。将USPS与MNIST分别作为源域和目标域,可以构建两组跨域分类实验:U vs M与Mvs U。Handwritten font dataset USPS+MNIST constructs a cross-domain classification task: As can be seen from Figure 1, USPS and MNIST images follow different distributions, but share 10 font categories. 1800 and 2000 images were randomly selected from the USPS and MNIST datasets, and the size of all images was linearly scaled to 16×16. Each image was represented by a 256-dimensional feature vector. The two datasets shared 10 font categories. Using USPS and MNIST as the source and target domains respectively, two sets of cross-domain classification experiments can be constructed: U vs M and Mvs U.

PIE是一个标准的人脸数据集,它含有描述人脸的姿势,光照和表情等图像。实验中,为了验证算法在跨领域学习方法中的性能,选取PIE的5个子集,每一个子集对应于不同的姿势。选取PIE1(C05,左姿势),PIE2(C07,向上姿势),PIE3(C09,向下姿势),PIE4(C27,正脸姿势),PIE5(C29,右姿势)。在每一个子集(姿势)中,所有的人脸都是处于不同灯光,光照和表情条件下的。通过随机抽取两个子集分别作为源领域数据集和目标领域数据集,可以构建5×4=20个跨领域人脸数据集,PIE1 vs PIE2(1),PIE1 vs PIE3(2),…,PIE5 vsPIE4(20)。利用不同姿势的人脸数据集构建的源领域数据集和目标领域数据集满足了遵循不同分布的要求。PIE is a standard face dataset, which contains images describing the pose, lighting and expression of faces. In the experiment, in order to verify the performance of the algorithm in the cross-domain learning method, 5 subsets of PIE are selected, and each subset corresponds to a different pose. Select PIE1 (C05, left pose), PIE2 (C07, up pose), PIE3 (C09, down pose), PIE4 (C27, front face pose), PIE5 (C29, right pose). In each subset (pose), all faces are under different lighting, illumination and expression conditions. By randomly selecting two subsets as the source domain dataset and the target domain dataset, 5×4=20 cross-domain face datasets can be constructed, PIE1 vs PIE2(1), PIE1 vs PIE3(2),…, PIE5 vsPIE4(20). The source and target domain datasets constructed from face datasets of different poses meet the requirement of following different distributions.

实验所用计算机硬件配置为:Intel Core(TM)i5-3470HQ CPU主频3.2GHz,内存8GB,采用Matlab2017b软件编程仿真。为减少误差对实验结果的影响,取每组实验中20次分类结果的平均值。实验结果如图3-6所示。The computer hardware configuration used in the experiment is: Intel Core(TM) i5-3470HQ CPU main frequency 3.2GHz, memory 8GB, using Matlab2017b software programming simulation. In order to reduce the influence of errors on the experimental results, the average value of 20 classification results in each group of experiments was taken. The experimental results are shown in Figure 3-6.

为了考察算法中子空间维数、迭代次数和参数取值对分类性能的影响,分别对基于半监督加权迁移判别分析的图像分类算法中参数α、θ,μ、λ、以及子空间维数k和迭代次数进行敏感性实验分析。在Avs D、COIL1 vs COIL2、MNISTvs USPS、PIE1 vs PIE4等4个数据集上以1NN为基准分类器进行6组实验,实验中采用固定变量法对每个参数进行测试。实验结果如图7所示。In order to investigate the influence of subspace dimension, iteration number and parameter value on classification performance in the algorithm, the parameters α, θ, μ, λ, and subspace dimension k in the image classification algorithm based on semi-supervised weighted transfer discriminant analysis were respectively analyzed And the number of iterations for sensitivity experiment analysis. Six sets of experiments were conducted on 4 datasets including Avs D, COIL1 vs COIL2, MNISTvs USPS, PIE1 vs PIE4, using 1NN as the benchmark classifier, and each parameter was tested by the fixed variable method in the experiment. The experimental results are shown in Figure 7.

为进一步证明SWJDA算法学习到的共享特征表达具有更优良的判别能力,从36组跨域分类任务中选取PIE1 vs PIE4这组进行特征可视化分析实验,用随机近邻嵌入(t-SNE)绘制源域和目标域原始特征、JDA和SWJDA算法特征散点图。t-SNE是一种将高维数据通过仿射变换映射到二维或者三维空间进行可视化的算法。实验结果如图8所示,其中,每种深浅的颜色表示为一个类别,共68个类别。若同深浅簇越聚拢且不同深浅簇越散开,则特征判别力越强。In order to further prove that the shared feature expression learned by the SWJDA algorithm has a better discriminative ability, the group PIE1 vs PIE4 was selected from 36 groups of cross-domain classification tasks for feature visualization analysis experiments, and the source domain was drawn using random nearest neighbor embedding (t-SNE). And target domain original features, JDA and SWJDA algorithm feature scatter plots. t-SNE is an algorithm that maps high-dimensional data to two-dimensional or three-dimensional space through affine transformation for visualization. The experimental results are shown in Figure 8, where each shade of color is represented as a category, and there are 68 categories in total. If the clusters of the same depth are closer together and the clusters of different depths are more scattered, the feature discrimination is stronger.

为进一步证明SWJDA算法具有良好的收敛性的判别能力,在每一次标签精化迭代后,分别计算了SWJDA在Avs D、MNIST vs USPS、COIL1 vs COIL2、PIE1 vs PIE4等4个数据集上的MMD距离,结果如图9所示。结果表明:1)由于计算方式的差异,目标域中不含标签的MMD距离小于带标签的MMD距离。2)随着迭代次数的增加,域间的边缘分布差和条件分布差减小,使得MMD距离逐渐变小,分类精度提高,且这一过程是同步的。结果表明,SWTDA最小化了领域间边缘分布和条件分布的差异,有利于共享特征的提取和知识的跨领域转移。In order to further prove that the SWJDA algorithm has a good convergence discriminant ability, after each label refinement iteration, the MMD of SWJDA on four data sets including Avs D, MNIST vs USPS, COIL1 vs COIL2, and PIE1 vs PIE4 were calculated. The results are shown in Figure 9. The results show that: 1) The unlabeled MMD distance in the target domain is smaller than the labeled MMD distance due to the difference in calculation methods. 2) As the number of iterations increases, the marginal distribution difference and conditional distribution difference between domains decrease, making the MMD distance gradually smaller and the classification accuracy improved, and this process is synchronous. The results show that SWTDA minimizes the difference of marginal distribution and conditional distribution between domains, which is beneficial to the extraction of shared features and the transfer of knowledge across domains.

以上公开的仅为本发明的几个具体实施例,但是,本发明实施例并非局限于此,任何本领域的技术人员能思之的变化都应落入本发明的保护范围。The above disclosures are only a few specific embodiments of the present invention, however, the embodiments of the present invention are not limited thereto, and any changes conceivable by those skilled in the art shall fall within the protection scope of the present invention.

Claims (5)

1. An image classification method based on semi-supervised weighted migration discriminant analysis is characterized by comprising the following steps of:
s1: the source domain and target domain image samples are preprocessed separately,obtaining source domain and target domain datasets D S And D T
S2: using source domain and target domain datasets D, respectively S And D T Obtaining cross-domain mean approximation weight w of source domain and target domain samples S And w T
S3: by mixing w S And w T Substituting the MMD into the maximum mean difference measurement and substituting into the JDA to construct a weighted joint distribution adjustment method WJDA, and searching for an optimal feature subspace by simultaneously reducing the edge distribution and the condition distribution between the domains to ensure that the image features between the source domain and the target domain are unchanged in the cross-domain knowledge migration process;
meanwhile, combining semi-Supervised Discriminant Analysis (SDA) with WJDA to construct a target function of a semi-supervised weighted migration discriminant analysis model;
learning a feature subspace projection matrix P by adopting a generalized feature decomposition method * Obtaining shared feature expression Z of samples among different fields * ={Z S ,Z T };
S4: using a source domain sample set D S By a subspace feature of Z S And its label set Y S Training k nearest neighbor classifier to the target domain data set D T Corresponding subspace feature expression Z T Performing label prediction to obtain prediction result Y T Go to step S2 until the maximum number of iterations or Y is reached T No longer changed;
the cross-domain mean approximation weight of the sample is designed in the step S2, and the expression is as follows:
Figure FDA0003863378610000011
wherein,
Figure FDA0003863378610000012
μ T(S) mean of target (source) domain samples;
the weighted joint distribution adjustment objective function construction process in the step S3 is as follows:
s31: given a high-dimensional dataset source domain from two related domains
Figure FDA0003863378610000013
And a target domain
Figure FDA0003863378610000021
Two high-dimensional datasets sharing a labelset
Figure FDA0003863378610000022
Wherein n is S And n T The number of samples of two data sets, D is the characteristic space dimension, D T Middle sample containing no labeled sample, y Si E is Y, and C is the number of categories;
the objective function of joint distribution adaptation JDA is:
Figure FDA0003863378610000023
wherein, X = { D = S ∪D T -P is a projection matrix,
Figure FDA0003863378610000024
as a central matrix, q ∈ R n For a column vector with element 1, n = n S +n T ;M 0 Is (n) S +n T ) The order edge distribution difference matrix has the following elements:
Figure FDA0003863378610000025
M c for the conditional distribution disparity matrix, there are:
Figure FDA0003863378610000026
wherein,
Figure FDA0003863378610000027
And
Figure FDA0003863378610000028
for the sample subset with label class c in the source domain and the target domain,
Figure FDA0003863378610000029
and
Figure FDA00038633786100000210
are respectively as
Figure FDA00038633786100000211
And
Figure FDA00038633786100000212
the sample of (1) is selected from,
Figure FDA00038633786100000213
are respectively as
Figure FDA00038633786100000214
And
Figure FDA00038633786100000215
the number of samples in (1);
s32: introducing cross-domain mean value approximation weights of the source domain and target domain data set samples into a formula (2), and constructing a cross-domain shared feature extraction algorithm: the weighted joint distribution adjustment WJDA has the objective function of:
Figure FDA0003863378610000031
s.t.P T XHX T P=I
(5)
in the formula: w is a group of 0 And W c Is an edgeThe elements of the edge distribution difference weight matrix and the condition difference weight matrix are respectively as follows:
Figure FDA0003863378610000032
Figure FDA0003863378610000033
wherein,
Figure FDA0003863378610000034
and
Figure FDA0003863378610000035
are respectively as
Figure FDA0003863378610000036
And
Figure FDA0003863378610000037
the cross-domain mean value of the middle sample approaches to the discrimination weight, and the expression is as follows:
Figure FDA0003863378610000038
wherein,
Figure FDA0003863378610000039
is the mean value of the sample set labeled as class c in the target (source) domain.
2. The image classification method based on semi-supervised weighted migration discriminant analysis according to claim 1, wherein in the step S1, the preprocessing of the image samples in the source domain and the target domain includes the following steps:
s11: for image samples D in the source domain and the target domain S1 And D T1 Respectively carrying out the scaling treatment with consistent resolution ratio to obtain D S2 And D T2
S12: will D S2 And D T2 Respectively carrying out normalization treatment to obtain D S3 And D T3
S13: will D S3 And D T3 Performing PCA dimension reduction treatment respectively to obtain D S And D T
3. The image classification method based on semi-supervised weighted migration discriminant analysis according to claim 1, wherein the semi-supervised weighted migration discriminant analysis target function constructing process in the step S3 is as follows:
s33: given sample set X = X S ∪X T The objective function of the semi-supervised discriminant analysis SDA is as follows:
Figure FDA0003863378610000041
wherein, P T XLX T P is a graph regularization term, the parameter α is a balance parameter between the graph regularization term and the interspecies divergence, the Laplace matrix of the graph regularization term is L = D-P,
Figure FDA0003863378610000042
g is a graph neighborhood similarity matrix composed of X; s. the b And S t The inter-class dispersion and total dispersion matrices are represented, respectively:
Figure FDA0003863378610000043
Figure FDA0003863378610000044
Figure FDA0003863378610000045
s34: combining the WJDA method with the SDA, namely combining the formulas (5) and (9), constructing semi-supervised weighted migration discriminant analysis, wherein the objective function is as follows:
Figure FDA0003863378610000046
s.t.P T XHX T P=I (13)
further derivation of equation (13) yields:
Figure FDA0003863378610000051
wherein θ, λ are balance parameters; wherein, in order to control the sparsity of the projection matrix, an objective function is added
Figure FDA0003863378610000052
And a balance parameter beta, which is set to reduce the search range of the parameter beta
Figure FDA0003863378610000053
Mu is a balance parameter, and has the same meaning as beta, and controls the distribution difference weight matrix W 0 ,W c For non-weighted distribution difference matrix M 0 ,M c The degree of influence of (c); equation (14) becomes:
Figure FDA0003863378610000054
s35: when the data is non-linear, it is transformed into a high-dimensional space by kernel mapping, i.e.
Figure FDA0003863378610000055
The kernel matrix for dataset X is
Figure FDA0003863378610000056
Then the objective function (15) is in a non-linear space, expressed as:
Figure FDA0003863378610000057
4. the image classification method based on semi-supervised weighted migration discriminant analysis according to claim 1, wherein the solving process of the semi-supervised weighted migration discriminant analysis objective function in the step S3 is as follows:
s36: and (3) converting the optimization problem of the formula (15) into a generalized eigenvalue solution of a characteristic equation by adopting a Lagrange multiplier method:
Figure FDA0003863378610000058
wherein Φ = diag (Φ) 1 ,…,φ k )∈R k×k The matrix is a diagonal matrix formed by the first k maximum eigenvalues, and the corresponding eigenvector matrix is a projection matrix P;
s37: when the data set X is nonlinear, the optimization problem of the formula (16) is converted into a generalized eigenvalue solution of a characteristic equation by adopting a Lagrange multiplier method:
Figure FDA0003863378610000061
wherein,
Figure FDA0003863378610000062
are respectively S t 、S b Non-linear form under kernel mapping.
5. The image classification method based on semi-supervised weighted migration discriminant analysis according to claim 1, wherein the classification process based on semi-supervised weighted migration discriminant analysis in step S4 is as follows:
respectively extracting source field image training set sample characteristics Z through semi-supervised weighted migration discriminant analysis model S And target Domain test set sample characteristics Z T (ii) a Selecting a linear k nearest neighbor classifier and using { Z S ,Y S Training classifier pair Z T And (6) predicting.
CN202110075846.1A 2021-01-20 2021-01-20 An Image Classification Method Based on Semi-Supervised Weighted Transfer Discriminant Analysis Active CN112861929B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110075846.1A CN112861929B (en) 2021-01-20 2021-01-20 An Image Classification Method Based on Semi-Supervised Weighted Transfer Discriminant Analysis

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110075846.1A CN112861929B (en) 2021-01-20 2021-01-20 An Image Classification Method Based on Semi-Supervised Weighted Transfer Discriminant Analysis

Publications (2)

Publication Number Publication Date
CN112861929A CN112861929A (en) 2021-05-28
CN112861929B true CN112861929B (en) 2022-11-08

Family

ID=76007725

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110075846.1A Active CN112861929B (en) 2021-01-20 2021-01-20 An Image Classification Method Based on Semi-Supervised Weighted Transfer Discriminant Analysis

Country Status (1)

Country Link
CN (1) CN112861929B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113360659B (en) * 2021-07-19 2022-11-22 云南大学 A method and system for cross-domain sentiment classification based on semi-supervised learning
CN114861813B (en) * 2022-05-24 2025-05-30 河南科技大学 A data classification method with knowledge transfer discrimination ability
CN115251904A (en) * 2022-07-15 2022-11-01 垒途智能教科技术研究院江苏有限公司 Analysis method and device based on multiple motion sensors
CN115272831B (en) * 2022-09-27 2022-12-09 成都中轨轨道设备有限公司 Transmission method and system for monitoring images of suspension state of contact network
CN117409217B (en) * 2023-08-11 2025-03-28 北京邮电大学 A method for measuring inter-domain differences in image datasets
CN117671704B (en) * 2024-01-31 2024-04-26 常熟理工学院 A method, device and computer storage medium for handwritten digit recognition

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107895177A (en) * 2017-11-17 2018-04-10 南京邮电大学 A kind of migration classification learning method for keeping image classification sparsity structure
CN109308485A (en) * 2018-08-02 2019-02-05 中国矿业大学 A transfer sparse coding image classification method based on dictionary domain adaptation
CN109886419A (en) * 2019-01-23 2019-06-14 中山大学 A Grassmann Manifold Field Adaptation Method Based on Subspace Learning of Symmetric Matrix Spaces
CN110020674A (en) * 2019-03-13 2019-07-16 清华大学 A kind of cross-cutting adapting to image classification method promoting topic categories discrimination
CN111444859A (en) * 2020-03-30 2020-07-24 哈尔滨工程大学 An unsupervised cross-domain facial expression recognition method
CN111914708A (en) * 2020-07-23 2020-11-10 杭州电子科技大学 Electroencephalogram signal classification method for migration semi-supervised width learning
CN111931815A (en) * 2020-07-08 2020-11-13 西南大学 Cross-domain migration electronic nose drift suppression method based on migration sample

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10289909B2 (en) * 2017-03-06 2019-05-14 Xerox Corporation Conditional adaptation network for image classification
CN110533193A (en) * 2019-08-20 2019-12-03 武汉理工大学 Feature and example combine transfer learning method under semi-supervised scene

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107895177A (en) * 2017-11-17 2018-04-10 南京邮电大学 A kind of migration classification learning method for keeping image classification sparsity structure
CN109308485A (en) * 2018-08-02 2019-02-05 中国矿业大学 A transfer sparse coding image classification method based on dictionary domain adaptation
CN109886419A (en) * 2019-01-23 2019-06-14 中山大学 A Grassmann Manifold Field Adaptation Method Based on Subspace Learning of Symmetric Matrix Spaces
CN110020674A (en) * 2019-03-13 2019-07-16 清华大学 A kind of cross-cutting adapting to image classification method promoting topic categories discrimination
CN111444859A (en) * 2020-03-30 2020-07-24 哈尔滨工程大学 An unsupervised cross-domain facial expression recognition method
CN111931815A (en) * 2020-07-08 2020-11-13 西南大学 Cross-domain migration electronic nose drift suppression method based on migration sample
CN111914708A (en) * 2020-07-23 2020-11-10 杭州电子科技大学 Electroencephalogram signal classification method for migration semi-supervised width learning

Non-Patent Citations (7)

* Cited by examiner, † Cited by third party
Title
"Cross Domain Mean Approximation for Unsupervised Domain Adaptation";SHAOFEI ZANG等;《IEEE Access》;20200720;第139052-139069页 *
"Deep transfer network for rotating machine fault analysis";Weiwei Qian等;《Pattern Recognition》;20190801;第1-14页 *
"Semi-supervised Flexible Joint Distribution Adaptation";Shaofei Zang等;《ICNCC 2019: Proceedings of the 2019 8th International Conference on Networks, Communication and Computing》;20191231;第19-27页 *
"Semi-supervised transfer discriminant analysis based on cross-domain mean constraint";Shaofei Zang等;《ARTIFICIAL INTELLIGENCE REVIEW》;20161210;第581-595页 *
"基于特征迁移与模型迁移的分类器设计";臧绍飞;《中国博士学位论文全文数据库 信息科技辑》;20180115;D050-1 *
基于最大分布加权均值嵌入的领域适应学习;臧绍飞等;《控制与决策》;20161130(第11期);第2083-2089页 *
基于样本局部判别权重的加权迁移成分分析;臧绍飞等;《中国矿业大学学报》;20160930(第05期);第1043-1049、1057页 *

Also Published As

Publication number Publication date
CN112861929A (en) 2021-05-28

Similar Documents

Publication Publication Date Title
CN112861929B (en) An Image Classification Method Based on Semi-Supervised Weighted Transfer Discriminant Analysis
Wang et al. Fast and orthogonal locality preserving projections for dimensionality reduction
He et al. Data-dependent label distribution learning for age estimation
Luo et al. Feature learning using spatial-spectral hypergraph discriminant analysis for hyperspectral image
WO2022001159A1 (en) Latent low-rank projection learning based unsupervised feature extraction method for hyperspectral image
Yuan et al. Fractional-order embedding canonical correlation analysis and its applications to multi-view dimensionality reduction and recognition
CN107563442B (en) Hyperspectral Image Classification Method Based on Sparse Low Rank Regular Graph Quantized Embedding
CN112116017A (en) Data dimension reduction method based on kernel maintenance
CN107451545B (en) Face recognition method based on multi-channel discriminative non-negative matrix factorization under soft labels
CN104680179B (en) Method of Data with Adding Windows based on neighborhood similarity
CN109522956A (en) A kind of low-rank differentiation proper subspace learning method
CN106056159B (en) Image sophisticated category method based on Fisher Vector
CN108681725A (en) A kind of weighting sparse representation face identification method
Liu et al. Group collaborative representation for image set classification
CN106650744B (en) Image object co-segmentation method guided by local shape transfer
CN109063757A (en) It is diagonally indicated based on block and the multifarious multiple view Subspace clustering method of view
CN107633065B (en) Identification method based on hand-drawn sketch
CN109241813B (en) Non-constrained face image dimension reduction method based on discrimination sparse preservation embedding
Wu et al. Manifold kernel sparse representation of symmetric positive-definite matrices and its applications
Liao et al. Discriminant Analysis via Joint Euler Transform and $\ell_ {2, 1} $-Norm
CN114037931B (en) A multi-view discrimination method with adaptive weights
CN109509191A (en) A kind of saliency object detection method and system
CN111191700B (en) Hyperspectral image dimension reduction method and device based on self-adaptive collaborative image discriminant analysis
CN105678261A (en) Supervised figure-based transductive data dimension-descending method
CN110364264A (en) Feature Dimensionality Reduction Method for Medical Datasets Based on Subspace Learning

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240531

Address after: FS509, Wangcheng Campus, National University Science and Technology Park, Luoyang Institute of Technology, No. 90 Wangcheng Avenue, Luolong District, Luoyang City, Henan Province, 471000

Patentee after: Henan Plin Automatic Control Equipment Co.,Ltd.

Country or region after: China

Address before: 471023 Kaiyuan campus, Henan University of science and technology, 263 Kaiyuan Avenue, Luoyang City, Henan Province

Patentee before: HENAN University OF SCIENCE AND TECHNOLOGY

Country or region before: China

TR01 Transfer of patent right
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载