Constituency recognition method based on unlabeled face image
By employing an algorithm architecture that combines cross-domain reconstruction consistency and hierarchical optimal transmission constraints, this study utilizes unlabeled facial images for body constitution recognition, solving the challenge of utilizing unlabeled data and achieving efficient body constitution recognition and model generalization.
Patent Information
- Application Number
- CN202510354408.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2045-03-25
AI Technical Summary
Existing technologies struggle to effectively utilize unlabeled facial image data for physical fitness identification, and the lack of labeled samples results in high training costs and is time-consuming and labor-intensive.
An algorithm architecture with cross-domain reconstruction consistency and hierarchical optimal transmission constraints is adopted. The model is pre-trained using unlabeled facial images, and physical characteristics are identified through feature extraction and optimal transmission matching flow. The model's generalization ability is enhanced by combining self-attention and consistency constraints of reconstructed features.
It improves the utilization efficiency of unlabeled facial image data, reduces reliance on labeled data, and enhances the accuracy of physical constitution recognition and the generalization ability of the model.
Smart Images

Figure CN120411591B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, and more particularly to a constitution recognition method based on unlabeled facial images. BACKGROUND
[0002] In traditional Chinese medicine theory, constitution refers to the physiological and psychological characteristics of an individual formed under the joint action of genetic and environmental factors. According to the classification of traditional Chinese medicine constitution, humans can be divided into nine main constitution types, including balanced constitution, qi deficiency constitution, yang deficiency constitution, yin deficiency constitution, phlegm-damp constitution, damp-heat constitution, blood stasis constitution, qi stagnation constitution, and special constitution. These constitution types are closely related to the individual's health status and disease tendency.
[0003] Traditional methods judge the constitution type of an individual by observing their facial features such as expression, complexion, and macroscopic appearance, which relies heavily on the experience and subjective judgment of traditional Chinese medicine practitioners.
[0004] In recent years, the development of artificial intelligence, especially deep learning technology, has made it possible to automatically and objectively identify constitution types. Deep learning models can automatically extract features related to constitution types by learning a large number of facial image data and perform classification.
[0005] However, there is a major challenge in using deep learning for facial constitution recognition: training deep neural networks usually requires a large number of labeled facial images as training samples, and obtaining these labeled samples is not only costly but also time-consuming and labor-intensive.
[0006] Currently, although there are a large number of unlabeled facial image data, due to the lack of corresponding constitution type labels, these data are difficult to directly use for supervised learning. At the same time, the complexity of labeling work and the requirement for professional knowledge make it more difficult to collect a sufficient number of labeled samples.
[0007] Therefore, how to effectively use unlabeled facial image data for pre-training and then recognize constitution based on unlabeled facial images has become a problem that needs to be solved in current technology.
[0008] The above background section provides a technical background for the patent, explains the limitations of traditional methods, describes the challenges of existing technology, and outlines the main purpose and advantages of the solution proposed by the present application. When writing a patent document, ensure that the description is accurate, clear, and highlights the innovation. SUMMARY
[0009] In view of this, the present invention provides a method for physical constitution recognition based on unlabeled facial images. The aim is to design an algorithm architecture that satisfies the constraints of cross-domain reconstruction consistency and hierarchical optimal transmission, and to make full use of rich unlabeled data resources for model pre-training to achieve accurate facial physical constitution recognition, thereby reducing the dependence on labeled data and improving the generalization ability and recognition accuracy of the model.
[0010] To achieve the above objectives, the present invention adopts the following technical solution:
[0011] A method for physical constitution recognition based on unlabeled facial images involves acquiring unlabeled facial images and combining them with facial physical constitution data for recognition. The recognition steps include:
[0012] S1. Using unlabeled facial images as the source domain and facial body data as the target domain, feature extraction is performed to obtain source domain features and target domain features.
[0013] S2. Based on the category center feature vector of the source domain feature sample, determine the optimal transmission matching flow between the source domain feature sample and the target domain feature sample and the category center feature vector, respectively.
[0014] S3. Determine the classification probability of source domain feature samples based on the optimal transmission matching stream, and identify the physical constitution based on the classification probability.
[0015] Preferably, in step S2, the optimal transmission matching flow between the feature sample and the category center feature vector is determined according to the following formula;
[0016]
[0017] In the formula, Z represents the feature sample set, B represents the class center feature vector set, Distance(Z,B) represents the optimal transmission distance between the two sets, and γ represents the optimal transmission matching stream. Represents geodesy cost, Π(μ) Z ,μ B ) represents the empirical distribution μ of the feature sample set. Z The empirical distribution μ of the set of feature vectors of class centers B The probabilistic coupling set between them.
[0018] Preferably, the probability coupling set is obtained by the following formula:
[0019] Π(μ Z ,μ B )={γ∈(R + ) I×J |γ×1 J =μ Z ,γ T ×1 I =μ B}
[0020] In the formula, R + Let I represent a positive real number, and J represent a J-dimensional class unit vector and a J-dimensional sample unit feature vector. J Indicates the sample size, 1 I Indicates the number of cluster centers;
[0021] in,
[0022]
[0023] function and Represents the feature sample x i and category center feature vector c k The probability distribution.
[0024] Preferably, the geodesic cost is calculated using the cosine distance to determine the sample vector x. i To each prototype vector c k The distance is expressed by the formula:
[0025]
[0026] Preferably, cross-domain feature reconstruction is performed on the source domain features and the target domain features respectively to obtain source domain reconstructed features and target domain reconstructed features;
[0027] The optimal transmission matching flow between source domain feature samples and class center feature vectors is constrained by source domain reconstruction features, and the optimal transmission matching flow between target domain feature samples and class center feature vectors is constrained by target domain reconstruction features.
[0028] Preferably, the steps of consistency constraint include:
[0029] Based on the category center feature vector of the source domain feature samples, the classification probability of the reconstructed features is obtained; the formula is:
[0030]
[0031] In the formula, x new Represents the reconstructed features, τ represents the temperature coefficient during the Softmax process, and c k Let c represent the feature vector of the k-th class center. m This represents the feature vector of the m-th category center, used for summation through traversal of the denominator.
[0032] Using the classification probabilities of the reconstructed features, a consistency constraint is applied to the optimal transport matching flow between the corresponding feature samples and the class center feature vectors through KL divergence; the constraint formula is as follows:
[0033]
[0034] In the formula, γ represents the optimal transmission matching stream, and p(x) represents the probability of reconstructing the feature sample x.
[0035] Preferably, the step of cross-domain feature reconstruction of source domain features and target domain features includes:
[0036] Based on the learnable linear transformation matrix, determine the query, key, and value for the reconstruction of source domain features and target domain features, respectively;
[0037] The keys and values of the source domain features are swapped with the keys and values of the target domain features, and their respective self-attention is calculated.
[0038] The self-attention of the source domain features and the self-attention of the target domain features are respectively processed through residual connection, layer normalization and feedforward calculation to obtain the source domain reconstructed features and the target domain reconstructed features.
[0039] Preferably, based on the hierarchical optimal transmission distance, constraints are applied to the source domain reconstruction features and the target domain reconstruction features; the constraint loss is:
[0040]
[0041] In the formula, Z s Z represents the source domain reconstruction feature. t Represents the reconstructed features of the target domain. The hierarchical optimal transmission loss represents the source domain reconstruction features and the target domain reconstruction features, γ represents the optimal transmission matching flow, and Π(μ) represents the optimal transmission matching flow. s ,μ t ) represents the empirical distribution μ of the source domain reconstruction features. s The empirical distribution μ of features reconstructed from the target domain t The probabilistic coupling set between them This represents the sum of the optimal transmission distance and the Euclidean distance between two samples.
[0042] Preferably, The calculation formula is:
[0043]
[0044] In the formula, α and β represent weighting parameters, M represents the number of projections, and θ m This indicates mapping a high-dimensional embedding to 1. d The m-th projection head, It is θ m transpose, There are two samples respectively. Feature map after feature extraction.
[0045] Preferably, the sum of hierarchical optimal transmission loss and consistency loss is used as the objective function of the physical constitution identification method, and its expression is:
[0046]
[0047] In the formula, λ1, λ2, and λ3 represent the weighting coefficients of each part of the loss, respectively, KL(P s ||γ s KL(P) represents the consistency constraint loss between the source domain reconstructed feature classification probability and the optimal transmission matching stream of the source domain features. t ||γ t ) represents the consistency constraint loss between the target domain reconstructed feature classification probability and the target domain feature optimal transmission matching stream.
[0048] As can be seen from the above technical solution, this invention discloses a method for physical constitution recognition based on unlabeled facial images, which makes full use of a large amount of unlabeled facial data to address practical problems such as slow annotation progress and lack of labels in the early stages of facial dataset construction. As more labeled data is gradually accumulated, the model can be fine-tuned to further improve its effectiveness and performance, demonstrating good practicality. Compared with the prior art, this application has the following advantages:
[0049] 1) By leveraging cross-domain feature reconstruction techniques and hierarchical transmission distance constraints, the network can simultaneously focus on both local and global features of facial images, thus improving performance.
[0050] 2) By constraining the classification consistency between the original features and the reconstructed features, the encoder's generalization performance in the target domain can be enhanced, enabling the model to effectively utilize prior knowledge of the source domain to complete image classification in the target domain even in the absence of target domain labels. Attached Figure Description
[0051] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0052] Figure 1 This is a flowchart of the body constitution recognition method based on unlabeled facial images according to the present invention;
[0053] Figure 2 This is a schematic diagram of the body constitution recognition process based on unlabeled facial images according to the present invention.
[0054] Figure 3 This is a schematic diagram of the cross-domain feature cross-reconstruction process of the present invention. Detailed Implementation
[0055] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0056] To fully utilize the large amount of unlabeled data in the source and target domains, this invention discloses a method for physical constitution recognition based on unlabeled facial images. The aim is to achieve cross-domain few-sample learning using data from both domains, followed by fine-tuning in the target domain using a small number of labels, thereby achieving high-performance facial constitution recognition.
[0057] Specifically, the implementation steps of this application include:
[0058] Acquire unlabeled facial images and combine them with facial body constitution data for body constitution identification, such as... Figure 1 The identification steps include:
[0059] S1. Using unlabeled facial images as the source domain and facial body data as the target domain, feature extraction is performed to obtain source domain features and target domain features; in this application, facial body data may contain a small amount of labeled data;
[0060] S2. Based on the category center feature vector of the source domain feature sample, determine the optimal transmission matching flow between the source domain feature sample and the target domain feature sample and the category center feature vector, respectively.
[0061] S3. Determine the classification probability of the source domain feature samples based on the optimal transmission matching flow, and identify the constitution based on the classification probability. That is, the greater the distance from the target domain sample to the feature vector of each category center determined by the optimal transmission matching flow, the lower the probability of being classified into the category represented by the feature vector of that category center. The category corresponding to the highest probability is the constitution category of the sample, thus completing the constitution identification.
[0062] Among them, reference Figure 2 ,
[0063] In step S1, features are extracted from unlabeled facial images and facial body data using an encoder;
[0064] In step S2, after extracting feature vectors from all samples of each category in the source domain, the feature vectors are averaged to obtain the category center feature vectors of the source domain feature samples. Then, all category center vectors are stored in a prototype library. In this application, the prototype library is implemented as a fully connected layer structure, and its weights are used as an updatable parameter matrix to store the category centers. At this point, the parameter matrix of the prototype library can be represented as B = [c1,…,c…].k ,…,c n ],c k ∈R H×W×C .
[0065] The class to which a sample belongs is further calculated by measuring the distance from the sample point to each class center. In this embodiment, the optimal transmission distance is used as the cost function, but the optimal transmission distance is not used as a loss in the model backpropagation. Instead, the optimal transmission matching flow between the sample and the class center features is used as the class probability of the sample.
[0066] Assume μ Z and μ B Each is a sample x within a batch Z. i The probability distribution and the prototype feature vector c in prototype library B k If the probability distribution is μ, then μ Z and μ B Formulas that can be expressed as:
[0067]
[0068] Among them, the Dirac function and Represents the feature sample x i and category center feature vector c k The probability distribution of μ; Z With μ B Defined as a uniform distribution, the optimal transmission distance between these two distribution sets can be defined as:
[0069]
[0070] In the formula, Z represents the feature sample set, B represents the class center feature vector set, Distance(Z,B) represents the optimal transmission distance between the two sets, and γ represents the optimal transmission matching stream. Indicates geodesy cost, <·,·> F It is the Frobenius inner product, Π(μ) Z ,μ B ) represents the empirical distribution μ of the feature sample set. Z The empirical distribution μ of the set of feature vectors of class centers B The probabilistic coupling set between them is expressed by the formula:
[0071] Π(μ Z ,μ B )={γ∈(R + ) I×K |γ1 K =μ Z ,γ T 1 I =μB}
[0072] In the formula, R + 、I、1 J 1 I These represent positive real numbers, the number of samples, the number of cluster centers, J-dimensional sample unit feature vectors, and I-dimensional class unit vectors, respectively.
[0073] In this embodiment, the geodesy cost matrix It is non-negative. Represents the distance between the sample and the prototype vector; for geodesic cost Calculate sample x using cosine distance i The distance to each prototype vector is calculated using the following formula:
[0074]
[0075] This application calculates the optimal matching flow γ from sample nodes in two domains to the class center vector by minimizing the optimal transmission distance between the two distributions. s ,γ t After normalization, the resulting matching stream can reflect the classification probability of the original sample for each prototype vector in the prototype library.
[0076] In a preferred embodiment, cross-domain feature reconstruction is performed on the source domain features and the target domain features respectively, so as to achieve data augmentation through feature reconstruction;
[0077] Then, the source domain reconstruction features are used to constrain the optimal transmission matching flow between the source domain feature samples and the class center feature vector, and the target domain reconstruction features are used to constrain the optimal transmission matching flow between the target domain feature samples and the class center feature vector.
[0078] In one embodiment, the step of cross-domain feature reconstruction of source domain features and target domain features includes:
[0079] Based on the learnable linear transformation matrix, determine the query, key, and value for the reconstruction of source domain features and target domain features, respectively;
[0080] The keys and values of the source domain features are swapped with the keys and values of the target domain features, and their respective self-attention is calculated.
[0081] The self-attention of the source domain features and the self-attention of the target domain features are respectively processed through residual connection, layer normalization and feedforward calculation to obtain the source domain reconstructed features and the target domain reconstructed features.
[0082] It should be noted that in this embodiment, a self-attention-based cross-domain feature reorganization (SCF) module is introduced to enhance the diversity of target domain samples while retaining key features for classification within the domain.
[0083] like Figure 3 As shown, the SCF module uses samples within a batch to compute self-attention and generates new features by weighting them according to the self-attention matrix. These new features integrate most of the key features from this domain and style information from another domain, enriching the target domain samples with a large number of source domain samples to solve the problem of few samples.
[0084] Cross-domain feature reconstruction methods utilize feature projections from different views within two domains to reconstruct samples from another domain using features from one domain. Taking source domain feature reconstruction as an example... Figure 2 The formula for calculating self-attention at this point is as follows:
[0085]
[0086] in, For the feature set of a batch of samples in the source domain, This represents the feature set of a batch of samples in the target domain. Let Z... s Z t Connect into a matrix in
[0087] Given a learnable linear transformation matrix Calculate the query (Q), key (K), and value (V) according to formula (2);
[0088] Q = ZW q K = ZW k V=ZW v
[0089] After calculating the weighted self-attention matrix representing the source domain sample features using the target domain feature set using the above formula, the reconstructed source domain sample features are obtained through residual connections, layer normalization, and feedforward calculation; the corresponding formula is expressed as:
[0090]
[0091] Where LN represents layer normalization, and FC represents a feedforward fully connected layer. Reconstructed Samples As a data augmentation version of the source domain sample, compared with the original sample Z s Input the reconstructed consistency constraint module for subsequent training.
[0092] Similarly, the formula for calculating the features of the reconstructed target domain samples is as follows:
[0093]
[0094] Similarly, reconstructing samples Compared with the original sample Z t I will continue to participate in the subsequent training of the online clustering module.
[0095] In this embodiment, the self-attention calculation process is implemented using the encoding layer in the Transformer model. Unlike traditional self-attention solutions, this application utilizes cross-self-attention to complete feature reconstruction, providing a solution for data augmentation of unlabeled images.
[0096] Furthermore, since the reconstructed image has the same label as the original image, this invention does not require obtaining image labels. Downstream modules can form supervision through the consistency constraints of features between the original and reconstructed images. This is similar to the idea of self-supervised training, but without the need to sample positive and negative samples, simplifying the training process and reducing the cost of label annotation.
[0097] In one embodiment, the batch feature set Z from the source domain and the target domain s Z t After feature reconstruction, entirely new batch-enhanced features are formed. Since the inputs are all unlabeled samples, in order to make full use of the structured information contained in the unlabeled samples, this application achieves the purpose of "supervision" by constraining the consistency of the classification probabilities of the original features and the reconstructed features.
[0098] Specifically, for the original image and its reconstructed version of the same image, this application aims to maintain consistent classification probabilities. Therefore, it imposes consistency constraints on the classification results of the original features in both domains and the classification results of the reconstructed features of their respective samples. This enhances the encoder's ability to adapt to the target domain task while training prototype vectors in the prototype library to complete online clustering. Since the reconstructed sample features are all composed of information embeddings from another domain, this consistency constraint can enhance the encoder's generalization performance in both domains, thereby bridging the style differences between the two domains.
[0099] First, obtain the classification results of the reconstructed features of each sample;
[0100] Due to the differences between the two domains, it is unreasonable to simply apply both types of features to the same classifier. This strong constraint would cause the encoder to ignore key local discriminative information, ultimately classifying all images into the same category without label guidance. Therefore, this application provides a prototype library to buffer the strong constraints caused by using the same classifier structure.
[0101] The prototype library is implemented as a fully connected layer structure, where the weights store the class centers as an updatable parameter matrix. In this case, the parameter matrix of the prototype library can be represented as B = [c1, ..., c k ,…,c n ],ck ∈R H ×W×C .
[0102] For the input batch reconstruction feature set To calculate the similarity between the reconstructed features and each prototype vector, this application achieves this by performing a cross product of the two vectors and by using a feedforward classification process through a fully connected layer; the formula is expressed as:
[0103]
[0104] In the formula, x new Represents the reconstructed features, τ represents the temperature coefficient during the Softmax process, and c k Let c represent the feature vector of the k-th class center. m This represents the feature vector of the m-th category center, used for summation through traversal of the denominator.
[0105] Secondly, using the classification probabilities of the reconstructed features, a consistency constraint is applied to the optimal transport matching flow between the corresponding feature samples and the class center feature vectors through KL divergence; the constraint formula is as follows:
[0106]
[0107] In the formula, γ represents the optimal transmission matching stream, and p(x) represents the probability of reconstructing the feature sample.
[0108] In one exemplary embodiment, based on the prototype library, the model obtains the basic classification probability through Softmax regression, calculated using the following formula:
[0109]
[0110] Among them, P s ,P t Let τ be the classification probability of the reconstructed features in the two domains, and τ be the temperature coefficient in the Softmax process. This is a feature map of a reconstructed sample from two domains.
[0111] Subsequently, this method uses the class probability distribution of the original sample (i.e., the optimal transport matching flow γ between the sample and the prototype vector) as the basis for its method. s ,γ t The consistency between the KL divergence constraint and the classification probability of the reconstructed features is determined. The calculation formula is as follows:
[0112]
[0113]
[0114] To further optimize the above technical solution, this application imposes constraints on the source domain reconstruction features and target domain reconstruction features based on hierarchical optimal transmission distance; the constraint loss is:
[0115]
[0116] In the formula, Z s Z represents the source domain reconstruction feature. t Represents the reconstructed features of the target domain. The hierarchical optimal transmission loss represents the source domain reconstruction features and the target domain reconstruction features, γ represents the optimal transmission matching flow, and Π(μ) represents the optimal transmission matching flow. s ,μ t ) represents the empirical distribution μ of the source domain reconstruction features. s The empirical distribution μ of features reconstructed from the target domain t The probabilistic coupling set between them This represents the sum of the optimal transmission distance and the Euclidean distance between two samples.
[0117] In this invention, the calculation of optimal transmission distance focuses on local features of the image, such as the shape of facial features. However, overall facial features, such as mental state and facial color, are also very important. Therefore, in calculating the sample... When determining the optimal transmission distance, Euclidean distance is added to focus on global features; the corresponding calculation formula is:
[0118]
[0119] In the formula, α and β represent weighting parameters, M is the number of projections, and θ m It maps high-dimensional embeddings to 1. d The m-th projection head, It is θ m transpose, There are two samples respectively. Feature map after feature extraction.
[0120] The hierarchical transport distance between the general face dataset and the traditional Chinese medicine facial constitution dataset within a batch can be calculated using the above formula. Using this distance as the loss during backpropagation helps mitigate the influence of domain style information such as facial expressions and shooting angles, while also enriching the sample composition of the traditional Chinese medicine facial constitution dataset, thus contributing to improved accuracy in classification tasks.
[0121] In a preferred embodiment, the physical constitution recognition method disclosed in this invention comprises a reconstruction consistency loss and a neighborhood convergence loss, wherein the hierarchical optimal transmission distance is directly used as the neighborhood convergence loss in backpropagation, as expressed in the following formula:
[0122]
[0123] In the formula, λ1, λ2, and λ3 represent the weighting coefficients of each part of the loss, respectively, KL(P s ||γ s KL(P) represents the consistency constraint loss between the source domain reconstructed feature classification probability and the optimal transmission matching stream of the source domain features. t ||γ t ) represents the consistency constraint loss between the target domain reconstructed feature classification probability and the target domain feature optimal transmission matching stream.
[0124] Furthermore, since the target domain contains some labeled data, the trained network can be fine-tuned using the labeled data from the target domain. In this case, a simple and effective cross-entropy function can be used to calculate the classification loss during the fine-tuning process. Assume the target domain data is... The cross-entropy loss is calculated as follows:
[0125]
[0126] Where φ represents the model parameters, f φ (x i ) indicates the model prediction result.
[0127] In a preferred embodiment, this application also provides a physical constitution recognition network / device, which includes an encoder, a cross-domain feature cross-reconstruction module, a reconstruction consistency module based on a prototype library, and a hierarchical optimal transmission module.
[0128] The network input consists of batches of unlabeled general face datasets from the source domain and facial physiology datasets from the target domain.
[0129] The encoder extracts features and inputs them into the cross-domain feature cross-reconstruction module. Data augmentation is achieved through feature reconstruction, while satisfying hierarchical optimal transmission constraints.
[0130] Finally, the reconstructed sample features and the features extracted by the encoder are input into the reconstruction consistency module in the prototype library to constrain the online clustering process. Clustering yields the center vector for each category. Then, using the optimal transmission distance as a metric, the prototype classifier obtains the probability distribution of samples belonging to each category, and calculates the consistency loss between the probability distributions of the original samples and the augmented samples. Furthermore, the augmented samples are also input into the hierarchical optimal transmission network to calculate the optimal inter-domain transmission loss.
[0131] Based on the fully trained model, further fine-tuning is performed using labeled facial body composition data.
[0132] The advantages of this invention lie in its ability to fully utilize a large amount of unlabeled facial data, which is readily available and addresses practical problems such as slow annotation progress and a lack of labels in the early stages of facial dataset construction. Secondly, as labeled facial biometric data increases, the model can be further improved in performance through fine-tuning, demonstrating good practicality.
[0133] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0134] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A constitution recognition method based on a no-label face image, characterized in that, a no-label face image is obtained, and constitution recognition is performed in combination with face constitution data, and the recognition steps include: S1. Extracting features from the no-label face image as a source domain and the face constitution data as a target domain to obtain source domain features and target domain features; S2. Determining the optimal transport matching flow of the source domain feature samples and the target domain feature samples with the class center feature vectors respectively according to the class center feature vectors of the source domain feature samples; S3. Determining the classification probability of the source domain feature samples according to the optimal transport matching flow, and recognizing the constitution according to the classification probability; the greater the distance of the optimal transport matching flow of the target domain samples to each class center feature vector, the smaller the probability of being classified into the class represented by the class center feature vector, and the class corresponding to the maximum probability is the constitution class of the sample, thereby completing the constitution recognition; In S2, the cross-domain feature reconstruction is performed on the source domain features and the target domain features respectively to obtain source domain reconstructed features and target domain reconstructed features; The consistency constraint is performed on the optimal transport matching flow of the source domain feature samples and the class center feature vectors by using the source domain reconstructed features, and the consistency constraint is performed on the optimal transport matching flow of the target domain feature samples and the class center feature vectors by using the target domain reconstructed features; Wherein, the source domain reconstructed features and the target domain reconstructed features are constrained based on the hierarchical optimal transport distance; the constraint loss is: In the formula, Z s represents the source domain reconstruction feature, Z t represents the target domain reconstruction feature, represents the hierarchical optimal transport loss of the source domain reconstruction feature and the target domain reconstruction feature, γ represents the optimal transport matching flow, Π(μ s ,μ t ) represents the probability coupling set between the empirical distribution μ s of the source domain reconstruction feature and the empirical distribution μ t of the target domain reconstruction feature, I represents an I-dimensional category unit vector, and J represents a J-dimensional sample unit feature vector, represents the sum of the optimal transport distance and the Euclidean distance between two samples, The calculation formula is: In the formula, α and β respectively represent weight parameters, M represents the number of projections, θ m represents mapping the high-dimensional embedding to 1 d , the mth projection head of θ is the transpose of θ m , and θ and θ are feature maps after extracting features of two samples, respectively. In S3, the sum of the hierarchical optimal transport loss and the consistency loss is taken as the objective function of the constitution recognition method, and the expression is: In the formula, λ1, λ2, λ3 respectively represent weight coefficients of respective part losses, KL(P s ||γ s ) represents a consistency constraint loss of a source domain reconstruction feature classification probability and a source domain feature optimal transport matching flow, KL(P t ||γ t ) represents a consistency constraint loss of a target domain reconstruction feature classification probability and a target domain feature optimal transport matching flow. 2.The physical constitution recognition method based on a no-label face image according to claim 1, characterized in that, In step S2, the optimal transport matching flow of the feature samples and the class center feature vectors is determined according to the following formula: where Z represents the set of feature samples, B represents the set of class center feature vectors, Distance(Z, B) represents the optimal transport distance between the two set distributions, and γ represents the optimal transport matching flow, represents the geodesic cost, Π(μ Z , μ B ) represents the probability coupling set between the empirical distribution μ Z of the set of feature samples and the empirical distribution μ B of the set of class center feature vectors. 3.The physical characteristic recognition method based on the no-label face image according to claim 2, characterized in that, The probability coupling set is obtained by the following formula, Π(μ Z , μ B ) = { γ ∈ (R + ) I×J | γ x 1 J = μ Z , γ T x 1 I = μ B} In the formula, R + represents a positive real number, I represents an I-dimensional category unit vector, J represents a J-dimensional sample unit feature vector, 1 J represents the number of samples, 1 I represents the number of cluster centers; Wherein, Function and representing a feature sample x i and a probability distribution of class center feature vectors c k . 4.The physical characteristic recognition method based on the no-label face image according to claim 2, characterized in that, The geodesic cost is computed by a cosine distance between the sample vector x i and the kth class center feature vector c k The distance is formulated as: 5.The physical characteristic recognition method based on a no-label face image according to claim 1, wherein, The steps of consistency constraint include: Based on the class center feature vectors of the source domain feature samples, the classification probability of the reconstructed features is obtained; the acquisition formula is: In the formula, x new represents the reconstruction feature, τ represents the temperature coefficient in the Softmax process, and c k represents the kth class center feature vector, c m represents the mth class center feature vector; The optimal transport matching flow of the corresponding feature samples and the class center feature vectors is constrained by using the classification probability of the reconstructed features through the KL divergence; the constraint formula is as follows: In the formula, γ represents the optimal transport matching flow, and p(x) represents the probability of the reconstructed feature sample x. 6.The physical characteristic recognition method based on a no-label face image according to claim 1, wherein, The steps of cross-domain feature reconstruction of the source domain features and the target domain features include: According to the learnable linear conversion matrix, the query, key and value of the reconstructed source domain features and target domain features are determined respectively; The keys and values of the source domain features and the keys and values of the target domain features are exchanged correspondingly, and the respective self-attention is calculated; The self-attention of the source domain features and the self-attention of the target domain features are made to pass through residual connection, layer normalization and feedforward calculation in turn to obtain the source domain reconstructed features and the target domain reconstructed features.