Face image clustering method, device, equipment and storage medium

By introducing the non-negative matrix factorization method of high-order graph structure, the problem of traditional NMF clustering method's inability to capture complex similarities in face image data is solved, and more efficient clustering effect and scalability are achieved.

CN120495710BActive Publication Date: 2025-09-30湖南工商大学
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510983771.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-17
Publication Date
2025-09-30
Estimated Expiration
2045-07-17

AI Technical Summary

Technical Problem

Traditional non-negative matrix factorization (NMF) clustering methods have difficulty capturing complex high-order similarities in face image data, resulting in poor clustering results.

Method used

A high-order graph structure is introduced. By constructing a high-order similarity matrix and graph constraints, the update formulas of the basis matrix and the representation matrix are optimized. The low-dimensional data representation matrix is ​​obtained by iterative updating, and the k-means clustering algorithm is used for clustering.

Benefits of technology

The performance of face image clustering has been improved, which can better capture the multi-level similarities between data and improve clustering effect and scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120495710B_ABST
    Figure CN120495710B_ABST
Patent Text Reader

Abstract

The present application provides a facial image clustering method, apparatus, device and storage medium. It relates to the field of image processing technology. The method includes: inputting the required clustering data, which is a high-order graph regular non-negative matrix; calculating and constructing a high-order similarity matrix; constructing a high-order graph constraint; defining and initializing the basis matrices and representation matrices of each layer of the high-order graph regular non-negative matrix decomposition; obtaining the update formulas of the basis matrices and representation matrices of each layer of the high-order graph regular non-negative matrix decomposition; updating the basis matrices and representation matrices of each layer of the high-order graph regular non-negative matrix decomposition; obtaining a low-dimensional representation matrix; and outputting the clustering results. The present application is aimed at facial image data with complex similarities, and can capture more levels of similarity information, thereby improving clustering performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a face image clustering method, apparatus, device and storage medium. Background Art

[0002] Non-negative matrix factorization (NMF) is a classic dimensionality reduction and data representation technique widely used in fields such as image processing, text analysis, and recommender systems. In many practical applications, complex relationships between data cannot be described solely through first-order proximity relationships. Therefore, graph-based clustering methods have emerged. However, traditional NMF clustering methods primarily rely on low-order graph structures to capture similarities between data, tending to overlook more complex higher-order structures, resulting in poor clustering results. In particular, given the complex similarities between facial image data, improving clustering performance (i.e., improving facial image recognition accuracy) when applying non-negative matrix factorization to facial image clustering is a pressing technical challenge. Summary of the Invention

[0003] The present application provides a facial image clustering method, apparatus, device and storage medium, which enhances the expression of relationships between data by introducing a high-order graph structure, thereby improving the clustering effect. In particular, for facial image data with complex similarities, it can capture more levels of similarity information, thereby improving clustering performance.

[0004] In a first aspect, the present application provides a face image clustering method, comprising:

[0005] Get the image data to be clustered , in, is a set of non-negative real numbers with dimension m and number of samples n, 、 and Represents the first, second and n images;

[0006] Calculating and constructing a high-order similarity matrix based on the image data to be clustered;

[0007] Constructing a high-order graph constraint based on the high-order similarity matrix;

[0008] Determining and initializing a basis matrix and a representation matrix for decomposing the image data to be clustered;

[0009] Determining update formulas for the basis matrix and the representation matrix based on the high-order graph constraint, the basis matrix, and the representation matrix;

[0010] Based on a preset number of iterations, the base matrix and the representation matrix are iteratively updated using the update formulas of the base matrix and the representation matrix, and the updating is stopped when the number of iterative updates reaches the preset number of iterations, thereby obtaining a low-dimensional data representation matrix; wherein the low-dimensional data representation matrix is ​​the representation matrix updated when the number of iterative updates reaches the preset number of iterations;

[0011] Clustering is performed on the low-dimensional data representation matrix to obtain a clustering result.

[0012] In one possible design, based on the image data to be clustered, a high-order similarity matrix is ​​calculated and constructed, including:

[0013] Based on the image data to be clustered, a first-order similarity matrix is ​​constructed using the following formula:

[0014] ;

[0015] Where, and Node and nodes The feature vector of each node corresponds to an image in the image data to be clustered. To control the smoothness parameter of the heat kernel function, e is a natural constant, Representation node and nodes The first-order similarity matrix of

[0016] Based on the first-order similarity matrix, the second-order similarity matrix is ​​constructed by the following formula:

[0017] ;

[0018] Where, is the second-order similarity matrix, is the first-order similarity matrix, is the matrix transpose;

[0019] Based on the first-order similarity matrix and the second-order similarity matrix, a high-order similarity matrix is ​​constructed using the following formula:

[0020] ;

[0021] Where, is a high-order similarity matrix.

