Image data processing method and device based on adaptive robust principal component analysis, and storage medium
By adding adaptive constraints and weight strategies to the PCA model, and using the squared L2 norm to minimize the reconstruction error, the problems of unstable weights and poor robustness of the PCA method in high-dimensional image data are solved, and effective image data is achieved. Dimensionality reduction and noise reduction processing improve the robustness of the model.
Patent Information
- Application Number
- CN202411025875.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-10-29
AI Technical Summary
Existing PCA methods are easily affected by outliers when processing high-dimensional image data, resulting in unstable weights and poor model robustness, and cannot effectively reduce the impact of outliers.
A method based on adaptive robust principal component analysis is proposed. By adding adaptive constraints and weight strategies to the PCA model, the squared L2 norm is used to minimize the reconstruction error and reduce the impact of outliers, and the model is trained through an iterative optimization algorithm to Obtain a stable projection matrix.
It achieves effective dimensionality reduction and noise reduction processing of image data, improves the robustness and stability of the model, can learn the projection matrix more accurately, reduces the negative impact of outliers, and is suitable for image noise processing and abnormal data detection.
Smart Images

Figure CN118865006A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of machine learning, and in particular relates to an image data processing method, device and storage medium based on adaptive robust principal component analysis. Background Art
[0002] With the rapid development of information technology in various fields, a large number of machine learning and computer vision applications are limited by high-dimensional image data, resulting in a decrease in algorithm performance. In addition, the computational cost of high-dimensional image data is high, and the noise in the image data set increases with the increase in dimensionality. In order to solve these difficulties, dimensionality reduction technology is particularly important. In the past few decades, many algorithms have been used to represent high-dimensional feature spaces as low-dimensional subspaces so that their important information is well preserved. Among them, principal component analysis (PCA) and linear discriminant analysis (LDA) are two of the most typical dimensionality reduction methods, which play an important role in unsupervised and supervised fields, respectively. However, in the real world, labeled image data is often not easy to obtain, so unsupervised dimensionality reduction algorithms are more valuable and widely used.
[0003] PCA is a very classic unsupervised dimensionality reduction algorithm, which is widely used in many applications due to its simplicity and effectiveness. From different perspectives, PCA has two main statements: one is that PCA learns the projection subspace by minimizing the reconstruction error of the projected image data samples based on the squared L2 norm, and the other is that PCA can obtain the optimal projection matrix by maximizing the variance of the image data samples in the projection subspace using the squared L2 norm. As we all know, they are equivalent. However, the traditional PCA has a very obvious disadvantage, that is, it uses the squared L2 norm to calculate the value of the loss function, which is easily affected by outliers and cannot learn the optimal projection subspace. In the real world, a large number of outliers often appear in image datasets, which makes it difficult for PCA to learn the optimal projection subspace.
[0004] In the past few decades, many research works have been devoted to improving the robustness of PCA to outliers. Some methods use different criterion functions such as minimizing or maximizing the nuclear norm and L1 norm to improve the performance of the model. For example, in the literature " Bernhard, Alexander Smola, and Klaus-Robert Müller. "Nonlinear component analysis as a kernel eigenvalue problem" Neural computation 10.5 (1998): 1299-1319, Bernhard et al. directly applied the integral operator kernel function to efficiently calculate the principal components in a high-dimensional feature space related to the input space; in the literature "Xu, Huan, Constantine Caramanis, and Sujay "Robust PCA via outlier pursuit" Advances in neural information processing systems 23 (2010)", Xu et al. proposed a robust principal component analysis from the perspective of matrix decomposition, which can accurately restore corrupted image data. Subsequently, these L1 norm-based methods have become very active in this field and have achieved good results. Specifically, in the literature "Wright, John, et al "Robust principal component analysis: Exact recovery of corrupted low-rank matrices via convex optimization" Advances in neural information processing systems 22 (2009)", Wright et al. proposed a robust principal component analysis method to recover low-rank matrices from damaged images, called L1-PCA. It is worth noting that the damaged entries are unknown and the error can be arbitrarily large, but the model needs to assume that these matrices are sparse. In the literature "Ke, Qifa, and Takeo Kanade "Robust l / sub1 / norm factorization in the presence of outliersand missing data by alternative convex programming" 2005IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'05). Vol.1.IEEE, 2005", Ke et al. proposed a subspace estimation algorithm, which uses iterative convex programming based on the L1 norm to minimize the cost function to solve the problem. This method can directly handle noisy image data and outliers.Finally, in the paper "Kwak, Nojun "Principal component analysis based on L1-norm maximization" IEEE transactions on pattern analysis and machine intelligence 30.9 (2008): 1672-1680", Kwak et al. proposed an L2 norm optimization technique, namely PCA-L1. Unlike the traditional PCA based on L2 norm, this method uses the L1 norm that is insensitive to outliers and has rotation invariance, so it is robust to outliers. In addition, PCA-L1 only requires matrix-vector multiplication operations, which is suitable for situations where the image data volume is large and the dimension is high. This corresponding two-dimensional version 2DPCA-L1 was also proposed by the authors Xi et al. in the document "Li, Xuelong, Yanwei Pang, and Yuan Yuan "L1-norm-based 2DPCA" IEEE Transactions on Systems, Man, and Cybernetics, Part B (Cybernetics) 40.4 (2010): 1170-1175", which avoids the calculation of the eigendecomposition process and its iterative steps are easy to perform. 2DPCA-L1 not only makes full use of spatial information, but also has robustness to outliers. The tensor version TPCA-L1 was also proposed by the authors Pang et al. in the document "Pang, Yanwei, Xuelong Li, and Yuan Yuan "Robust tensor analysis with L1-norm" IEEE Transactions on Circuits and Systems for Video Technology 20.2 (2009): 172-178", which uses L1-norm to reconstruct the error and uses tensor analysis to make it robust to outliers.Then, Ding et al. proposed the L1-norm PCA (R1PCA) based on rotation invariance in the document “Ding, Chris, et al. “R 1-pca: rotational invariant l 1-norm principal component analysis for robust subspace factorization” Proceedings of the 23rd international conference on Machine learning. 2006”, whose solution is the eigenvector of the R1-covariance matrix, further softening the contribution of outliers. Later, the extension of R1-PCA to its 2D version can be found in the literature "Yang, Jian, et al "Two-dimensional PCA: a new approach to appearance-based face representation and recognition" IEEE transactions on pattern analysis and machine intelligence 26.1 (2004): 131-137", and the robust tensor decomposition method was also proposed in the literature "Huang, Heng, and Chris Ding "Robust tensor factorization using r 1norm" 2008 IEEE Conference on Computer Vision and Pattern Recognition. IEEE, 2008", which uses the R1 norm as the error accumulation function using the robust covariance matrix, instead of using quadratic programming for calculation like other L1 norm methods.
[0005] It is worth noting that the existing robust PCA methods as described above usually use the mean of the image data as the optimal mean to obtain the projection matrix, that is, it is usually assumed that the mean of the image data is zero. However, this method is unreasonable because the presence of outliers in high-dimensional data may cause the center of the image data to deviate from the mean of the image data. Moreover, in the robust principal component analysis based on the L1 norm, they use the arithmetic mean of the image data as the optimal mean, which is incorrect because the calculation of the mean of the image data is based on the L2 norm and the objective function is based on the L1 norm. In addition, these weight-based algorithms do not constrain the weights, so the weights of the image data may be unstable, which affects the calculation of the projection matrix and ultimately leads to a decrease in the performance of the model.
[0006] Therefore, the present invention proposes an image data dimensionality reduction and noise reduction method based on adaptive robust principal component analysis for image noise processing to solve the problems existing in the above-mentioned prior art. Summary of the invention
[0007] 1. Technical issues to be resolved
[0008] In view of the shortcomings of the prior art, the present invention provides a data processing method, device and storage medium based on adaptive robust principal component analysis. The processing method uses the squared L2 norm to minimize the reconstruction error and reduce the influence of outliers. It has the advantages of strong robustness, strict convergence guarantee and closed-form solution, and solves the problems of the existing PCA method, such as the inability to constrain the weights of image data, unstable weights of image data and poor model robustness.
[0009] (II) Technical solution
[0010] In order to achieve the above-mentioned purpose of reducing the influence of outliers in the process of image data dimensionality reduction and improving the robustness of the model, the present invention provides the following technical solutions:
[0011] The present invention provides a first solution: an image data processing method based on adaptive robust principal component analysis, the processing method is used for data dimension reduction and noise reduction, including
[0012] Step 1: Collect data and normalize the image dataset;
[0013] Step 2: Establish a data dimension reduction and noise reduction model based on adaptive robust principal component analysis;
[0014] Step 3: Bring the data set pre-processed in step 1 into the data dimension reduction and noise reduction model based on adaptive robust principal component analysis established in step 2 for dimension reduction, and use the optimized iterative algorithm to iteratively train the adaptive robust principal component analysis model to make the adaptive robust principal component analysis model reach a stable state;
[0015] Step 4: The data set pre-processed in step 1 is brought into the stable adaptive robust principal component analysis model obtained after training in step 3 to solve and obtain the optimal solution. Then the obtained results are clustered using the K-means method to obtain the final clustering result, completing the image data dimensionality reduction and noise reduction processing.
[0016] Preferably, the process of establishing the image data dimensionality reduction and noise reduction model based on adaptive robust principal component analysis in step 2 includes:
[0017] Step 2.1: Add the most significant mean to the PCA model, and the improved PCA model is:
[0018]
[0019] Among them, x i represents a data sample, E represents the projection matrix, E T represents the transpose of the projection matrix E, I represents the identity matrix, and θ represents the mean variable;
[0020] Step 2.2: Add an adaptive constraint to the above improved PCA model to obtain the final data dimension reduction and noise reduction model based on adaptive robust principal component analysis:
[0021]
[0022] Among them, γ is a regularization parameter, 1 represents a vector with all elements being 1, g represents the weight, and 0≤g i ≤1,g i Corresponding to the weight of each data sample, g T represents the transpose of the weight g.
[0023] Preferably, the process of iteratively training the adaptive robust principal component analysis model using the optimized iterative algorithm in step 2 includes:
[0024] Step 3.1: Rewrite the final image data dimensionality reduction and denoising model based on adaptive robust principal component analysis as follows:
[0025]
[0026] Step 3.2: When the weight g of each image data sample is fixed, find the optimal solution of model (3);
[0027] Step 3.3: When the projection matrix E and θ are fixed, find the optimal solution of model (3).
[0028] Preferably, in step 3.2, when the weight g of each image data sample is fixed, the process of solving the optimal solution of model (3) includes:
[0029] Step 3.2.1: When the weight g of each image data sample is fixed, model (3) is rewritten as:
[0030]
[0031] Step 3.2.2: At this point, model (4) has two optimization variables E and θ. Taking the partial derivative of variable θ and setting it to 0, we get:
[0032] (I-EE T )(θ1 T -X)g γ =0 (5)
[0033] Among them, X represents the entire data set;
[0034] Step 3.2.3: Let E ⊥ is the orthogonal complement of E, [E ⊥ ,E] is an orthogonal matrix, and for any vector (θ1 T -X)g γ is represented as:
[0035] (θ1 T -X)g γ =Eα+E ⊥ β (6)
[0036] Among them, α and β are two orthogonal parameters;
[0037] Substituting model (6) into model (5), we obtain:
[0038] (I-EE T )(Eα+E ⊥ β)=0 (7)
[0039] Step 3.2.4: According to the properties of matrix orthogonal complement, we get E ⊥ β=0, let β=0, then:
[0040] (θ1 T -X)g γ =Eα (8)
[0041] By simplification, the optimal solution of the optimization variable θ is obtained as:
[0042]
[0043] Where α is any k-dimensional vector, and α is set to be a zero vector. Then, substitute equation (9) into equation (4) to obtain:
[0044]
[0045] in, is a weight center matrix, diag(g γ ) is a diagonal matrix with the i-th diagonal element g_ii equal to the i-th diagonal element in g;
[0046] Step 3.2.5: Let G = diag(g γ )and The optimal solution of model (10) is XH d X T corresponds to the eigenvectors corresponding to the first k largest eigenvalues; when d>n, SVD decomposition is used to obtain the optimal solution of model (10), then:
[0047]
[0048] Preferably, in step 3.3, when the projection matrix E and θ are fixed, the process of solving the optimal solution of model (3) includes:
[0049] Step 3.3.1: When the projection matrix E and θ are fixed, model (3) can be rewritten as:
[0050]
[0051] Applying the Lagrange multiplier method to model (12) and taking partial derivatives of the variable g, we obtain:
[0052]
[0053] Let model (13) be 0, and we get:
[0054]
[0055] Step 3.3.2: Constrain Substitute into model (14) and simplify, and we get
[0056]
[0057] From model (15), we get Then, model (15) is substituted into model (14), and we get:
[0058]
[0059] At this point, the model is iteratively trained until it converges and reaches a stable state, and a stable adaptive robust principal component analysis model is obtained.
[0060] The present invention provides a second solution: an image data processing device based on adaptive robust principal component analysis, comprising: at least one processor; and a memory connected to the at least one processor in communication;
[0061] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the image data processing method based on adaptive robust principal component analysis.
[0062] The present invention provides a third solution: a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, an image data processing method based on adaptive robust principal component analysis is implemented.
[0063] (III) Beneficial effects
[0064] Compared with the prior art, the present invention provides an image data processing method, device and storage medium based on adaptive robust principal component analysis, which has the following beneficial effects:
[0065] 1. The present invention proposes a data dimension reduction and noise reduction algorithm based on adaptive robust principal component analysis for image data noise processing. The method learns the projection matrix by squared L2 norm, which is theoretically related to minimizing the reconstruction error, retains the properties of the traditional principal component analysis method in the data processing process and has rotation invariance;
[0066] 2. In this method, in order to make the calculated data mean more reasonable, this method automatically optimizes the optimal mean of the data during the optimization process of the loss function, which can make the optimized data center more reasonable;
[0067] 3. This method can learn the projection matrix more accurately by applying a self-constrained weight strategy to the loss function; specifically, by adopting a shrinking and stretching strategy, all data samples are placed in relative positions, and relatively small weights are automatically assigned to items with large reconstruction errors, and relatively large weights are assigned to items with small reconstruction errors, which can effectively reduce the negative impact of outliers;
[0068] 4. The present invention establishes an image data dimensionality reduction and noise reduction method model based on adaptive robust principal component analysis. This model can be applied to abnormal data detection, such as in the binary classification anomaly detection problem. Specifically, it can be applied to the detection of abnormal data that deviates from normal values in operation and maintenance;
[0069] 5. Finally, the present invention designs an iterative optimization algorithm to solve the proposed data dimensionality reduction and denoising model based on adaptive robust principal component analysis, and extensive experimental results on real-world data sets prove the significant effectiveness and superiority of the method proposed in the present invention in data set noise processing compared with other advanced methods, and can obtain better projection vectors; it achieves the purpose of reducing the impact of outliers and improving the robustness of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 It is a flow chart of the data dimension reduction and noise reduction method based on adaptive robust principal component analysis of the present invention;
[0071] Figure 2 This is a structural diagram of an image data processing device based on adaptive robust principal component analysis according to Embodiment 2 of the present invention;
[0072] Figure 3 The projection vector curve diagram obtained by learning various related variant models of PCA in Example 4 of the present invention;
[0073] Figure 4This is a graph of the reconstructed visualization experiment results of Example 4 of the present invention. DETAILED DESCRIPTION
[0074] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0075] Example 1: Please refer to Figure 1 , the present invention provides a technical solution:
[0076] The variant PCA models based on L1 norm and L2 norm are not enough to release the negative impact of outliers and noise in image data; although the L2,p-PCA model is more robust to outliers and noise in image data, when p<1, the model will affect the discrimination of positive samples; more importantly, none of them can deal with the negative impact on the model well.
[0077] In order to alleviate the above defects, this embodiment designs an image data processing (dimensionality reduction and noise reduction) method based on adaptive robust principal component analysis, which can be applied to the detection of abnormal image data that deviates from normal values in operation and maintenance, and to process abnormal values and noise in image data; including
[0078] Step 1: Collect image data. First, normalize the data set to ensure that the feature dimensions of the data are under a unified measurement. Then, add different noises to the data set to act as noise samples, and use them as input samples for the data dimensionality reduction and denoising model based on adaptive robust principal component analysis.
[0079] Step 2: Establish a data dimension reduction and noise reduction model based on adaptive robust principal component analysis
[0080] Step 2.1: First, in order to reduce the negative impact of the arithmetic mean on the model, this embodiment adds the most significant mean to the PCA model, and the model can be expressed as follows:
[0081]
[0082] In formula (1), X represents the entire data set, x i represents a data sample, E represents the projection matrix, E T represents the transpose of the projection matrix E, I represents the identity matrix, θ represents the mean variable, and θ∈Ω represents that Ω is a feasible set of θ. This is a A subset of, similarly, the projection matrix E has an orthogonal constraint, which is consistent with the orthogonal constraint in the original PCA and the previous orthogonal constraint;
[0083] Step 2.2: At this point, it can be clearly seen from the above model that the model is fair to all data samples, which is incorrect; the main reason is that in the data set, outliers and noise are treated as positive samples, which will affect the performance of the algorithm model; to solve this problem, this embodiment penalizes outliers to reduce the impact on the model; specifically, this embodiment carefully designs a strategy to automatically assign smaller weights to outliers or noise, and assign larger weights to positive samples to reduce the negative impact of outliers and noise; therefore, this embodiment adds an adaptive constraint to the above model, and the final data dimensionality reduction and denoising model based on adaptive robust principal component analysis can be written as follows:
[0084]
[0085] In formula (2), γ is a regularization parameter, 1 represents a vector with all elements equal to 1, g represents the weight, and 0≤g i ≤1,g i Corresponding to the weight of each data sample, g T represents the transpose of weight g;
[0086] Step 2.3: In order to avoid a trivial solution in model (2), this embodiment controls the sum of the weights of all data samples to be 1, and distinguishes all data samples according to the weights, that is, by using the above-mentioned contraction and expansion strategy to place all data samples in relative positions, so that the model is more reasonable;
[0087] Step 3: Bring all the data sets pre-processed in step 1 into the data dimension reduction and noise reduction model based on adaptive robust principal component analysis established in step 2 for dimension reduction, and use the optimized iterative algorithm to iteratively train the adaptive robust principal component analysis model to make the adaptive robust principal component analysis model reach a stable state; specifically include
[0088] In order to solve and train the model (2) proposed in this embodiment, this embodiment designs an iterative optimization algorithm as follows:
[0089] Step 3.1: First, rewrite model (2) as follows:
[0090]
[0091] In formula (3), X represents the entire data set, x i represents a data sample, E represents the projection matrix, E Trepresents the transpose of the projection matrix E, I represents the identity matrix, θ represents the mean variable, γ is a regularization parameter, 1 represents a vector with all elements equal to 1, g represents the weight, 0≤g i ≤1,g i Corresponding to the weight of each data sample, g T represents the transpose of weight g;
[0092] Step 3.2: When g is fixed, find the optimal solution of model (3)
[0093] Step 3.2.1: Model (3) can be rewritten as follows:
[0094]
[0095] Step 3.2.2: At this point, model (4) has two optimization variables E and θ. Taking the partial derivative of variable θ and setting it to 0, we can get:
[0096] (I-EE T )(θ1 T -X)g γ =0 (5)
[0097] Step 3.2.3: Let E ⊥ is the orthogonal complement of the matrix E, then [E ⊥ ,E] is an orthogonal matrix, then we have a conclusion, that is, for any vector (θ1 T -X)g γ , which can be expressed as:
[0098] (θ1 T -X)g γ =Eα+E ⊥ β (6)
[0099] Among them, in formula (6), α and β are two orthogonal parameters;
[0100] We bring model (6) into model (5) and obtain:
[0101] (I-EE T )(Eα+E ⊥ β)=0 (7)
[0102] Step 3.2.4: According to the properties of matrix orthogonal complement, we get E ⊥ β=0, then let β=0, then we have:
[0103] (θ1 T -X)g γ =Eα (8)
[0104] By simplification, the optimal solution of the optimization variable θ can be obtained as:
[0105]
[0106] It is worth noting that if α is any k-dimensional vector, we set α to the zero vector;
[0107] Then, we substitute equation (9) into equation (4) and obtain:
[0108]
[0109] in, is a weight center matrix, diag(g γ ) is a diagonal matrix with the i-th diagonal element g_ii equal to the i-th diagonal element in g;
[0110] Step 3.2.5: Let G = diag(g γ )and Then Therefore, the optimal solution of model (10) is XH d X T corresponds to the eigenvectors corresponding to the first k largest eigenvalues; in general, when d>n, we can use SVD decomposition to obtain the optimal solution of model (10), then:
[0111]
[0112] Step 3.3: When E and θ are fixed, find the optimal solution of model (3)
[0113] Step 3.3.1: Model (3) can be written as follows:
[0114]
[0115] Using the Lagrange multiplier method for model (12) and taking partial derivatives of the variable g, we can obtain:
[0116]
[0117] Let model (13) be 0, we can get:
[0118]
[0119] Step 3.3.2: Constrain Substituting into model (14) and simplifying it, we can get
[0120]
[0121] From model (15), we can get Then, model (15) is introduced into model (14), and we can obtain:
[0122]
[0123] At this point, the model is trained iteratively until it converges and reaches a stable state, and a stable adaptive robust principal component analysis model is obtained;
[0124] Step 4: Bring the data set pre-processed in step 1 into the stable adaptive robust principal component analysis model for solution to obtain low-dimensional data in different dimensions, and then use the K-means method to perform clustering experiments on the low-dimensional data in different dimensions. Finally, compare the obtained results with the real labels to obtain the final experimental results, and then complete the construction of the data dimensionality reduction and denoising method based on adaptive robust principal component analysis.
[0125] Example 2: Please refer to Figure 2 , the present invention provides a technical solution: an image data processing device based on adaptive robust principal component analysis, comprising: at least one processor 1; and a memory 2 communicatively connected to the at least one processor 1;
[0126] The memory 2 stores instructions that can be executed by the at least one processor 1, and the instructions are executed by the at least one processor 1 so that the at least one processor 1 can execute the above-mentioned image data processing method based on adaptive robust principal component analysis.
[0127] As a preferred embodiment, the memory 2 and processor 1 are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors 1 and memory 2 together; the bus can also connect various other circuits such as peripheral devices, voltage regulators and power management circuits, which are all well known in the art and therefore, are not further described in this article; the bus interface provides an interface between the bus and the transceiver; the transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium; the data processed by the processor 1 is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor 1.
[0128] As a preferred embodiment, the processor 1 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management and other control functions; and the memory 2 can be used to store data used by the processor 1 when performing operations.
[0129] Embodiment 3: The present invention provides a technical solution: a computer-readable storage medium storing a computer program, which implements the image data processing method based on adaptive robust principal component analysis when executed by a processor.
[0130] Those skilled in the art will appreciate that all or part of the steps in the above-mentioned embodiment method can be implemented by instructing related hardware through a program, and the program is stored in a storage medium, including a number of instructions for enabling a device (which may be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application; and the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0131] Example 4: Figure 3-Figure 4 As shown, in order to verify the effectiveness and superiority of the image data processing method based on adaptive robust principal component analysis described in Example 1 of the present invention, this example is designed for verification.
[0132] 1. In this embodiment, we verify the robustness of the method proposed in Embodiment 1 of the present invention and compare it with traditional PCA, PCAL1-N, PCAL1-G, R1PCA, LS2,0.5-PCA and L2,1-PCA. The specific process includes:
[0133] 1. First, we randomly generate a two-dimensional data set with a Gaussian distribution and then generate 7 outliers; Figure 2 In the figure, black “*” indicates positive samples, and red “o” indicates outliers;
[0134] 2. Then, we use the above model to reduce the dimensionality of the two-dimensional image data to one dimension, such as Figure 3 As shown, it can be seen that due to the existence of outliers, the performance of traditional PCA is the worst; the performance of R1PCA, L2,0.5-PCA and L2,1-PCA is not much different, but they are all affected by outliers and have large deviations; PCAL1-N and PCAL1-G are less affected by outliers and can obtain better projection vectors;
[0135] pass Figure 3 It can be seen that the model proposed in Example 1 of the present invention obtains the best projection vector, so its anti-interference ability in the data dimensionality reduction and noise reduction process is the best, which shows that the algorithm proposed in Example 1 of the present invention is more robust than other algorithms.
[0136] 2. In this embodiment, in order to more intuitively demonstrate the performance of the model, we conducted reconstruction visualization experiments on the orlraws10P image dataset with salt and pepper noise and black square noise blocks, and compared with other algorithms; specifically, the dimension is set to 100, and we focus on the reconstruction ability of clean samples; Figure 4 As shown, the first three rows are the visualization results of adding black square occlusion, and the last three rows are the visualization results of adding salt and pepper noise blocks. We show the visualization results and the best visualization results when γ = 2;
[0137] It can be clearly seen that other algorithms cannot reconstruct samples well, but the model proposed in Example 1 of the present invention can reconstruct samples very effectively when an appropriate γ is selected; when γ=2, its performance on the orlraws10P dataset with salt and pepper noise blocks is better than other algorithms, and its performance on the orlraws10P dataset with black square occlusion is slightly worse; in addition, it can be intuitively seen that the model of Example 1 of the present invention is sensitive to the parameter γ.
[0138] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0139] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. An image data processing method based on adaptive robust principal component analysis, characterized in that: The processing method is used for data dimensionality reduction and noise reduction, including Step 1: Collect image data and normalize the data set; Step 2: Establish a data dimension reduction and noise reduction model based on adaptive robust principal component analysis; Step 3: Bring the data set pre-processed in step 1 into the data dimension reduction and noise reduction model based on adaptive robust principal component analysis established in step 2 for dimension reduction, and use the optimized iterative algorithm to iteratively train the adaptive robust principal component analysis model to make the adaptive robust principal component analysis model reach a stable state; Step 4: The data set pre-processed in step 1 is brought into the stable adaptive robust principal component analysis model obtained after training in step 3 to solve and obtain the optimal solution. Then the obtained results are clustered using the K-means method to obtain the final clustering result, completing the image data dimensionality reduction and noise reduction processing.
2. The image data processing method based on adaptive robust principal component analysis according to claim 1, characterized in that: The process of establishing the data dimension reduction and noise reduction model based on adaptive robust principal component analysis in step 2 includes: Step 2.1: Add the most significant mean to the PCA model, and the improved PCA model is: Among them, x i represents a data sample, E represents the projection matrix, E T represents the transpose of the projection matrix E, I represents the identity matrix, and θ represents the mean variable; Step 2.2: Add an adaptive constraint to the above improved PCA model to obtain the final data dimension reduction and noise reduction model based on adaptive robust principal component analysis: Among them, γ is a regularization parameter, 1 represents a vector with all elements being 1, g represents the weight, and 0≤g i ≤1,g i Corresponding to the weight of each data sample, g T represents the transpose of the weight g.
3. The image data processing method based on adaptive robust principal component analysis according to claim 1, characterized in that: The process of iteratively training the adaptive robust principal component analysis model using the optimized iterative algorithm described in step 2 includes: Step 3.1: Rewrite the final data dimension reduction and noise reduction model based on adaptive robust principal component analysis as follows: Step 3.2: When the weight g of each data sample is fixed, find the optimal solution of model (3); Step 3.3: When the projection matrix E and θ are fixed, find the optimal solution of model (3).
4. The image data processing method based on adaptive robust principal component analysis according to claim 3, characterized in that: When the weight g of each data sample is fixed as described in step 3.2, the process of solving the optimal solution of model (3) includes Step 3.2.1: When the weight g of each data sample is fixed, model (3) can be rewritten as: Step 3.2.2: At this point, model (4) has two optimization variables E and θ. Taking the partial derivative of variable θ and setting it to 0, we get: (I-EE T )(θ1 T -X)g γ =0 (5) Among them, X represents the entire data set; Step 3.2.3: Let E ⊥ is the orthogonal complement of E, [E ⊥ ,E] is an orthogonal matrix, and for any vector (θ1 T -X)g γ is represented as: (θ1 T -X)g γ =Eα+E ⊥ b (6) Among them, α and β are two orthogonal parameters; Substituting model (6) into model (5), we obtain: (I-EE T )(Eα+E ⊥ b)=0 (7) Step 3.2.4: According to the properties of matrix orthogonal complement, we get E ⊥ β=0, let β=0, then: (θ1 T -X)g γ =Ea (8) By simplification, the optimal solution of the optimization variable θ is obtained as: Where α is any k-dimensional vector, and α is set to be a zero vector. Then, substitute equation (9) into equation (4) to obtain: in, is a weight center matrix, diag(g γ ) is a diagonal matrix with the i-th diagonal element g_ii equal to the i-th diagonal element in g; Step 3.2.5: Let G = diag(g γ )and The optimal solution of model (10) is XH d X T corresponds to the eigenvectors corresponding to the first k largest eigenvalues; when d>n, SVD decomposition is used to obtain the optimal solution of model (10), then:
5. The image data processing method based on adaptive robust principal component analysis according to claim 3, characterized in that: Step 3.3: When the projection matrix E and θ are fixed, the process of solving the optimal solution of model (3) includes: Step 3.3.1: When the projection matrix E and θ are fixed, model (3) can be rewritten as: Applying the Lagrange multiplier method to model (12) and taking partial derivatives of the variable g, we obtain: Let model (13) be 0, and we get: Step 3.3.2: Constrain Substitute into model (14) and simplify, and we get From model (15), we get Then, model (15) is substituted into model (14), and we get: At this point, the model is iteratively trained until it converges and reaches a stable state, and a stable adaptive robust principal component analysis model is obtained.
6. An image data processing device based on adaptive robust principal component analysis, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; Wherein, the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the image data processing method based on adaptive robust principal component analysis as described in any one of claims 1 to 5.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the image data processing method based on adaptive robust principal component analysis according to any one of claims 1 to 5 is implemented.
