A semi-supervised image clustering method and system based on adaptive graph learning, computer storage medium and program
By employing an adaptive graph learning approach, combined with iterative updates of sparse representation matrices and pairwise constraint matrices, the problem of separating similarity graph learning and constraint propagation is solved, thereby improving the accuracy and robustness of image clustering.
Patent Information
- Application Number
- CN202511659058.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-13
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2045-11-13
AI Technical Summary
Existing semi-supervised image clustering methods based on pairwise sample constraints neglect the close relationship between similarity graph learning and constraint propagation, resulting in poor image clustering performance, especially when dealing with noisy, outlier, and highly ambiguous images.
An adaptive graph learning approach is adopted, which constructs an objective function by iteratively updating the sparse representation matrix and pairwise constraint matrix to optimize the combination of similar graph learning and constraint propagation, and uses a spectral clustering algorithm to cluster image sample data.
It improves the performance of image clustering, enhances the ability to handle noisy, outlier, and blurry images, and obtains more accurate clustering results.
Smart Images

Figure CN121121185B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a semi-supervised image clustering method, system, computer storage medium and program based on adaptive graph learning, and belongs to the technical field of image recognition. BACKGROUND
[0002] Due to the interference in the process of image acquisition and transmission, the image has a lot of noise, and due to the light condition and the shooting angle, the image also has ambiguity. In addition, due to the complexity of the image content, the distribution of the image data is relatively complex. Therefore, the clustering of the image is more complex. Compared with the K-means clustering algorithm, the spectral clustering algorithm has lower sensitivity to noise, outliers and ambiguity and is good at processing complex data distribution, so that better results can be obtained by using the spectral clustering algorithm for image clustering. The performance of the spectral clustering depends on the quality of the similar graph of the data sample, so how to obtain a high-quality similar graph of the image is the core problem of image clustering.
[0003] In order to identify the similarity relationship between images, the existing semi-supervised image clustering method based on pair sample constraint uses a fixed input similarity matrix to propagate the constraint, constructs a similarity matrix before propagating the constraint, and improves the similarity matrix after propagating the constraint. Such a pre-established similarity matrix is usually determined by experience and is usually inaccurate, and the complexity of image distribution, image noise and image ambiguity make their accuracy lower, which is not conducive to the propagation of the constraint, thereby easily producing poor image clustering results. In essence, such a method ignores the close relationship between similar graph learning and constraint propagation, causing them to separate from each other, thereby causing poor clustering performance. SUMMARY
[0004] In view of the defects of the prior art, the present application provides a semi-supervised image clustering method based on adaptive graph learning, which solves the problem of separation of similar graph learning and constraint propagation, and avoids the use of a fixed similarity graph to propagate the constraint, thereby causing poor image clustering performance. The present application also provides a semi-supervised image clustering system based on adaptive graph learning, a computer storage medium and a program for implementing the method.
[0005] The technical scheme of the present application is a semi-supervised image clustering method based on adaptive graph learning, comprising the following steps:
[0006] Iteratively updating the sparse representation matrix and the pair constraint matrix until the value of the objective function is constant or the maximum number of iterations is reached, and using the updated pair constraint matrix as the input similarity matrix to call the spectral clustering algorithm to divide the image sample data into several sample groups to complete clustering and output;
[0007] The objective function is a weighted sum of the propagation consistency error based on the sparse representation matrix and the pairwise constraint matrix, the image sample data reconstruction error based on the sparse representation matrix, the L1 norm of the sparse representation matrix, and the matrix correlation error based on the sparse representation matrix and the pairwise constraint matrix.
[0008] The first update formula is used when updating the sparse representation matrix. Perform, and Set each diagonal element to 0 for each do-not-connect constraint. ,Will and Set all to 0;
[0009] The second update formula is used when updating the pairwise constraint matrix. Perform, and Set each diagonal element to 0 for each do-not-connect constraint. ,Will and Set all to 0 for each mandatory connection constraint. , less than the threshold and Set as a threshold, and set W Set it to the average of itself and its transpose;
[0010] For a sparse representation matrix, For pairwise constraint matrices, For image sample data matrix, for medium sample These are the weighting coefficients for the reconstruction error of the image sample data in the objective function. The weighting coefficients are the L1 norms of the sparse representation matrix in the objective function. These are the weighting coefficients for matrix correlation errors in the objective function. This represents element-wise multiplication. This indicates element-wise division.
[0011] Furthermore, the propagation consistency error is The image sample data reconstruction error is The matrix correlation error is , This represents the Frobenius norm of the matrix.
[0012] Furthermore, the specific steps for iteratively updating the sparse representation matrix and the pairwise constraint matrix until the value of the objective function remains unchanged or reaches the maximum number of iterations include:
[0013] S1, Initialization W andS Each element is a random number within the range (0, 1);
[0014] S2, updated by the first update formula S ; make each , , n The number of samples in the image sample data; , For each do-not-connect constraint Sample subscripts;
[0015] S3, Updated by the second update formula W ; make each , ;make ;make , For each mandatory connection constraint Sample subscripts, The set threshold;
[0016] S4 Initialize matrix D =0;
[0017] S5 , ;
[0018] S6 ;
[0019] S7. Calculate the value of the objective function. If there is no change, end the iteration. Otherwise, check if the number of iterations has reached the maximum. If the number of iterations has reached the maximum, end the iteration. Otherwise, return to step S2 for the next round of iteration.
[0020] Another technical solution of the present invention is: a semi-supervised image clustering system based on adaptive graph learning, comprising:
[0021] The pairwise sample constraint propagation module is used to iteratively update the sparse representation matrix and the pairwise constraint matrix until the value of the objective function remains unchanged or the maximum number of iterations is reached.
[0022] The clustering module is used to call the spectral clustering algorithm with the updated pairwise constraint matrix as input to divide the image sample data into several sample groups and complete the clustering output.
[0023] The objective function is a weighted sum of the propagation consistency error based on the sparse representation matrix and the pairwise constraint matrix, the image sample data reconstruction error based on the sparse representation matrix, the L1 norm of the sparse representation matrix, and the matrix correlation error based on the sparse representation matrix and the pairwise constraint matrix.
[0024] The first update formula is used when updating the sparse representation matrix. Perform, and Set each diagonal element to 0 for each do-not-connect constraint. ,Will and Set all to 0;
[0025] The second update formula is used when updating the pairwise constraint matrix. Perform, and Set each diagonal element to 0 for each do-not-connect constraint. ,Will and Set all to 0 for each mandatory connection constraint. , less than the threshold and Set as a threshold, and set W Set it to the average of itself and its transpose;
[0026] For a sparse representation matrix, For pairwise constraint matrices, For image sample data matrix, for medium sample These are the weighting coefficients for the reconstruction error of the image sample data in the objective function. The weighting coefficients are the L1 norms of the sparse representation matrix in the objective function. These are the weighting coefficients for matrix correlation errors in the objective function. This represents element-wise multiplication. This indicates element-wise division.
[0027] Another technical solution of the present invention is: a computer storage medium storing a computer program thereon, wherein when the computer program is executed by a processor, it implements the aforementioned semi-supervised image clustering method based on adaptive graph learning.
[0028] Another technical solution of the present invention is: a computer program, which, when executed by a processor, implements the aforementioned semi-supervised image clustering method based on adaptive graph learning.
[0029] Compared with the prior art, the advantages of the technical solution provided by the present invention are as follows:
[0030] This invention incorporates similarity graph learning into the constraint propagation process, fully considering the close relationship between similarity graph learning and constraint propagation, and seamlessly integrates similarity graph learning and constraint propagation into a unified framework. This solves the problem of separation between similarity graph learning and constraint propagation, avoids the use of fixed similarity graph propagation constraints, and thus improves image clustering performance. BRIEF DESCRIPTION OF DRAWINGS
[0031] Figure 1 Flowchart of the embodiment of the semi-supervised image clustering method based on adaptive graph learning.
[0032] Figure 2 Accuracy results of the embodiment of the semi-supervised image clustering method based on adaptive graph learning and prior art methods under different ratios of pairwise constraints.
[0033] Figure 3 Normalized mutual information results of the embodiment of the semi-supervised image clustering method based on adaptive graph learning and prior art methods under different ratios of pairwise constraints. DETAILED DESCRIPTION
[0034] The present application will be further described with reference to the following examples. It should be understood that these examples are intended to illustrate the present application and are not intended to limit the scope of the present application. Various modifications of the present application in light of the present description will be evident to those skilled in the art and such modifications are intended to fall within the scope of the appended claims.
[0035] Each image is vectorized and the vector length is normalized. The image sample data matrix is X , the i th sample is x i , the number of samples is n , is the set of must-link constraints, and is the set of cannot-link constraints. Let S be the sparse representation matrix (similarity matrix), and let W be the propagated pairwise constraint matrix. The process of constructing the objective function of the optimization model is as follows:
[0036] The sparse data representation learning model is used to learn S , so that the objective function needs to minimize the reconstruction error of the image sample data and maximize the sparsity of S . In order to make full use of S and the pairwise sample constraint, the propagated pairwise constraint between any two samples x i and x j is represented as x j and the weighted sum of the propagated pairwise constraints between all samples, and the weight coefficient is S in x i and the similarity between all samples. Thus, if x i is similar to x jSome samples of the same type, then x i and x j tend to the same category. Thus, the objective function needs to minimize W and the difference. To achieve S and W a close relationship, so that S and W positive correlation, the objective function also needs to minimize S and W the difference, thereby, the constraint propagation can guide S learning, and S learning can make W capture more accurate pair of sample constraints. Finally, the objective function is defined as: . to propagate consistency error, to image sample data reconstruction error, to matrix correlation error, denotes the Frobenius norm of the matrix.
[0037] For S and W constructing restrictions, including:
[0038] First, it is necessary to ensure the non-negativity of S and W . For each pair of constraint samples , it is necessary to ensure , . For each pair of constraint samples , it is necessary to ensure . In order to avoid meaningless solutions, it is necessary to ensure that each diagonal element of S is 0. In order to make W revealed sample similarity more significant, it is necessary to ensure that each diagonal element of W is 0. The objective function can only make the pair of sample constraints propagate along each column of W , in order to make the rows of W can provide more useful information, it is necessary to ensure that the transpose of W and W are equal.
[0039] Finally, the optimization model of the pair of sample constraint propagation is formalized as the following restricted minimization problem:
[0040] ,
[0041] s.t.
[0042] ,
[0043] ,
[0044] ,
[0045] ,
[0046] ,
[0047] , is a set threshold value,
[0048] ,
[0049] .
[0050] In order to obtain the update formula of S and W , first introduce two Lagrange multiplier matrices for the non-negativity constraints of S and W , so as to obtain the Lagrange function of the objective function. Then the partial derivatives of the Lagrange function with respect to W , S are obtained. According to the KKT condition, the partial derivatives of the Lagrange function with respect to W , S are all 0, W and the Hadamard product of the Lagrange multiplier matrix of S and is 0. Thus the update formula of S and W is derived, the first update formula is , and the second update formula is .
[0051] Based on the above, the semi-supervised image clustering system based on adaptive graph learning provided by the embodiment comprises:
[0052] The pair sample constraint propagation module is configured to iteratively update the sparse representation matrix S and the pair constraint matrix W until the value of the objective function is unchanged or the maximum number of iterations is reached.
[0053] The clustering module is configured to call a spectral clustering algorithm to divide the image sample data into a plurality of sample groups to complete clustering and output by taking the updated pair constraint matrix W as the input of the similarity matrix.
[0054] When iteratively updating the sparse representation matrix and the pair constraint matrix, first updateS and then implement the constraint condition related to S ; update W and then implement the constraint condition related to W ; and finally, regularize W to maintain its stability and symmetry.
[0055] Please refer to Figure 1 , the system implements a semi-supervised image clustering method based on adaptive graph learning, the input is the image sample data matrix X , the number of data categories c , the must-not-connect constraint set , the must-connect constraint set , the method comprises:
[0056] iteratively update the sparse representation matrix S and the pair constraint matrix W to the value of the objective function is unchanged or reaches the maximum number of iterations, the process specifically includes the following steps:
[0057] Step 1: initialize W and S each element of (0, 1) to a random number.
[0058] Step 2: initialize the number of iterations t =1.
[0059] Step 3: update according to the first update formula S .
[0060] Step 4: .
[0061] Step 5: that is, for each must-not-connect constraint , .
[0062] Step 6: update according to the second update formula W .
[0063] Step 7: .
[0064] Step 8: that is, for each must-not-connect constraint , .
[0065] Step 9: that is, for each must-connect constraint , , is a set threshold value.
[0066] Step 10: .
[0067] Step 11: D =0.
[0068] Step 12: .
[0069] Step 13: .
[0070] Step 14: If the objective function If the value does not change, the update ends.
[0071] Step 15: t = t +1.
[0072] Step 16: If If the result is positive, proceed to step 3; otherwise, end the update process.
[0073] With the updated pairwise constraint matrix W The similarity matrix is used as input to call the spectral clustering algorithm to divide the image sample data into several sample groups of data categories and complete the clustering output. The spectral clustering algorithm used in this embodiment is the NCuts algorithm. It should be noted that other spectral clustering algorithms can also be used in other embodiments.
[0074] To verify the advantages of the method proposed in this invention, a semi-supervised image clustering experiment based on pairwise sample constraint information was conducted to compare the embodiments of this invention with the comprehensive and efficient constraint propagation algorithm E. 2 Clustering performance was compared using the following algorithms: CP, PCPDAMR (a pairwise constraint propagation algorithm based on bi-adversarial manifold regularization), HSSNMF (a semi-supervised symmetric nonnegative matrix factorization algorithm based on hypergraphs), S3NMF (a semi-supervised clustering algorithm based on structured symmetric nonnegative matrix factorization), and RPCP (a recursive pairwise constraint propagation algorithm). Accuracy and normalized mutual information were used as performance metrics. Experiments were conducted on the YaleB face image dataset. The YaleB face image dataset contains 2414 samples in 38 categories, with each sample having a dimension of 1024. The parameters of the algorithm in this invention are described. The values were adjusted within the ranges {1, 10, 100, 1000}, {0.001, 0.01, 0.1, 1, 10, 100}, {0.01, 0.05, 0.1, 0.5, 1}, and {0.01, 0.1, 0.2, 0.3}. The number of iterations for the algorithm in this invention was set to 600. The experimental program was developed using MATLAB. Different pairwise sample constraint ratios were considered in the experiment. The experimental results are as follows: Figure 2 , Figure 3As shown by the experimental results, the algorithm has better clustering performance than other algorithms.
[0075] Finally, it should be pointed out that the specific methods of the above embodiments can form a computer program product, and therefore, the computer program product implemented by the present application can be stored on one or more computer usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.).
Claims
1. A semi-supervised image clustering method based on adaptive graph learning, characterized in that, include: Iteratively update the sparse representation matrix and pairwise constraint matrix until the value of the objective function remains unchanged or the maximum number of iterations is reached. Using the updated pairwise constraint matrix as the input similarity matrix, call the spectral clustering algorithm to divide the image sample data into several sample groups to complete the clustering output. The objective function is a weighted sum of the propagation consistency error based on the sparse representation matrix and the pairwise constraint matrix, the image sample data reconstruction error based on the sparse representation matrix, the L1 norm of the sparse representation matrix, and the matrix correlation error based on the sparse representation matrix and the pairwise constraint matrix. The first update formula is used when updating the sparse representation matrix. Perform, and Set each diagonal element to 0 for each do-not-connect constraint. ,Will and Set all to 0; The second update formula is used when updating the pairwise constraint matrix. Perform, and Set each diagonal element to 0 for each do-not-connect constraint. ,Will and Set all to 0 for each mandatory connection constraint. , less than the threshold and Set as a threshold, and set W Set it to the average of itself and its transpose; For a sparse representation matrix, For pairwise constraint matrices, For image sample data matrix, for medium sample These are the weighting coefficients for the reconstruction error of the image sample data in the objective function. The weighting coefficients are the L1 norms of the sparse representation matrix in the objective function. These are the weighting coefficients for matrix correlation errors in the objective function. This represents element-wise multiplication. This indicates element-wise division.
2. The semi-supervised image clustering method based on adaptive graph learning according to claim 1, characterized in that, The propagation consistency error is The image sample data reconstruction error is The matrix correlation error is , This represents the Frobenius norm of the matrix.
3. The semi-supervised image clustering method based on adaptive graph learning according to claim 1, characterized in that, The specific steps for iteratively updating the sparse representation matrix and the pairwise constraint matrix until the value of the objective function remains unchanged or the maximum number of iterations is reached include, in sequence: S1, Initialization W and S Each element is a random number within the range (0, 1); S2, updated by the first update formula S ; make each , , n The number of samples in the image sample data; , For each do-not-connect constraint Sample subscripts; S3, Updated by the second update formula W ; make each , ;make ;make , For each mandatory connection constraint Sample subscripts, The set threshold; S4 Initialize matrix D =0; S5、 , ; S6、 ; S7. Calculate the value of the objective function. If there is no change, end the iteration. Otherwise, check if the number of iterations has reached the maximum. If the number of iterations has reached the maximum, end the iteration. Otherwise, return to step S2 for the next round of iteration.
4. A semi-supervised image clustering system based on adaptive graph learning, characterized in that, include: The pairwise sample constraint propagation module is used to iteratively update the sparse representation matrix and the pairwise constraint matrix until the value of the objective function remains unchanged or the maximum number of iterations is reached. The clustering module is used to call the spectral clustering algorithm with the updated pairwise constraint matrix as input to divide the image sample data into several sample groups and complete the clustering output. The objective function is a weighted sum of the propagation consistency error based on the sparse representation matrix and the pairwise constraint matrix, the image sample data reconstruction error based on the sparse representation matrix, the L1 norm of the sparse representation matrix, and the matrix correlation error based on the sparse representation matrix and the pairwise constraint matrix. The first update formula is used when updating the sparse representation matrix. Perform, and Set each diagonal element to 0 for each do-not-connect constraint. ,Will and Set all to 0; The second update formula is used when updating the pairwise constraint matrix. Perform, and Set each diagonal element to 0 for each do-not-connect constraint. ,Will and Set all to 0 for each mandatory connection constraint. , less than the threshold and Set as a threshold, and set W Set it to the average of itself and its transpose; For a sparse representation matrix, For pairwise constraint matrices, For image sample data matrix, for medium sample These are the weighting coefficients for the reconstruction error of the image sample data in the objective function. The weighting coefficients are the L1 norms of the sparse representation matrix in the objective function. These are the weighting coefficients for matrix correlation errors in the objective function. This represents element-wise multiplication. This indicates element-wise division.
5. A semi-supervised image clustering system based on adaptive graph learning according to claim 4, characterized in that, The propagation consistency error is The image sample data reconstruction error is The matrix correlation error is , This represents the Frobenius norm of the matrix.
6. A computer storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the semi-supervised image clustering method based on adaptive graph learning as described in any one of claims 1 to 3.
7. A computer program product, characterized in that, When the computer program is executed by the processor, it implements the semi-supervised image clustering method based on adaptive graph learning as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Image clustering method based on sparse orthogonal bigraph non-negative matrix factorization
CN107341510A
MRI reconstruction method based on structure group vectorization learning and logarithm ratio constraint
CN116703764A