[0022] In a possible design, based on the high-order similarity matrix, the constructed high-order graph constraint is expressed as:

[0023] ;

[0024] Where, , represents the graph Laplacian matrix, is the degree matrix, is a high-order similarity matrix, To represent the matrix, is the matrix transpose, Tr is the matrix trace operation, i For the corner mark, j For the corner mark, is the i-th column of matrix V, is the jth column of V, is the value of the jth element in the i-th row of matrix W, is the square of the Euclidean distance between the i-th column of V and the j-th column of V.

[0025] In one possible design, based on the high-order graph constraints, the basis matrix and the representation matrix, an update formula for the basis matrix and the representation matrix is ​​determined:

[0026] Determine the objective function of the decomposition of the image data to be clustered, expressed as:

[0027] ;

[0028] Where, is the basis matrix; is the representation matrix; is the regularization parameter; is the graph Laplacian matrix, , is the degree matrix, is the high-order graph similarity matrix; is the matrix transpose; is the minimum function; Tr is the matrix trace operation; is the proposed objective equation; is a constraint condition;

[0029] The objective function is expanded to obtain an expanded objective function; wherein the expanded objective function is expressed as:

[0030] ;

[0031] Determine a first Lagrangian function based on the expanded objective function and the second Lagrangian function ;

[0032] Update the basis matrix U The first Lagrangian function is introduced , using the first Lagrangian function Basis matrix UFind the partial derivatives and use the Carlo-Kuhn-Tucker condition to obtain the update formula of the basis matrix;

[0033] Update the representation matrix V The second Lagrangian function is introduced , using the second Lagrangian function The partial derivative of the representation matrix V is obtained, and the update formula of the representation matrix is ​​obtained using the Carlo-Kuhn-Tucker condition.

[0034] In one possible design, the first Lagrangian function Expressed as:

[0035] ;

[0036] Where, is the Lagrange multiplier;

[0037] Update the basis matrix U The first Lagrangian function is introduced , using the first Lagrangian function Basis matrix U Find the partial derivatives and use the Carlo-Kuhn-Tucker conditions to obtain the update formula of the basis matrix, including:

[0038] Using the first Lagrangian function Basis matrix U Taking partial derivatives we get:

[0039] ;

[0040] Where, is the partial derivative symbol; the matrix The value of row i and column k of ; is a matrix The value of row i and column k of ;

[0041] The update formula of the basis matrix is ​​obtained using the Carlo-Kuhn-Tucker condition, which is expressed as:

[0042] ;

[0043] Where, is a matrix The value of row i and column k of is element-wise multiplication, is a matrix The value of row i and column k of is a matrix The value of row i and column k of .

[0044] In one possible design, the second Lagrangian function Expressed as:

[0045] ;

[0046] Where, is the second Lagrange multiplier;

[0047] Update the representation matrix V The second Lagrangian function is introduced , using the second Lagrangian function Calculate the partial derivative of the representation matrix V and use the Carlo-Kuhn-Tucker condition to obtain the update formula of the representation matrix, including:

[0048] Using the second Lagrangian function Taking partial derivatives of the representation matrix V yields:

[0049] ;

[0050] Where, is a matrix The value of row i and column k of ; is a matrix The value of row i and column k of ;

[0051] The update formula of the representation matrix is ​​obtained using the Carlo-Kuhn-Tucker condition, which is expressed as:

[0052] ;

[0053] Where, is a matrix The value of row i and column k of is a matrix The value of row j and column k of is a matrix The value of row j and column k of .

[0054] In a possible design, a k-means clustering algorithm is used to cluster the low-dimensional data representation matrix to obtain a clustering result.

[0055] In a second aspect, the present application provides a facial image clustering device, the device comprising:

[0056] A data acquisition module configured to acquire image data to be clustered , ;in, is a set of non-negative real numbers with dimension m and number of samples n, 、 and Represents the first, second and n images;

[0057] a matrix construction module, configured to calculate and construct a high-order graph regular non-negative matrix based on the image data to be clustered;

[0058] A constraint construction module is configured to construct a high-order graph constraint based on the high-order graph regular non-negative matrix;

[0059] A matrix decomposition module is configured to determine and initialize a basis matrix and a representation matrix for the high-order graph regularized non-negative matrix factorization;

[0060] An update formula determination module is configured to determine an update formula of the base matrix and the representation matrix based on the high-order graph constraint, the base matrix and the representation matrix;

[0061] an iterative update module, configured to iteratively update the base matrix and the representation matrix based on a preset number of iterations using an update formula for the base matrix and the representation matrix, and stop updating when the number of iterative updates reaches a preset number of iterations, thereby obtaining a low-dimensional data representation matrix; wherein the low-dimensional data representation matrix is ​​the representation matrix updated when the number of iterative updates reaches the preset number of iterations;

