Face age classification method based on semi-supervised clustering disambiguation partial mark learning
Through the semi-supervised clustering disambiguation partial marking learning method, combined with one-to-one decomposition and stack-oriented binary classifier, the problem of insufficient marking data in facial age classification is solved, and classification accuracy and generalization ability are improved.
Patent Information
- Application Number
- CN202510477983.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-07-25
AI Technical Summary
In the prior art, when the marking data quality is insufficient, the feature space and marking space are insufficient, resulting in insufficient classification accuracy and generalization ability.
Using a method based on semi-supervised clustering disambiguation partial marker learning, a one-to-one decomposition and stack-oriented binary classifier is combined with semi-supervised clustering technology, real age markers are identified using the structural information of candidate markers and feature spaces, multi-classification data sets are generated and binary classifier training is performed, and age classification is finally determined through the majority voting method.
It improves the accuracy and generalization ability of facial age classification, solves the problem of insufficient utilization of marker space and feature space, and improves the classification performance of the model.
Smart Images

Figure CN120375445A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of machine learning, and particularly to a facial age classification method based on semi-supervised clustering disambiguation partial label learning. Background Art
[0002] Partial label learning is an important weakly supervised learning method in the field of machine learning. Its feature space refers to the set composed of the attribute vectors of samples. By analyzing the features of samples in the feature space, the similarities and differences between samples can be mined, which can provide a basis for subsequent classification or clustering tasks. The label space is the set composed of the candidate labels of samples. Each object is associated with a set of candidate labels in the output space, and this set of candidate labels constitutes the label space. Different from the label space in traditional supervised learning, the label space of partial label learning has uncertainty and ambiguity. Because each sample has multiple candidate labels, but only one of them is the true label, the labels in the label space are not completely determined and unique. In partial label learning, the insufficient utilization of the feature space and the label space is a very important problem. For example, the insufficient utilization of the feature space caused by noise influence and unutilized potential information, or the insufficient utilization of the label space caused by the hiding of the true label and the lack of utilization of the potentially useful information in the feature space during the disambiguation process. The key of the existing disambiguation-based partial label learning methods lies in identifying the true label hidden in the candidate label set of each sample, trying to identify the true label from the candidate label set, and then solving the partial label problem by learning a multi-class classifier. However, the disambiguation steps of such methods often introduce noise into the label information.
[0003] Semi-supervised clustering is a clustering method that integrates labeled data and unlabeled data. Its goal is to use the information of labeled data to improve the clustering performance during the clustering process. The quality and quantity of unlabeled data have a significant impact on the clustering result. If the quality of unlabeled data is not high or the quantity is insufficient, it will lead to a decline in the model performance. By using a large amount of unlabeled data, semi-supervised clustering algorithms can improve the clustering performance under limited labeled data, especially in the case of scarce labeled data.
[0004] Facial age classification has a wide range of applications in many fields such as identity authentication, personalized services, advertising targeting, demographic analysis, and security monitoring. In real life, it is difficult to determine the specific facial age of each facial image. The resolution, quality, and brightness of the face image, as well as the occlusion caused by glasses, hair, and hats on the face, will all affect the judgment of facial age classification. At this time, a candidate label set regarding age classification can be assigned to each facial image, so that semi-supervised learning can be used to identify the true age classification label from the candidate label set of the classified facial image data. However, in practice, some facial image data has no age classification label, or has errors in the label, and the complexity of the data itself causes the model to be unable to fully utilize the information of all data during the training process, affecting the classification performance and reducing the classification accuracy. Therefore, how to use semi-supervised clustering technology combined with semi-supervised learning to find the only correct age classification in the age candidate label set of facial images is an important challenge when the quality of the labeled data is insufficient. Summary of the Invention
[0005] The purpose of the present invention is to provide a facial age classification method based on semi-supervised clustering disambiguation semi-supervised learning, which comprehensively considers the advantages of the two frameworks of semi-supervised learning and semi-supervised clustering learning, and solves the problem of insufficient utilization of the feature space and label space in current semi-supervised learning.
[0006] To achieve the above purpose, the present invention provides the following solutions:
[0007] A facial age classification method based on semi-supervised clustering disambiguation semi-supervised learning, including:
[0008] Obtain the face facial image to be detected;
[0009] Input the face facial image to be detected into a one-to-one decomposition binary classifier to obtain an augmented feature vector, and input the augmented feature vector into a stacked binary classifier to obtain the class label with the highest confidence and output it as the age classification prediction. Among them, the one-to-one decomposition binary classifier is trained through a binary classification data set, the binary classification data set is obtained by clustering disambiguation of the face facial image semi-supervised training set, the stacked classifier is trained through a new binary classification data set, and the new binary classification data set is obtained by stacking the prediction results of the one-to-one decomposition binary classifier.
[0010] Optionally, obtaining the binary classification data set by clustering disambiguation of the face facial image semi-supervised training set includes:
[0011] S1. Obtain the candidate label set in the partial label training set of the face facial image, calculate the average value of each class sample in the candidate label set, and obtain the cluster center of each class, where the candidate label set consists of a labeled age classification set and a true age classification;
[0012] S2. Calculate the distance between the samples in the partial label training set of the face facial image and the cluster center, assign the samples to the clusters with the closest distance corresponding to each label in the candidate label set, obtain a new cluster assignment, update the cluster center, and repeat S2 until convergence;
[0013] S3. After iterative convergence, the partial label training set is converted into a multi-classification data set;
[0014] S4. Convert the multi-classification data set into a binary classification data set through one-to-one decomposition.
[0015] Optionally, calculating the distance between the samples in the partial label training set of the face facial image and the cluster center includes:
[0016] According to the preset clustering constraint conditions, if the j-th class is not in the age candidate label set of the sample, the distance is set to infinity. If the j-th class is not in the age candidate label set of the sample, the distance is ||x i -u j ||2, where x i is the i-th face facial image training sample, and μ j is the cluster center of the j-th class, where the clustering constraint conditions are: the candidate label sets of two partial label training samples have no intersection, and the samples of partial label training belong to one class in the candidate labels.
[0017] Optionally, updating the cluster center is:
[0018]
[0019] where μ j is the cluster center of the j-th class, m is the number of facial age samples in the training set, λ i is the cluster number of x i and x i is the i-th face facial image training sample.
[0020] Optionally, the multi-classification data set is:
[0021]
[0022] where D m is the multi-classification data set, y i is the age classification label obtained by clustering disambiguation, is the λ i -th age classification.
[0023] Optionally, the binary classification dataset is as follows:
[0024]
[0025] where ψ(y i , c k , c l ) is defined as follows:
[0026]
[0027] where c k , c l are two classes or clusters, that is, any two of the four age classifications, is the binary classification dataset, y i is the age classification label obtained by clustering disambiguation.
[0028] Optionally, the new binary classification dataset is as follows:
[0029]
[0030]
[0031] where c j is the j-th class, is the prediction result, S i is the candidate label set of the i-th sample, is the augmented feature vector, is the output of the binary classifier for the one-to-one decomposition of the j-th class and the q-th class, is the new binary classification dataset.
[0032] The beneficial effects of the present invention are as follows: The present invention regards facial age classification as a partial label learning problem and applies semi-supervised clustering technology thereto. The weak supervision information in the candidate label set of the partial label data and the inherent structural information in the feature space are effectively fused together through the semi-supervised clustering framework, integrating the effective information contained in the feature space and the label space, solving the problem of insufficient utilization of the feature space and the label space when using partial label learning for facial image classification, transforming the label recognition process into a semi-supervised clustering problem, greatly improving the accuracy of facial age classification, and also improving the clustering result and the generalization ability of partial label learning. Description of the Drawings
[0033] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required in the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0034] Figure 1 It is a flowchart of a facial age classification method based on semi-supervised clustering disambiguation partial label learning according to an embodiment of the present invention. Specific embodiments
[0035] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0036] This embodiment provides a facial age classification method based on semi-supervised clustering disambiguation partial label learning, including:
[0037] Obtain a face facial image to be detected;
[0038] Input the face facial image to be detected into a one-to-one decomposed binary classifier to obtain an augmented feature vector, and input the augmented feature vector into a stacked binary classifier to obtain the class label with the highest confidence and output it as the age classification prediction. Among them, the one-to-one decomposed binary classifier is trained through a binary classification dataset, the binary classification dataset is obtained by clustering disambiguation of the partial label training set of the face facial image, the stacked classifier is trained through a new binary classification data, and the new binary classification dataset is obtained by stacking the prediction results of the one-to-one decomposed binary classifier.
[0039] Furthermore, obtaining the binary classification dataset by clustering disambiguation of the partial label training set of the face facial image includes:
[0040] S1. Obtain the candidate label set in the partial label training set of the face facial image, calculate the average value of each class sample in the candidate label set, and obtain the cluster center of each class. Among them, the candidate label set consists of a labeled age classification set and a true age classification;
[0041] S2. Calculate the distance between the samples in the partial label training set of the face facial image and the cluster center, and assign the samples to the clusters with the closest distance corresponding to each label in the candidate label set to obtain a new cluster assignment, update the cluster center, and repeat S2 until convergence;
[0042] S3. After iteration convergence, the partially labeled training set is converted into a multi-classification data set;
[0043] S4. The multi-classification data set is converted into a binary classification data set through one-to-one decomposition.
[0044] Furthermore, calculating the distance between the samples in the partially labeled training set of face images and the cluster centers includes:
[0045] According to the preset clustering constraint conditions, if the j-th class is not in the age candidate label set of the sample, the distance is set to infinity. If the j-th class is not in the age candidate label set of the sample, the distance is ||x i -u j ||2, where x i is the i-th training sample of the face image, and μ j is the cluster center of the j-th class, where the clustering constraint conditions are: the candidate label sets of two partially labeled training samples have no intersection, and the samples of the partially labeled training belong to one of the classes in the candidate labels.
[0046] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0047] This embodiment provides a face age classification method based on semi-supervised clustering disambiguation partial label learning, as Figure 1 shown, the method includes the following:
[0048] Given a partially labeled training set of face images, where the candidate label set of each face image consists of a labeled age classification set and a true age classification. Only some of the face images in this training set have true age classifications. Each class is a cluster. The classes are 4 age classification labels involved in the data set, including: children, youth, adults, and the elderly. Use clustering-based techniques to infer the true labels of each training sample, and the number of clusters is equal to the number of classes (denoted by q, q = 4).
[0049] Set two constraints for clustering. 1) If the candidate label sets of any two training samples have no intersection, then they must not belong to the same class. 2) Each training sample must belong to one of the classes in the candidate label set S.
[0050] Based on these two label constraints, this embodiment uses a specially improved constrained K-means algorithm for partial label data to perform label disambiguation, specifically including steps 1-4.
[0051] Step 1, initialize q cluster centers:
[0052] The initialization of q cluster centers μ j (1 ≤ j ≤ q) is as follows:
[0053]
[0054] If the following equation holds, return 1; otherwise, return 0. μ is the average value of the training samples in the candidate label set corresponding to the j-th class c j , m is the number of samples in the training set, c j is the j-th class, and S j is the candidate label set of the i-th sample. i
[0055] Step 2: Calculate the Euclidean distance between each sample x i and each cluster center, and assign it to the cluster with the closest distance in its candidate label set.
[0056] Each training sample of the face facial image is x i , let d ij represent the distance between x i and the j-th cluster center μ j . The distance is defined using the simple Euclidean distance as follows:
[0057]
[0058] dist(x i , u j ) = ||x i - u j ||²
[0059] According to the label constraint conditions mentioned above, if the j-th class c j is not in the age candidate label set S i of x i , then the distance d ij is set to infinity.
[0060] For each face image training sample x i , each cluster corresponds to a distance. Thus, a total of q = 4 distances are obtained. Then, x i is assigned to the cluster with the closest distance corresponding to each label in its candidate label set:
[0061]
[0062] λ i is the cluster number of x i . Due to the special distance defined above, c λi ∈S i holds, and c λi is the λ i -th class. Therefore, if the candidate label sets of any two training samples do not intersect, they will not be assigned to the same cluster. The clustering assignment rule in the above equation simultaneously satisfies the two clustering constraints mentioned.
[0063] Step 3, update the q cluster centers again.
[0064] Based on the newly obtained cluster assignments, the q cluster centers μ j (1 ≤ j ≤ q) can be updated as follows:
[0065]
[0066] The center of each cluster is updated by calculating the average of the facial image training samples assigned to that cluster.
[0067] Step 4, determine whether the clusters have converged.
[0068] If the clusters have not converged, repeat the class assignment process and iteratively execute Steps 2 and 3 until the cluster centers do not move, at which point the clusters have converged, and then execute Step 5.
[0069] When alternating execution converges, the label disambiguation process using clustering learning will end.
[0070] Step 5, generate the multi-class dataset D m .
[0071] After the label disambiguation process of clustering learning ends, the partially labeled dataset D containing some age classifications is converted into the following disambiguated multi-class dataset D m , D m Regard the final cluster assignment as the true class.
[0072]
[0073] where y j is the class label obtained by clustering disambiguation, and m is the number of facial age samples in the training set.
[0074] Step 6, convert the multi-class dataset D m to binary-class datasets Train binary classifiers based on these datasets and determine the prediction output by majority voting.
[0075] D m The labels obtained in D may contain noise, that is, errors may occur during the semi-supervised clustering disambiguation process. To improve the classification performance, the multi-class dataset D m can be converted to binary-class datasets by one-versus-one decomposition. Then train binary classifiers based on these datasets and determine the prediction output of any facial image example by majority voting.
[0076] For each pair of class labels (ck, cl), where 1 ≤ k < l ≤ q, the binary classification dataset is constructed as follows:
[0077]
[0078] where ψ(y i , c k , c l ) is defined as follows:
[0079]
[0080] where c k , c l are two classes or clusters, i.e., any two of the four age classifications. +1 indicates that the sample belongs to the target class c k , and -1 indicates that the sample belongs to the comparison class c l . y i is the age classification label obtained by clustering disambiguation.
[0081] Note that according to the constraint conditions, for the multi-class classification problem D m , the two conditions y i = c k and y i = c l cannot hold simultaneously. Through this one-to-one decomposition, a binary classifier can be trained for each pair of classes (c k , c l ), and then binary classifiers can be obtained. In this embodiment, there are 4 age classifications, i.e., q = 4, so 6 binary classification datasets can be obtained. Each binary classifier can be derived using any off-the-shelf binary classification algorithm B on . For example
[0082] Through binary classifiers, for any facial image example x, the multi-class prediction output can be determined by the majority voting method:
[0083]
[0084] where V OVO (x, c j ) represents the number of votes obtained by the j-th class c j :
[0085]
[0086] Step 7, stack the prediction outputs of Step 6 to obtain a new binary classification dataset Train q binary classifiers, and each classifier returns the prediction confidence of a class.
[0087] The above formula is feasible for the unseen face image example x * to make a final prediction. However, to further improve the performance of the classifier, in this embodiment, the prediction outputs of the one-versus-one decomposed binary classifiers are stacked. That is, for each class label, a new binary classification dataset can be constructed as follows:
[0088]
[0089] where and φ(y i , c j ) are defined as follows:
[0090]
[0091] is the augmented feature vector, which is formed by augmenting the original feature vector x i with the prediction outputs of q - 1 binary classifiers related to the j-th class in the one-versus-one decomposition. c j is the j-th class, where 1 ≤ j ≤ q. is the output of the binary classifier for the one-versus-one decomposition of the j-th class and the q-th class, corresponding to the prediction result of the multi-class classifier based on the one-versus-one decomposition. The binary classification label φ(y i , c j ) is determined according to the clustering result y i and the prediction result for the assignment of c j .
[0092] Therefore, the off-the-shelf binary classification algorithm B can be used to train the binary classifier on the binary classification dataset That is, After traversing all class labels, a total of q binary classifiers are obtained, and each classifier returns the prediction confidence of a class.
[0093] So far, the prediction model induction stage ends.
[0094] Step 8, use the class label with the highest confidence as the final prediction for the unseen example.
[0095] In the prediction model induction, a total of binary classifiers are obtained, including binary classifiers based on the one-versus-one decomposition (where 1 ≤ k < l ≤ q), and q stacked classifiers (where 1 ≤ j ≤ q).
[0096] During the testing phase, the unseen facial image instance x * , is first input into binary classifiers obtained by one-to-one decomposition training from a binary classification dataset (1 ≤ k < l ≤ q) to generate its augmented feature vectors.
[0097]
[0098] Then, the q augmented feature vectors are input into the corresponding stack-oriented binary classifiers (1 ≤ j ≤ q). The final multi-class prediction of x * can be determined from these stacked prediction outputs as follows:
[0099]
[0100] That is, the class label with the highest confidence is determined as the true age classification prediction of the final facial image, and a relatively accurate age classification of the facial image is finally obtained.
[0101] In the present invention, the semi-supervised clustering technique is not directly used for classification tasks, but as an auxiliary means to improve classification performance or handle specific problems.
[0102] The present invention regards the age classification of facial images as a partial-label learning problem, and applies the semi-supervised clustering technique thereto to solve the label disambiguation problem, greatly reducing the candidate label set of the training samples in the samples. By integrating the advantages of partial-label learning and semi-supervised clustering learning, the semi-supervised clustering algorithm is used to improve the clustering performance under limited labeled face image data, and the unlabeled facial image data is used to make up for the deficiency of the quality of the labeled data, solving the problem of insufficient utilization of the feature space and the label space in partial-label learning, and improving the classification accuracy of facial image age classification and the generalization ability of partial-label learning.
[0103] By comparing the present invention with six mature partial-label learning algorithms on the collected dataset, including six algorithms: CLPL, LSB-CMM, PL-SVM, PLECOC, PALOC, and SURE, it shows that the present invention has a higher classification accuracy on the partial-label dataset, achieving a better disambiguation purpose.
[0104] The embodiments described above are only descriptions of the preferred embodiments of the present invention, and do not limit the scope of the present invention. Without departing from the design spirit of the present invention, various deformations and improvements made by those of ordinary skill in the art to the technical solutions of the present invention shall fall within the protection scope determined by the claims of the present invention.
Claims
1. A facial age classification method based on semi-supervised clustering disambiguation partial label learning, characterized in that, Including: Obtain a face image to be detected; Input the face image to be detected into a one - to - one decomposed binary classifier to obtain an augmented feature vector, and input the augmented feature vector into a stacked binary classifier to obtain the class label with the highest confidence and output it as an age classification prediction. Among them, the one - to - one decomposed binary classifier is obtained by training with a binary classification dataset, the binary classification dataset is obtained by clustering and disambiguating a face image partial - label training set, the stacked classifier is obtained by training with a new binary classification dataset, and the new binary classification dataset is obtained by stacking the prediction results of the one - to - one decomposed binary classifier.
2. The facial age classification method based on semi-supervised clustering disambiguation partial label learning according to claim 1, wherein Obtaining the binary classification dataset by clustering and disambiguating the partial - label training set of the face image includes: S1. Obtain the candidate label set in the partial - label training set of the face image, calculate the average value of each class sample in the candidate label set, and obtain the cluster center of each class. Among them, the candidate label set consists of a labeled age classification set and a true age classification. S2. Calculate the distance between the samples in the partial - label training set of the face image and the cluster center, assign the samples to the clusters corresponding to the closest distance among the labels in the candidate label set to obtain a new cluster assignment, update the cluster center, and repeat S2 until convergence. S3. After iterative convergence, the partial - label training set is converted into a multi - classification dataset. S4. Convert the multi - classification dataset into a binary classification dataset through one - to - one decomposition.
3. A facial age classification method based on semi-supervised clustering disambiguation partial label learning according to claim 2, characterized in that, Calculating the distance between the samples in the partial - label training set of the face image and the cluster center includes: According to the preset clustering constraint conditions, if the j-th class is not in the age candidate label set of the sample, the distance is set to infinity. If the j-th class is not in the age candidate label set of the sample, the distance is ||x i -u j ||2, where x i is the training sample of the i-th face facial image, and μ j is the cluster center of the j-th class, where the clustering constraint conditions are: the candidate label sets of two partially labeled training samples have no intersection, and the samples of the partially labeled training belong to one of the candidate labels.
4. A facial age classification method based on semi-supervised clustering disambiguation partial label learning according to claim 2, characterized in that, Updating the cluster center to: where μj is the cluster center of class j, m is the number of facial age samples in the training set, λ i is the cluster number of xi, and xi is the i-th face image training sample.
5. A facial age classification method based on semi-supervised clustering disambiguation partial label learning according to claim 4, characterized in that The multi - classification dataset is: Among them, D m is a multi-classification dataset, and y i is the age classification label obtained by clustering disambiguation, is the λ i th age classification.
6. A facial age classification method based on semi-supervised clustering disambiguation partial label learning according to claim 5, characterized in that, The binary classification dataset is: where ψ(y i , c k , c l ) is defined as follows: Among them, c k , c l are two classes or clusters, that is, any two of the four age classifications, is a binary classification dataset.
7. A method for facial age classification based on semi-supervised clustering disambiguation partial label learning according to claim 6, characterized in that The new binary classification dataset is: where c j is the j-th class, is the prediction result, S i is the set of candidate labels for the i-th sample, is the augmented feature vector, is the output of the binary classifier for the one-versus-one decomposition of the j-th class and the q-th class, is the new binary classification dataset.