Face image clustering method
By introducing a dual infographic structure, adaptive loss function and KNN assisted clustering algorithm into the face recognition image clustering model, the adaptive multi-view clustering model is constructed, which solves the problem of poor clustering effect when the spatial distribution of image data is uneven, and achieves higher accuracy and purity.
Patent Information
- Application Number
- CN202411770865.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-28
AI Technical Summary
The existing unsupervised face recognition image clustering model needs to be improved in the case of uneven spatial distribution of image data.
By introducing a dual infographic structure, an adaptive loss function and an auxiliary clustering algorithm based on KNN, an adaptive multi-view face image clustering model based on non-negative matrix decomposition is constructed to improve the clustering effect.
The accuracy and purity index of image data under uneven spatial distribution are improved, and the robustness and performance of clustering models are enhanced.
Smart Images

Figure BDA0005170239530000038 
Figure BDA0005170239530000041 
Figure BDA0005170239530000042
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of face recognition, in particular to a face image clustering model and method. Background Art
[0002] Face image clustering models are widely used in many fields. Existing face recognition image clustering models include: kmeans, NMF, HxNMF, GNMF, CHNMF, etc. Among them, kmeans is usually used for single-view image clustering, while NMF, HxNMF, GNMF and CHNMF can be used for multi-view image clustering.
[0003] Compared with face recognition image clustering models that require labeling, unsupervised face recognition image clustering models can reduce manual labeling costs, discover potential patterns, are suitable for large-scale data, and have higher flexibility and versatility when facing new data sets or application scenarios.
[0004] The NMF model is an unsupervised face recognition image clustering model based on non-negative matrix factorization technology. By introducing multi-view information, the effect of NMF in processing face recognition tasks is enhanced.
[0005] Existing similar unsupervised face recognition image clustering models such as the NMF model have the following shortcomings: the accuracy and purity indicators of image data when the spatial distribution is uneven need to be improved. Summary of the invention
[0006] The purpose of the present invention is to provide a face image clustering method, which improves the accuracy and purity index of image data in the case of uneven spatial distribution through a dual information graph structure, the introduction of an adaptive loss function and an auxiliary clustering algorithm based on KNN.
[0007] To achieve the above object, the present invention provides a face image clustering method, which is performed by an adaptive multi-view face image clustering model based on non-negative matrix decomposition, and is performed in the following steps:
[0008] The first step is data preprocessing;
[0009] The face image data to be clustered is called a multi-view data sample. The multi-view data sample includes n a views, each view includes n image data; the multi-view data samples are stored as n column vectors. a data matrices, each of which is represented by (·) (j) represents the jth perspective;
[0010] The second step is density segmentation;
[0011] Segment the multi-view data samples at each view, calculate the average distance from the sample to its neighboring samples, determine the potential cluster center based on this, and define the seed set at each view;
[0012] The third step is to detect outliers. For each viewpoint, find the cluster center in the seed set, generate an increasing set sequence until convergence, select the cluster center and perform preliminary clustering, and detect outliers at each viewpoint.
[0013] The fourth step is to calculate the cluster centrality and deviation. For each perspective, each outlier of the perspective is assigned to the cluster closest to it. Each cluster and the outlier assigned to the cluster are called a complete cluster. The centrality and deviation are calculated for each complete cluster.
[0014] The fifth step is dimensionality conversion. For each perspective, the center and deviation after dimensionality conversion are calculated as the basis for the loss function parameters.
[0015] The sixth step is to construct a dual information graph. For each perspective, the edge weight function is constructed using k-nearest neighbor information of different scales as the basis for the graph regularization term weight matrix.
[0016] The seventh step is model construction; construct an adaptive multi-view face image clustering model based on non-negative matrix decomposition; use Kmeans to initialize the data matrix at each view to obtain B and F at each view, where B is the base matrix and F is the label matrix;
[0017] The eighth step is to optimize the solution: use the Lagrange multiplier method to cyclically solve the adaptive multi-view face image clustering model based on non-negative matrix decomposition constructed in the sixth step until the solution of the model is obtained after convergence; at the same time, the final label matrix F is obtained * , for F * The clustering result obtained by performing Kmeans clustering again is the final clustering result of the multi-view data.
[0018] The second step is specifically:
[0019] First, the data represented by the vector at each perspective j is divided according to density and divided into parts and record them as
[0020] Secondly, for a specific perspective, each sample is calculated in each segmented part The average distance to its nearest a samples is recorded as For each segmented part, calculate the average value of all samples and record it as For a given Will satisfy The samples are regarded as potential cluster centers and are represented as Seed. j And define the seed set under viewpoint j as The default value of a is 10.
[0021] The third step is: (j) In accordance with Find the center of the first cluster;
[0022] according to Generate an increasing set sequence, where Rnei1(c1)=knn(a,c1)∪c1,i≥1, until the set sequence converges, that is, Rnei i (c1) = Rnei i+1 (c1), denoted as D1 and then according to Select the next cluster center, SEED2 is defined as SEED-D1, and repeat this process to preliminarily cluster all samples of this perspective and detect the outlier set O among them. The default value of k is 10.
[0023] The fourth step is specifically:
[0024] For each C j , first set its initial cluster label, let E j =C j ∩D,G j =C j ∩O; and in accordance with and Calculate the centrality d1(C j ) and deviation d2(C j ),in Indicates that it contains Cluster D j , cen(·) represents the cluster center calculated using the L2 norm.
[0025] The fifth step is specifically:
[0026] Calculate the center degree θ after dimension conversion j =d1(C j )·ρ, and calculate the deviation θ after dimension conversion j =d2(C j )·ρ, where
[0027] According to the converted centrality and deviation, let the rule in the initialization loss function be σ i =θ i and Then let the loss function parameter update rule be as follows;
[0028]
[0029] K is the number of classes in the specified cluster, r(·) is the rank of the matrix, n cj and n dj They are E j and G j The number of elements in .
[0030] The sixth step is to construct the dual information graph Laplace matrix, which is: satisfy where w -ij =2-Hg i (Y ij )-Hg j (Y ji ), w +ij =Hf i (Y ij )+Hf j (Y ji ), Hg i (Y ij ) and Hf i (Y ij ) are edge weight functions used to extract data domain information and discriminant information, respectively, and are defined as:
[0031]
[0032] The default value of k is 15, and the default value of k2 is 0.25n.
[0033] The adaptive multi-view face image clustering model based on non-negative matrix decomposition constructed in the seventh step is specifically:
[0034]
[0035] in ls i (z i ) is the loss function, expressed as:
[0036]
[0037] The default values of γ1, α0, and β0 are 0.4, 10, respectively. -3 ,10.
[0038] In the eighth step, the iterative rule obtained by the Lagrange multiplier method is:
[0039]
[0040] , where 11 is a matrix whose elements are all 1.
[0041] The present invention has the following advantages:
[0042] 1. Adaptive loss function: MARDNMF (i.e., adaptive multi-view face image clustering model based on non-negative matrix decomposition) introduces a set of two related entropy functions and The loss function ls i (z i ), these loss functions can be adjusted according to different samples through step 7 to automatically adjust the parameters of the loss function ls i (z i ) in the form of.
[0043] Each loss function contains two data adaptation parameters σ i and η i , these parameters can effectively control the characteristics of the correlation function when the data space is unevenly distributed, thereby affecting the fidelity and robustness of the loss function. By automatically adjusting these parameters in step 7, MARDNMF is able to optimize performance based on the outliers in the dataset.
[0044] 2. New dual information graph structure: This method proposes a new dual information graph regularized Laplace matrix Able to simultaneously utilize the nearest neighbor manifold information and discriminative manifold information Hg in the data i (Y ij ) and Hf i (Y ij ); By calculating multiple K nearest neighbor (KNN) elements for each sample and using different edge weight strategy functions to construct edge weights, MARDNMF can reflect the geometric information of the data more complexly and accurately.
[0045] 3. Auxiliary clustering algorithm based on KNN (K nearest neighbor algorithm): MARDNMF also includes an auxiliary algorithm (embodied in the third step), which is based on KNN and can effectively detect outliers in the data and perform initial clustering. This algorithm can work without the need to predefine the number of clusters and is effective even when the sample distribution is uneven. Its main goal is to promote adaptive parameter adjustment in the set of loss functions.
[0046] In summary, the present invention does not require a predefined number of clusters, can perform unsupervised learning, and can make the loss function include two data adaptive parameters through the second to fifth steps. Combined with the novel dual-information graph structure and the auxiliary clustering algorithm, a face image clustering method with optimal robustness and best performance is obtained, which can improve the robustness, accuracy and purity of the clustering algorithm when processing complex data structures related to face images (i.e., spatially unevenly distributed and contaminated data). DETAILED DESCRIPTION
[0047] The present invention discloses a face image clustering method, which is performed by an adaptive multi-view face image clustering model based on non-negative matrix decomposition, and the steps are as follows:
[0048] The first step is data preprocessing;
[0049] The face image data to be clustered is called a multi-view data sample. The multi-view data sample includes n a views, each view includes n image data; the multi-view data samples are stored as n column vectors. a data matrices, each of which is represented by (·) (j) represents the jth perspective;
[0050] The second step is density segmentation;
[0051] The multi-view data samples at each view are segmented, and the average distance from the sample to its neighboring samples is calculated. Based on this, the potential cluster center is determined, and a seed set is defined at each view; one view corresponds to one seed set.
[0052] The third step is to detect outliers. For each perspective, find the cluster center in the seed set, generate an increasing set of columns until convergence, select the cluster center and perform preliminary clustering to detect outliers at each perspective. Each perspective will have multiple cluster centers.
[0053] The fourth step is to calculate the cluster centrality and deviation. For each perspective, each outlier of the perspective is assigned to the cluster closest to it (under Euclidean distance). Each cluster and the outlier assigned to the cluster are called a complete cluster. The centrality and deviation are calculated for each complete cluster.
[0054] The fifth step is dimensionality conversion. For each perspective, the center and deviation after dimensionality conversion are calculated as the basis for the loss function parameters.
[0055] The sixth step is to construct a dual information graph. For each perspective, the edge weight function is constructed using k-nearest neighbor information of different scales as the basis for the graph regularization term weight matrix.
[0056] The seventh step is model construction; construct an adaptive multi-view face image clustering model based on non-negative matrix decomposition (MARDNMF for short); use Kmeans to cluster the data matrix under each view (the n columns stored as column vectors in the first step) a data matrix) to obtain B and F at each perspective, where B is the basis matrix and F is the label matrix;
[0057] The eighth step is to optimize the solution: use the Lagrange multiplier method to cyclically solve the adaptive multi-view face image clustering model based on non-negative matrix decomposition constructed in the sixth step until the solution of the model is obtained after convergence; at the same time, the final label matrix F is obtained * , for F * The clustering result obtained by performing Kmeans clustering again is the final clustering result of the multi-view data.
[0058] The second step is specifically:
[0059] First, the data represented by the vector at each perspective j is divided according to density and divided into parts and record them as
[0060] Secondly, for a specific perspective, each sample is calculated in each segmented part The average distance to its nearest a samples is recorded as For each segmented part, calculate all its samples The average value is recorded as For a given Will satisfy The samples are regarded as potential cluster centers and are represented as Seed. j And define the seed set under viewpoint j as The default value of a is 10.
[0061] The third step is: (j) In accordance with Find the center of the first cluster;
[0062] according to Generate an increasing set sequence, where Rnei1(c1)=knn(a,c1)∪c1,i≥1, until the set sequence converges, that is, Rnei i (c1) = Rnei i+1 (c1), denoted as D1 and then according to Select the next cluster center, SEED2 is defined as SEED-D1, and repeat this process to preliminarily cluster all samples of this perspective and detect the outlier set O among them. The default value of k is 10.
[0063] The fourth step is specifically:
[0064] For each C j , first set its initial cluster label, let E j =C j ∩D,G j =C j ∩O; and in accordance with and Calculate the centrality d1(C j ) and deviation d2(C j ),in Indicates that it contains Cluster D j , cen(·) represents the cluster center calculated using the L2 norm.
[0065] The fifth step is specifically:
[0066] Calculate the center degree θ after dimension conversion j =d1(C j )·ρ, and calculate the deviation θ after dimension conversion j =d2(C j )·ρ, where
[0067] According to the converted centrality and deviation, let the rule in the initialization loss function be σ i =θ i and Then let the loss function parameter update rule be as follows;
[0068]
[0069] K is the number of classes in the specified cluster, r(·) is the rank of the matrix, n cj and n dj They are E j and G j The number of elements in .
[0070] The sixth step is to construct the dual information graph Laplace matrix, which is: satisfy where w -ij =2-Hg i (Y ij )-Hg j (Y ji ), w +ij =Hf i (Y ij )+Hf j (Y ji ), Hg i (Y ij ) and Hf i (Y ij ) are edge weight functions used to extract data domain information and discriminant information, respectively, and are defined as:
[0071]
[0072] The default value of k is 15, and the default value of k2 is 0.25n.
[0073] The adaptive multi-view face image clustering model based on non-negative matrix decomposition constructed in the seventh step is specifically:
[0074]
[0075] in ls i (z i ) is the loss function, expressed as:
[0076]
[0077] The default values of γ1, α0, and β0 are 0.4, 10, respectively. -3 ,10.
[0078] In the eighth step, the iterative rule obtained by the Lagrange multiplier method is:
[0079]
[0080]
[0081] , where 11 is a matrix whose elements are all 1.
[0082] The MARDNMF model and method of the present invention are adopted to carry out face image clustering experiments using the ORLF dataset, the JAFFE dataset and the YALE dataset respectively, and the performances of Kmeans, NMF, HxNMF, GNMF and CHNMF when processing the same datasets are compared, and Tables 1 to 3 are obtained.
[0083] Table 1 shows the clustering experimental results of various models on the ORLF dataset with different block sizes.
[0084] Table 1
[0085] EXPERIMENTAL RESULTS ON ORL DATASET WITH DIFFERENT SIZE OF BLOCK
[0086]
[0087] It can be seen from Table 1 that:
[0088] 1. In terms of accuracy (ACC). Under the condition of no interference (0×0), the MARDNMF model has the highest accuracy of 70.58%, which is significantly higher than other models. Under the condition of interference (10×10), the accuracy of the MARDNMF model has decreased, but it is still higher than other models, showing good robustness.
[0089] 2. In terms of normalized mutual information (NMI). Under the condition of no interference (0×0), the MARDNMF model has the highest NMI value of 84.28%, indicating that its clustering results are more consistent with the true labels. Under the condition of interference (10×10), the MARDNMF model still has the highest NMI value, showing that the MARDNMF model can still maintain a high clustering quality when interference exists.
[0090] 3. In terms of purity (PUR). Under the condition of no interference (0×0), the purity of the MARDNMF model is the highest, which is 72.53%, indicating that the purity of each cluster in its clustering results is higher. Under the condition of interference (10×10), the purity of the MARDNMF model has decreased, but it is still higher than other models, showing that it can still maintain a high clustering purity under interference conditions.
[0091] Table 2 shows the clustering experimental results of various models on the JAFFE dataset with different block sizes.
[0092] Table 2
[0093] EXPERIMENTAL RESULTS ON JAFFE DATASET WITH DIFFERENT SIZE OF BLOCK
[0094]
[0095] It can be seen from Table 2 that:
[0096] 1. In terms of accuracy (ACC). Under the condition of no interference (0×0), the MARDNMF model has the highest accuracy of 88.92%, which is significantly higher than other models. Under the condition of interference (10×10), the accuracy of the MARDNMF model has decreased, but it is still higher than other models, showing good robustness.
[0097] 2. In terms of normalized mutual information (NMI). Under the condition of no interference (0×0), the MARDNMF model has the highest NMI value of 88.61%, indicating that its clustering results are more consistent with the true labels. Under the condition of interference (10×10), the MARDNMF model still has the highest NMI value, showing that the MARDNMF model can still maintain a high clustering quality when interference exists.
[0098] 3. In terms of purity (PUR). Under the condition of no interference (0×0), the purity of the MARDNMF model is the highest, which is 89.32%, indicating that the purity of each cluster in its clustering results is higher. Under the condition of interference (10×10), the purity of the MARDNMF model has decreased, but it is still higher than other models, showing that it can still maintain a high clustering purity under interference conditions.
[0099] Table 3 shows the clustering experiment results of various models on the YALE dataset with different block sizes. This table shows the performance comparison of different clustering models under two different interference conditions on the YALE dataset.
[0100] Table 3
[0101] EXPERIMENTAL RESULTS ON YALE DATASET WITH DIFFERENT SIZE OF BLOCK
[0102]
[0103] It can be seen from Table 3 that:
[0104] 1. In terms of accuracy (ACC). Under the condition of no interference (0×0), the MARDNMF model has the highest accuracy of 58.05%, which is significantly higher than other models. Under the condition of interference (10×10), the accuracy of the MARDNMF model has decreased, but it is still higher than other models, showing good robustness.
[0105] 2. In terms of normalized mutual information (NMI). Under the condition of no interference (0×0), the MARDNMF model has the highest NMI value of 61.71%, indicating that its clustering results are more consistent with the true labels. Under the condition of interference (10×10), the MARDNMF model still has the highest NMI value, showing that the MARDNMF model can still maintain a high clustering quality when interference exists.
[0106] 3. In terms of purity (PUR). Under the condition of no interference (0×0), the MARDNMF model has the highest purity of 59.40%, indicating that the purity of each cluster in its clustering results is higher. Under the condition of interference (10×10), the purity of the MARDNMF model has decreased, but it is still higher than other models, showing that it can still maintain a high clustering purity under interference conditions.
[0107] It can be seen from Tables 1 to 3 that on different face data sets, the clustering method using the MARDNMF model in the present invention has relatively the best accuracy, relatively the best normalized mutual information performance, and relatively the best purity performance.
[0108] The above embodiments are only used to illustrate rather than limit the technical solutions of the present invention. Although the present invention is described in detail with reference to the above embodiments, those skilled in the art should understand that the present invention can still be modified or replaced by equivalents. Any modification or partial replacement that does not depart from the spirit and scope of the present invention should be included in the scope of the claims of the present invention.
Claims
1. A face image clustering method, which is performed by an adaptive multi-view face image clustering model based on non-negative matrix decomposition, characterized in that Follow these steps: The first step is data preprocessing; The face image data to be clustered is called a multi-view data sample. The multi-view data sample includes n a views, each view includes n image data; The multi-view data samples are stored as column vectors as n a data matrices, each of which is represented by (·) (j) represents the jth perspective; The second step is density segmentation; Segment the multi-view data samples at each view, calculate the average distance from the sample to its neighboring samples, determine the potential cluster center based on this, and define the seed set at each view; The third step is to detect outliers. For each viewpoint, find the cluster center in the seed set, generate an increasing set sequence until convergence, select the cluster center and perform preliminary clustering, and detect outliers at each viewpoint. The fourth step is to calculate the cluster centrality and deviation. For each perspective, each outlier of the perspective is assigned to the cluster closest to it. Each cluster and the outlier assigned to the cluster are called a complete cluster. The centrality and deviation are calculated for each complete cluster. The fifth step is dimensionality conversion. For each perspective, the center and deviation after dimensionality conversion are calculated as the basis for the loss function parameters. The sixth step is to construct a dual information graph. For each perspective, the edge weight function is constructed using k-nearest neighbor information of different scales as the basis for the graph regularization term weight matrix. The seventh step is model construction; construct an adaptive multi-view face image clustering model based on non-negative matrix decomposition; use Kmeans to initialize the data matrix at each view to obtain B and F at each view, where B is the base matrix and F is the label matrix; The eighth step is to optimize the solution: use the Lagrange multiplier method to cyclically solve the adaptive multi-view face image clustering model based on non-negative matrix decomposition constructed in the sixth step until the solution of the model is obtained after convergence; at the same time, the final label matrix F is obtained * , for F * The clustering result obtained by performing Kmeans clustering again is the final clustering result of the multi-view data.
2. A facial image clustering method according to claim 1, characterized in that: The second step is specifically: First, the data represented by the vector at each perspective j is divided according to density and divided into parts and record them as Secondly, for a specific perspective, each sample is calculated in each segmented part The average distance to its nearest a samples is recorded as For each segmented part, the average value of all samples is calculated and recorded as For a given Will satisfy The samples of are regarded as potential cluster centers and are represented as Seed. j And define the seed set under viewpoint j as The default value of a is 10.
3. A facial image clustering method according to claim 2, characterized in that: The third step is: (j) In accordance with Find the center of the first cluster; according to Generate an increasing set sequence, where Rnei1(c1)=knn(a,c1)∪c1,i≥1, until the set sequence converges, that is, Rnei i (c1) = Rnei i+1 (c1), denoted as D1 and then according to Select the next cluster center, SEED2 is defined as SEED-D1, and repeat this process to preliminarily cluster all samples of this perspective and detect the outlier set O among them. The default value of k is 10.
4. A facial image clustering method according to claim 3, characterized in that: The fourth step is as follows: for each C j , first set its initial cluster label, let E j =C j ∩D,G j =C j ∩O; and in accordance with and Calculate the centrality d1(C j ) and deviation d2(C j ),in Indicates that it contains Cluster D j , cen(·) represents the cluster center calculated using the L2 norm.
5. A facial image clustering method according to claim 4, characterized in that: The fifth step is to calculate the center degree θ after dimension conversion j =d1(C j )·ρ, and calculate the deviation θ after dimension conversion j =d2(C j )·ρ, where According to the converted centrality and deviation, let the rule in the initialization loss function be σ i =θ i and Then let the loss function parameter update rule be as follows; K is the number of classes in the specified cluster, r(·) is the rank of the matrix, n cj and n dj They are E j and G j The number of elements in .
6. A facial image clustering method according to claim 5, characterized in that: The sixth step is to construct the dual information graph Laplace matrix, which is: satisfy where w -ij =2-Hg i (Y ij )-Hg j (Y ji ), w +ij =Hf i (Y ij )+Hf j (Y ji ), Hg i (Y ij ) and Hf i (Y ij ) are edge weight functions used to extract data domain information and discriminant information, respectively, and are defined as: The default value of k is 15, and the default value of k2 is 0.25n.
7. A facial image clustering method according to claim 6, characterized in that: The adaptive multi-view face image clustering model based on non-negative matrix decomposition constructed in the seventh step is specifically: in ls i (z i ) is the loss function, expressed as: The default values of γ1, α0, and β0 are 0.4, 10, respectively. -3 ,10.
8. A facial image clustering method according to claim 7, characterized in that: In the eighth step, the iterative rule obtained by the Lagrange multiplier method is: , Where 11 is a matrix whose elements are all 1.