[0062] The clustering module is configured to cluster the low-dimensional data representation matrix to obtain a clustering result.

[0063] In a third aspect, an embodiment of the present application provides an electronic device comprising: at least one processor and a memory; the memory stores computer-executable instructions; the at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the face image clustering method described in the first aspect and various possible designs of the first aspect.

[0064] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer-executable instructions. When a processor executes the computer-executable instructions, the face image clustering method described in the first aspect and various possible designs of the first aspect is implemented.

[0065] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the facial image clustering method described in the first aspect and various possible designs of the first aspect.

[0066] The face image clustering method, apparatus, device, and storage medium provided in this application have at least the following beneficial effects:

[0067] 1) This application introduces high-order graph regularization to effectively capture complex similarity relationships between data, and is particularly suitable for complex datasets with multi-level similarity.

[0068] 2) Compared with the traditional NMF method, this application can better reveal the intrinsic structure of the data and improve the clustering effect by considering high-order neighbor relationships;

[0069] 3) This application can be executed efficiently in high-dimensional data space, adapt to large-scale data sets, and has good scalability. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0071] Figure 1 A structural diagram of a face image clustering system provided in an embodiment of the present application;

[0072] Figure 2 The process of the face image clustering method provided in the embodiment of the present application Figure 1 ;

[0073] Figure 3 The process of the face image clustering method provided in the embodiment of the present application Figure 2 ;

[0074] Figure 4 A flowchart of calculating and constructing a high-order similarity matrix provided in an embodiment of the present application;

[0075] Figure 5 A flowchart of determining a basis matrix and an update formula for a representation matrix provided in an embodiment of the present application;

[0076] Figure 6 This is a structural diagram of the face image clustering device provided in an embodiment of the present application.

[0077] The above drawings illustrate specific embodiments of the present application, which will be described in more detail below. These drawings and the textual description are not intended to limit the scope of the present application in any way, but rather to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments. DETAILED DESCRIPTION

[0078] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0079] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data or user data involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0080] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned. They should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0081] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0082] An embodiment of the present application provides a facial image clustering method for clustering analysis of facial images. By constructing a high-order similarity matrix to better preserve the geometric structure of high-dimensional data points in low-dimensional space, the problem of missing information in high-dimensional data clustering is solved.

[0083] The embodiment of the present application provides an exemplary application scenario. Specifically, during a social activity, a large number of photos are taken, and it is now necessary to classify the photos by person. For example, among the large number of photos, there are four people, A, B, C, and D. Photos containing any one of A, B, C, and D are grouped into one category. Based on the above requirements, the embodiment of the present application provides a face image clustering system, such as Figure 1 As shown, the system includes an image acquisition device 101 and a processing terminal 102 that are signal-connected, wherein the image acquisition device 101 stores image data to be clustered, and the image data to be clustered may be acquired by the image acquisition device 101. For example, the image data to be clustered may be photos taken by a photographer using the image acquisition device 101 at a certain social event. The image acquisition device 101 may be a device with a shooting function, such as a camera or a mobile phone. The processing terminal 102 may be a device with a data processing function, such as a computer, a mobile phone, or a tablet computer. The processing terminal 102 obtains the image data to be clustered from the image acquisition device 101. The processing terminal 102 may be configured with a computer program and execute a facial image clustering method to achieve facial image clustering.

[0084] like Figure 2 The process of the face image clustering method provided by the embodiment of the present application is shown as follows: Figure 1 , the processing terminal 102 is configured to perform the following steps S201-S209.

[0085] S201: Obtain image data to be clustered and regularization parameters And the number of clusters K. The number of clusters K is input by the user according to actual conditions. For example, in the application scenario of the above example, K=4.

[0086] S202: Calculate and construct a high-order similarity matrix;

[0087] S203: Construct high-order graph constraints;

[0088] S204: Define and initialize a base matrix and a representation matrix, wherein the base matrix and the representation matrix may be randomly initialized and / or generated by SVD decomposition based on the image data to be clustered.

[0089] S205: Obtain the maximum number of iterations maxIter.

[0090] S206: Update the basis matrix and the representation matrix at the tth iteration. The update formulas of the basis matrix and the representation matrix can be derived based on the objective function of the non-negative matrix factorization of high-order graph regularization.

[0091] S207: Determine whether the number of iterations t reaches the maximum iteration value maxIter. If so, execute S208. Otherwise, increase the number of iterations t by 1 and execute step S206.

[0092] S208: Output a low-dimensional data representation matrix, where the low-dimensional data representation matrix is ​​an updated representation matrix when the number of iterations t reaches the maximum iteration value maxIter.

[0093] S209: Perform K-means clustering on the final representation matrix and output the clustering result.

[0094] It should be noted that the application scenarios listed above are merely examples, and do not mean that the method proposed in this application must be applied to the above application scenarios. In other implementation methods, the method proposed in this application can also be applied to other application scenarios. For example, it can be applied to album management to automatically organize photos uploaded by users, classify different photos of the same person into the same album, or help users quickly find historical photos of specific people. It can be applied to surveillance video analysis to extract faces from surveillance videos and cluster and track the activity trajectories of specific people (such as suspects or missing persons). It can be applied to access control systems to automatically identify employees, students, or residents, and classify and record entry and exit information. It can be applied to personalized recommendations. When users upload photos of trying on makeup or wearing clothes, the user group characteristics are identified through clustering, and products of similar styles are recommended.

[0095] like Figure 3 The process of the face image clustering method provided by the embodiment of the present application is shown as follows: Figure 2, the face image clustering method includes the following steps S301-S307.

[0096] S301: Acquire image data to be clustered.

[0097] In this embodiment, the image data to be clustered is represented as , ;in, is a set of non-negative real numbers with dimension m and number of samples n, 、 and Represents the first, second and n images; Is a high-order graph regular non-negative matrix. In the subsequent steps, the high-order graph regular non-negative matrix (i.e., the image data to be clustered) will be decomposed, and clustering will be performed based on the low-dimensional data representation matrix obtained by the decomposition.

[0098] For example, the image data to be clustered can be obtained by preprocessing the original facial image data (e.g., JPEG files). The preprocessing includes normalization, vectorization, and denoising. Normalization unifies the image size and resolution, vectorization converts each image into a column vector, and combines them into a data matrix. Denoising uses existing filtering algorithms to process the data matrix to eliminate interference factors such as lighting and occlusion, ultimately obtaining the image data to be clustered.

[0099] S302: Calculate and construct a high-order similarity matrix based on the image data to be clustered.

[0100] The high-order similarity matrix generated in step S302 of this embodiment can more comprehensively describe the local and global structures of the facial data, and is superior to the traditional pairwise similarity.

[0101] In the graph structure, the second-order proximity relationship between nodes i and j is the similarity of their neighborhood graph structures. Based on the above definition, in the graph , where M is the node set, is the first-order similarity matrix, and the second-order similarity matrix is ​​defined as In this embodiment, it can be regarded as a learned adaptive neighborhood graph (similarity matrix). Finally, a high-order similarity matrix is ​​defined to combine the first-order and second-order neighborhood graphs.

[0102] Based on the above principles, in some embodiments, such as Figure 4 As shown in FIG, based on the image data to be clustered, the process of calculating and constructing a high-order similarity matrix includes the following steps:

[0103] S401: Constructing a first-order similarity matrix based on the image data to be clustered.

[0104] In this embodiment, based on the image data to be clustered, a first-order similarity matrix is ​​constructed using the following formula:

[0105] ;

[0106] Where, and Node and nodes The feature vector of each node corresponds to an image in the image data to be clustered. To control the smoothness parameter of the heat kernel function, e is a natural constant, Representation node and nodes The first-order similarity matrix of

[0107] S402: Construct a second-order similarity matrix based on the first-order similarity matrix.

[0108] In this embodiment, based on the first-order similarity matrix, a second-order similarity matrix is ​​constructed using the following formula:

[0109] ;

[0110] Where, is the second-order similarity matrix, is the first-order similarity matrix, is the matrix transpose;

[0111] S403: Constructing a high-order similarity matrix based on the first-order similarity matrix and the second-order similarity matrix.

[0112] In this embodiment, based on the first-order similarity matrix and the second-order similarity matrix, a high-order similarity matrix is ​​constructed using the following formula:

[0113] ;

[0114] Where, is a high-order similarity matrix.

[0115] The high-order graph similarity matrix constructed through steps S410-S430 not only includes the first-order adjacency relationship, but also integrates the information of the second-order neighborhood, making the clustering result of the data more accurate and comprehensive.

[0116] S303: Constructing high-order graph constraints based on the high-order similarity matrix.

[0117] In this embodiment, the high-order graph constraint may be a graph regularization term, which is also called a manifold regularization term, and its purpose is to maintain the local geometric structure of the data.

[0118] In some embodiments, based on the high-order similarity matrix, the constructed high-order graph constraint is expressed as:

[0119] ;

[0120] Where, , represents the graph Laplacian matrix, is the degree matrix, is a high-order similarity matrix, To represent the matrix, is the matrix transpose, Tr is the matrix trace operation, i For the corner mark, j For the corner mark, is the i-th column of matrix V, is the jth column of V, is the value of the jth element in the i-th row of matrix W, is the square of the Euclidean distance between the i-th column of V and the j-th column of V.

[0121] S304: Determine and initialize a basis matrix and a representation matrix for decomposing the image data to be clustered.

[0122] In this embodiment, the purpose of step S304 is to provide a starting point for iterative optimization and ensure that the decomposition process converges to a meaningful solution.

[0123] S305: Based on the high-order graph constraints, the basis matrix and the representation matrix, determining update formulas for the basis matrix and the representation matrix.

[0124] In some embodiments, as Figure 5 As shown, based on the high-order graph constraints, the basis matrix and the representation matrix, the process of determining the update formula of the basis matrix and the representation matrix includes the following steps:

[0125] S501: Determine the objective function of decomposing the image data to be clustered.

[0126] In this embodiment, the objective function is expressed as:

[0127] ;

[0128] Where, is the basis matrix; is the representation matrix; is the regularization parameter; is the graph Laplacian matrix, , is the degree matrix, is the high-order graph similarity matrix; is the matrix transpose; is the minimum function; Tr is the matrix trace operation; is the proposed objective equation; is a constraint condition;

[0129] S502: Expand the objective function to obtain an expanded objective function.

[0130] In this embodiment, the expansion target is expressed as:

[0131] ;

[0132] S503: Determine the first Lagrangian function based on the expanded objective function and the second Lagrangian function .

[0133] S504: Update basis matrix U The first Lagrangian function is introduced , using the first Lagrangian function Basis matrix U Find the partial derivatives and use the Carlo-Kuhn-Tucker conditions to obtain the update formula for the basis matrix.

[0134] In some embodiments, the first Lagrangian function Expressed as:

[0135] ;

[0136] Where, is the Lagrange multiplier;

[0137] Using the first Lagrangian function Basis matrix U Taking partial derivatives we get:

[0138] ;

[0139] Where, is the symbol of partial derivative; for The value of row i and column k of ; is a matrix The value of row i and column k of ;

[0140] The update formula of the basis matrix is ​​obtained using the Carlo-Kuhn-Tucker condition, which is expressed as:

[0141] ;

[0142] Where, is a matrix The value of row i and column k of is element-wise multiplication, is a matrix The value of row i and column k of is a matrix The value of row i and column k of .

[0143] S505: Update the representation matrix V The second Lagrangian function is introduced , using the second Lagrangian function The partial derivative of the representation matrix V is obtained, and the update formula of the representation matrix is ​​obtained using the Carlo-Kuhn-Tucker condition.

[0144] In some embodiments, the second Lagrangian function Expressed as:

[0145] ;

[0146] Where, is the second Lagrange multiplier;

[0147] Update the representation matrix V The second Lagrangian function is introduced , using the second Lagrangian function Calculate the partial derivative of the representation matrix V and use the Carlo-Kuhn-Tucker condition to obtain the update formula of the representation matrix, including:

[0148] Using the second Lagrangian function Taking partial derivatives of the representation matrix V yields:

[0149] ;

[0150] Where, is a matrix The value of row i and column k of ; is a matrix The value of row i and column k of ;

[0151] The update formula of the representation matrix is ​​obtained using the Carlo-Kuhn-Tucker condition, which is expressed as:

[0152] ;

[0153] Where, is a matrix The value of row i and column k of is a matrix The value of row j and column k of is a matrix The value of row j and column k of .

[0154] S306: Based on a preset number of iterations, the base matrix and the representation matrix are iteratively updated using the update formulas of the base matrix and the representation matrix, and the updating is stopped when the number of iterative updates reaches the preset number of iterations to obtain a low-dimensional data representation matrix; wherein the low-dimensional data representation matrix is ​​the representation matrix updated when the number of iterative updates reaches the preset number of iterations.

[0155] S307: Clustering the low-dimensional data representation matrix to obtain a clustering result.

[0156] In some embodiments, a k-means clustering algorithm is used to cluster the low-dimensional data representation matrix to obtain a clustering result.

[0157] The embodiment of the present application also provides a face image clustering device, such as Figure 6 As shown, the face image clustering device includes:

[0158] Data acquisition module 601 is configured to acquire image data to be clustered , in, is a set of non-negative real numbers with dimension m and number of samples n, 、 and Represents the first, second and n images;

[0159] A matrix construction module 602 is configured to calculate and construct a high-order graph regular non-negative matrix based on the image data to be clustered;

[0160] A constraint construction module 603 is configured to construct a high-order graph constraint based on the high-order graph regular non-negative matrix;

[0161] A matrix decomposition module 604 is configured to determine and initialize a basis matrix and a representation matrix for the high-order graph-regularized non-negative matrix factorization;

[0162] An update formula determination module 605 is configured to determine an update formula of the base matrix and the representation matrix based on the high-order graph constraint, the base matrix and the representation matrix;

[0163] The iterative update module 606 is configured to iteratively update the base matrix and the representation matrix based on a preset number of iterations using the update formulas of the base matrix and the representation matrix, and stop updating when the number of iterative updates reaches the preset number of iterations to obtain a low-dimensional data representation matrix; wherein the low-dimensional data representation matrix is ​​the representation matrix updated when the number of iterative updates reaches the preset number of iterations;

[0164] The clustering module 607 is configured to cluster the low-dimensional data representation matrix to obtain a clustering result.

[0165] In some embodiments, the matrix building module is further configured to:

[0166] Based on the image data to be clustered, a first-order similarity matrix is ​​constructed using the following formula:

[0167] ;

[0168] Where, and Node and nodes The feature vector of each node corresponds to an image in the image data to be clustered. To control the smoothness parameter of the heat kernel function, e is a natural constant, Representation node and nodes The first-order similarity matrix of

[0169] Based on the first-order similarity matrix, the second-order similarity matrix is ​​constructed by the following formula:

[0170] ;

[0171] Where, is the second-order similarity matrix, is the first-order similarity matrix, is the matrix transpose;

[0172] Based on the first-order similarity matrix and the second-order similarity matrix, a high-order similarity matrix is ​​constructed using the following formula:

[0173] ;

[0174] Where, is a high-order similarity matrix.

[0175] In some embodiments, the constraint building module is further configured to:

[0176] ;

[0177] Where, , represents the graph Laplacian matrix, is the degree matrix, is a high-order similarity matrix, To represent the matrix, is the matrix transpose, Tr is the matrix trace operation, i For the corner mark, j For the corner mark, is the i-th column of matrix V, is the jth column of V, is the value of the jth element in the i-th row of matrix W, is the square of the Euclidean distance between the i-th column of V and the j-th column of V.

[0178] In some embodiments, the update formula determination module is further configured to:

[0179] Determine the objective function of the decomposition of the image data to be clustered, expressed as:

[0180] ;

[0181] Where, is the basis matrix; is the representation matrix; is the regularization parameter; is the graph Laplacian matrix, , is the degree matrix, is the high-order graph similarity matrix; is the matrix transpose; is the minimum function; Tr is the matrix trace operation; is the proposed objective equation; is a constraint condition;

[0182] The objective function is expanded to obtain an expanded objective function; wherein the expanded objective function is expressed as:

[0183] ;

[0184] Determine a first Lagrangian function based on the expanded objective function and the second Lagrangian function ;

[0185] Update the basis matrix U The first Lagrangian function is introduced , using the first Lagrangian function Basis matrix U Find the partial derivatives and use the Carlo-Kuhn-Tucker condition to obtain the update formula of the basis matrix;

[0186] Update the representation matrix V The second Lagrangian function is introduced , using the second Lagrangian function The partial derivative of the representation matrix V is obtained, and the update formula of the representation matrix is ​​obtained using the Carlo-Kuhn-Tucker condition.

[0187] In some embodiments, the first Lagrangian function Expressed as:

[0188] ;

[0189] Where, is the Lagrange multiplier;

[0190] The update formula determination module is further configured to:

[0191] Using the first Lagrangian function Basis matrix U Taking partial derivatives we get:

[0192] ;

[0193] Where, is the symbol of partial derivative; for The value of row i and column k of ; is a matrix The value of row i and column k of ;

[0194] The update formula of the basis matrix is ​​obtained using the Carlo-Kuhn-Tucker condition, which is expressed as:

[0195] ;

[0196] Where, is a matrix The value of row i and column k of is element-wise multiplication, is a matrix The value of row i and column k of is a matrix The value of row i and column k of .

[0197] In some embodiments, the second Lagrangian function Expressed as:

[0198] ;

[0199] Where, is the second Lagrange multiplier;

[0200] The update formula determination module is further configured to:

[0201] Using the second Lagrangian function Taking partial derivatives of the representation matrix V yields:

[0202] ;

[0203] Where, is a matrix The value of row i and column k of ; is a matrix The value of row i and column k of ;

[0204] The update formula of the representation matrix is ​​obtained using the Carlo-Kuhn-Tucker condition, which is expressed as:

[0205] ;

[0206] Where, is a matrix The value of row i and column k of is a matrix The value of row j and column k of is a matrix The value of row j and column k of .

[0207] In some embodiments, the clustering module is further configured to cluster the low-dimensional data representation matrix using a k-means clustering algorithm to obtain a clustering result.

[0208] An embodiment of the present application provides an electronic device, which may include a processor and a memory, wherein the processor and the memory can communicate with each other; illustratively, the processor and the memory communicate with each other via a communication bus.

[0209] The processor executes the computer-executable instructions stored in the memory, so that the processor implements the solutions in the above embodiments. The processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0210] The communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. System buses can be categorized as address buses, data buses, and control buses. Transceivers facilitate communication between the database access device and other computers (e.g., clients, read-write libraries, and read-only libraries). Memory may include random access memory (RAM) or non-volatile memory.

[0211] The electronic device provided in the embodiment of the present application may be the terminal device of the above embodiment.

[0212] An embodiment of the present application further provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes the technical solution of the face image clustering method of the above embodiment.

[0213] An embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium, and when at least one processor executes the computer program, it can implement the technical solution of the face image clustering method in the above embodiment.

[0214] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or module, which can be electrical, mechanical or other forms.

[0215] Modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of these modules may be selected to implement the solution of this embodiment based on actual needs.

[0216] In addition, the functional modules in the various embodiments of the present application may be integrated into a single processing unit, or each module may exist physically separately, or two or more modules may be integrated into a single unit. The above-mentioned modules may be implemented in the form of hardware or hardware plus software functional units.

[0217] The integrated modules implemented in the form of software function modules can be stored in a computer-readable storage medium. The software function modules stored in a storage medium include a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute some of the steps of the methods of various embodiments of the present application.

[0218] It should be understood that the processor described above may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present invention may be directly executed by a hardware processor or by a combination of hardware and software modules within the processor.

[0219] The memory may include a high-speed RAM memory, and may also include non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk.

[0220] A bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be divided into address buses, data buses, and control buses.

[0221] The storage medium may be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0222] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic control unit or a main control device.

[0223] Those skilled in the art will appreciate that all or part of the steps in the above-described method embodiments can be implemented using hardware associated with program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0224] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some or all of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A face image clustering method, characterized in that: The method comprises: Get the image data to be clustered X=[x1,x2,…x n ];in, is a set of non-negative real numbers with dimension m and number of samples n, x1, x2 and x n Represents the first, second and nth images in the image data to be clustered; Based on the image data to be clustered, a high-order similarity matrix is ​​calculated and constructed; wherein the high-order similarity matrix is ​​constructed by a first-order similarity matrix and a second-order similarity matrix, the first-order similarity matrix is ​​constructed based on the image data to be clustered, and the second-order similarity matrix is ​​constructed based on the first-order similarity matrix; Constructing a high-order graph constraint based on the high-order similarity matrix; Determining and initializing a basis matrix and a representation matrix for decomposing the image data to be clustered; Determining update formulas for the basis matrix and the representation matrix based on the high-order graph constraint, the basis matrix, and the representation matrix; Based on a preset number of iterations, the base matrix and the representation matrix are iteratively updated using the update formulas of the base matrix and the representation matrix, and the updating is stopped when the number of iterative updates reaches the preset number of iterations, thereby obtaining a low-dimensional data representation matrix; wherein the low-dimensional data representation matrix is ​​the representation matrix updated when the number of iterative updates reaches the preset number of iterations; Clustering is performed on the low-dimensional data representation matrix to obtain a clustering result.

2. The face image clustering method according to claim 1, characterized in that: Based on the image data to be clustered, a high-order similarity matrix is ​​calculated and constructed, including: Based on the image data to be clustered, a first-order similarity matrix is ​​constructed using the following formula: Where x j and x l are the feature vectors of node j and node l respectively. Each node corresponds to an image in the image data to be clustered. δ is the smoothness parameter controlling the heat kernel function. e is a natural constant. Represents the first-order similarity matrix between node j and node l; Based on the first-order similarity matrix, the second-order similarity matrix is ​​constructed by the following formula: A [2] =(A [1] ) T A [1] Where A [2] is the second-order similarity matrix, A [1] is the first-order similarity matrix, T is the matrix transpose; Based on the first-order similarity matrix and the second-order similarity matrix, a high-order similarity matrix is ​​constructed using the following formula: W=A [1] +A [2] Where W is the high-order similarity matrix.

3. The face image clustering method according to claim 1, characterized in that: Based on the high-order similarity matrix, the constructed high-order graph constraint is expressed as: Where L = DW, represents the graph Laplacian matrix, D is the degree matrix, W is the high-order similarity matrix, V is the representation matrix, T is the matrix transpose, Tr is the matrix trace operation, i is the subscript, j is the subscript, and v is the i is the i-th column of matrix V, v j is the jth column of V, W ij is the value of the jth element in the i-th row of matrix W, is the square of the Euclidean distance between the i-th column of V and the j-th column of V.

4. The face image clustering method according to claim 1, characterized in that: Based on the high-order graph constraints, the basis matrix and the representation matrix, the update formulas of the basis matrix and the representation matrix are determined: Determine the objective function of the decomposition of the image data to be clustered, expressed as: st U≥0,V≥0 Where U is the basis matrix; V is the representation matrix; λ is the regularization parameter; L is the graph Laplacian matrix, L = DW, D is the degree matrix, and W is the high-order graph similarity matrix; T is the matrix transpose; min is the minimum function; Tr is the matrix trace operation; O NMF-HG is the proposed objective equation; st is the constraint condition; The objective function is expanded to obtain an expanded objective function; wherein the expanded objective function is expressed as: O NMF-HG =Tr((X-UV T ) T (X-UV T ))+λTr(V T LV)=Tr(X T X) -2Tr(XVU T )+Tr(UV T VU T )+λTr(V T LV) Determine a first Lagrangian function Γ1 and a second Lagrangian function Γ2 based on the expanded objective function; When updating the basis matrix U, the first Lagrangian function Γ1 is introduced, the partial derivative of the basis matrix U is obtained using the first Lagrangian function Γ1, and the update formula of the basis matrix is ​​obtained using the Carlo-Kuhn-Tucker condition; When updating the representation matrix V, a second Lagrangian function Γ2 is introduced, the partial derivative of the representation matrix V is obtained using the second Lagrangian function Γ2, and the update formula of the representation matrix is ​​obtained using the Carlo-Kuhn-Tucker condition.

5. The face image clustering method according to claim 4, characterized in that: The first Lagrangian function Γ1 is expressed as: Γ1=-2Tr(XVU T )+Tr(UV T UV T )+Tr[θ1U T ] Where θ1 is the Lagrange multiplier; When updating the basis matrix U, the first Lagrangian function Γ1 is introduced, the partial derivative of the basis matrix U is obtained using the first Lagrangian function Γ1, and the update formula of the basis matrix is ​​obtained using the Carlo-Kuhn-Tucker condition, including: Using the first Lagrangian function Γ1 to find the partial derivative of the basis matrix U, we can get: Where, is the symbol of partial derivative; [-2XV+2UV T V+θ1] ik For the matrix [-2XV+2UV T The value of the i-th row and k-th column of V+θ1]; is a matrix The value of row i and column k of ; The update formula of the basis matrix is ​​obtained using the Carlo-Kuhn-Tucker condition, which is expressed as: Where u ik is the value of the i-th row and k-th column of matrix U, ⊙ is element-by-element multiplication, (XV) ik is the value of the i-th row and k-th column of the matrix XV, (UV T V) ik is the matrix UV T The value of V in row i and column k.

6. The facial image clustering method according to claim 4, characterized in that: The second Lagrangian function Γ2 is expressed as: Γ2=-2Tr(XVU T )+Tr(UV T VU T )+λTr(V T LV)+Tr[θ2V T ] Where θ2 is the second Lagrange multiplier; When updating the representation matrix V, a second Lagrangian function Γ2 is introduced, the partial derivative of the representation matrix V is obtained using the second Lagrangian function Γ2, and the update formula of the representation matrix is ​​obtained using the Carlo-Kuhn-Tucker condition, including: Using the second Lagrangian function Γ2 to find the partial derivative of the matrix V, we can get: Where, is a matrix The value of row i and column k; [2X T U+2VU T U+2λLV+θ2] ik For the matrix [2X T U+2VU T The value of the i-th row and k-th column of U+2λLV+θ2]; The update formula of the representation matrix is ​​obtained using the Carlo-Kuhn-Tucker condition, which is expressed as: Where, v jk is the value of the jth row and kth column of the matrix V, (X T U+λWV) jk is the matrix X T The value of row j and column k of U+λWV, (VU T U+λDV) jk Matrix VU T The value of the jth row and kth column of U+λDV, ⊙ is the element-by-element multiplication.

7. The face image clustering method according to claim 1, characterized in that: The low-dimensional data representation matrix is ​​clustered using a k-means clustering algorithm to obtain a clustering result.

8. A facial image clustering device, characterized in that: The device comprises: A data acquisition module configured to acquire image data to be clustered X=[x1,x2,…x n ];in, is a set of non-negative real numbers with dimension m and number of samples n, x1, x2 and x n Represents the first, second and nth images in the image data to be clustered; a matrix construction module, configured to calculate and construct a high-order graph regular non-negative matrix based on the image data to be clustered; A constraint construction module is configured to construct a high-order graph constraint based on the high-order graph regular non-negative matrix; A matrix decomposition module is configured to determine and initialize a basis matrix and a representation matrix for the high-order graph regularized non-negative matrix factorization; An update formula determination module is configured to determine an update formula of the base matrix and the representation matrix based on the high-order graph constraint, the base matrix and the representation matrix; an iterative update module, configured to iteratively update the base matrix and the representation matrix based on a preset number of iterations using an update formula for the base matrix and the representation matrix, and stop updating when the number of iterative updates reaches a preset number of iterations, thereby obtaining a low-dimensional data representation matrix; wherein the low-dimensional data representation matrix is ​​the representation matrix updated when the number of iterative updates reaches the preset number of iterations; The clustering module is configured to cluster the low-dimensional data representation matrix to obtain a clustering result.

9. An electronic device, characterized in that: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the face image clustering method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the face image clustering method according to any one of claims 1 to 7.