A day and night cross-domain facial expression recognition method based on prototype transmission
By using a prototype-based transmission method, the problem of large differences in lighting conditions in cross-domain facial expression recognition between day and night is solved. Information entropy and adversarial learning are used to enhance feature extraction, and efficient emotion recognition under different lighting conditions is achieved.
Patent Information
- Application Number
- CN202410908944.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2044-07-08
AI Technical Summary
Existing facial expression recognition technologies face challenges such as high recognition difficulty, significant domain bias, and insufficient infrared image information under different lighting conditions, especially in cross-domain recognition between day and night. This makes it difficult to apply models trained on visible light data to infrared and nighttime data.
A prototype-based transmission method is adopted, which extracts visible light and infrared features through a feature extractor with shared pre-trained weights, uses information entropy to calculate emotional richness for pixel-level fusion, enhances detailed features through adversarial learning and a diversified feature capture module, and uses category prototypes for bidirectional transmission to reduce the domain gap.
It improves the accuracy of emotion recognition under low-light conditions, effectively solves the domain shift problem under different lighting conditions, enhances the performance of infrared modal emotion recognition, and achieves more reasonable results through end-to-end training.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention belongs to the field of human-computer interaction technology and relates to a day-night cross-domain facial expression recognition method based on prototype transmission. Background Technology
[0002] Facial expressions are a crucial channel for emotional communication in human-computer interaction. Facial expression recognition has been widely applied in various user-centered fields and has achieved significant progress. Notably, current research primarily focuses on images under visible light. However, visible light images are almost ineffective in low-light and adverse weather conditions (such as darkness and dense fog). Nevertheless, monitoring pedestrian emotions and predicting their behavior is crucial, as nighttime is often a high-incidence period for traffic accidents and crime, making it essential for reducing traffic accidents. Existing traditional cross-domain emotion recognition tasks mainly focus on the domain adaptation problem between different datasets, but cannot adequately address the domain shift problem under different lighting conditions.
[0003] Solving the problem of emotion recognition under different lighting conditions in day-night emotion recognition research is more challenging than traditional cross-domain emotion recognition because the sample domains for daytime and nighttime differ significantly. Recognizing facial emotions is extremely difficult. The three main problems of the day-night cross-domain facial expression recognition task are: 1) Infrared images contain less facial expression information, increasing the difficulty of recognition. 2) Significant domain bias exists between the two domains, making it difficult for models trained on visible light data to be applied simultaneously to infrared and nighttime data. 3) Existing infrared and visible light datasets are limited, and the emotional levels are not well defined, increasing the complexity of network training. Summary of the Invention
[0004] The technical solution of this invention is used to solve the problem of how to learn emotional knowledge using rich daytime visible light emotional images and transfer it to various emotion recognition under low-light conditions at night, thereby improving emotion recognition under low-light conditions.
[0005] The present invention solves the above-mentioned technical problems through the following technical solutions:
[0006] A day-night cross-domain facial expression recognition method based on prototype transmission includes the following steps:
[0007] Step 1: Obtain the dataset and divide it into training and test sets proportionally. Based on the day-night cross-domain emotion recognition task, visible light images are considered as the source domain. Infrared images are considered as the target area. For visible light and infrared images, a feature extractor with shared pre-trained weights is used to extract visible light features f. rgb and infrared features f ir ;
[0008] Step 2: Perform pixel-level fusion of visible light and infrared light images, and calculate the emotional richness of the images using information entropy; fuse the selected samples with richer emotions, prioritizing the N samples with the highest information content for feature fusion during the processing of each batch of samples, to obtain the modality fusion feature f. mix ;
[0009] Step 3: Extract the visible light features f from the feature extractor. rgb and infrared features f ir The data is fed into the domain discriminator, and the feature extractor and the domain discriminator are trained simultaneously. Adversarial learning is used to enable the network to extract the common modal information of the two.
[0010] Step 4: Extract the visible light features f using a diversified feature capture module. rgb Multi-branch attention enhancement is performed to capture diverse detailed features, and then partition loss is used to guide the parallel attention head to focus on different facial feature regions;
[0011] Step 5: Extract the visible light feature f rgb and infrared features f ir Bidirectional transmission with the category prototype μ is performed to bridge the domain gap between the two domains.
[0012] Furthermore, the method for calculating the emotional richness of an image using information entropy as described in step 2 is as follows:
[0013]
[0014] Where H(X) represents information entropy, p(x) i ) represents the grayscale value x in the image. i The proportion of pixels, n = 255;
[0015] In a given source domain sample and target domain samples In this case, the feature fusion method is as follows:
[0016]
[0017] Where, x st This represents the image after fusing two modalities, where λ is the fusion rate. This represents the visible light image before fusion. Indicates the infrared image before fusion;
[0018] The loss function for feature fusion is:
[0019]
[0020] in, This represents the probability that the model predicts the fused sample belongs to the i-th category. This represents the true label value of visible light. This represents the actual infrared tag value.
[0021] Furthermore, the method for capturing diverse detailed features described in step 4 is as follows:
[0022] Let H = {H1, ..., H} k} represents a spatial attention head, K represents the number of spatial attention heads, and s represents the output s of the j-th spatial attention unit. j Represented as:
[0023] s j =f·H j (w s f), j∈{1,…,K}
[0024] Among them, w s For spatial attention head H j The network parameters are , where · represents element-wise multiplication, and f is the feature extracted from the image after passing through the feature extractor.
[0025] Final attention feature a j Represented as:
[0026] a j =s j ·H j ′(w c ,s j ),j∈{1,...,K}
[0027] Where H′={H1′,...,H k ′} represents the channel attention head, w c For channel attention head H j The network parameters of ′.
[0028] Furthermore, the partitioning loss described in step 4 is expressed as follows:
[0029]
[0030] Where N is the number of samples in the current batch, and L is the dimension of the attention feature vector for each head. express variance It is a j The l th Each element.
[0031] Furthermore, the visible light feature f extracted in step 5... rgb and infrared features f irThe method for bidirectional transmission with the category prototype μ to bridge the domain gap between two domains is as follows:
[0032] (1) Abstract the class prototype from the linear layer parameters during the classifier training process;
[0033] (2) Calculate the expected cost of moving from the prototype to the target feature, transfer from the target feature to the class prototype, and assign each target sample to the prototype based on the similarity between the prototype and the class distribution.
[0034] (3) Increase costs in the opposite direction, i.e. move from the prototype to the target feature, ensure that there is a target feature near each prototype, and avoid discarding class prototypes.
[0035] Furthermore, the method for abstracting the class prototype from the linear layer parameters during the classifier training process described in step 5 is as follows:
[0036] By aligning the prototype and target features bidirectionally, and minimizing the expected cost under these two different joint distributions, the target features will approach the prototype and move away from the decision boundary.
[0037] The target features are transferred to the class prototype, and the class prototype μ is decomposed using the chain rule. k and target domain features The joint distribution represents the target features. To class prototype μ k The conditions for movement are distributed as follows:
[0038]
[0039] Where p(μ) k () represents the discrete prior distribution of K classes in the target domain. Used to measure the similarity between a class prototype and target features.
[0040] Furthermore, the method for calculating the expected cost of moving from the prototype to the target feature as described in step 5 is as follows:
[0041]
[0042] Among them, the function μ k right The cost of movement is defined using cosine similarity.
[0043] Furthermore, the method described in step 5 for increasing cost in the opposite direction, i.e., moving from the prototype to the target feature, is as follows:
[0044] Given M target samples The empirical distribution representing the features of this batch of targets is represented by the prototype features μ. kThe probability of moving to the target feature is defined as a conditional distribution:
[0045]
[0046] The expected cost of moving from the prototype to the target feature is defined as:
[0047]
[0048] The prototype bidirectional transfer loss is expressed as:
[0049]
[0050] The loss function obtained during training is:
[0051] Λ=Λ cls +Λ adv +Λ part +Λ transport +Λ mixup
[0052] Among them, Λ cls Supervised classification loss, Λ adv It is the adversarial loss for aligning the source and target domains, Λ part Indicates attention partitioning loss, Λ transport It is the prototype bidirectional transmission loss, Λ mixup It is the feature fusion loss.
[0053] An electronic device includes a memory and a processor, the memory being used to store a program that supports the processor in executing the above-described prototype-based day-night cross-domain facial expression recognition method, the processor being configured to execute the program stored in the memory.
[0054] A storage medium storing a computer program, which, when executed by a processor, performs the steps of the above-described day-night cross-domain facial expression recognition method based on prototype transmission.
[0055] The advantages of this invention are:
[0056] (1) This invention proposes day-night cross-domain emotion recognition for the first time, aiming to solve the problem of emotion recognition under different light intensities, and introduces an infrared mode that is more challenging than traditional cross-domain emotion recognition tasks;
[0057] (2) This invention is based on adversarial learning and utilizes mode transfer between visible light and infrared images to enhance the performance of infrared modal emotion recognition.
[0058] (3) This invention utilizes multiple attention branches, focusing more on local emotional features, which is beneficial for emotion identification; the prototype transmission module abstracts the emotional category of visible samples into a prototype, directly guiding infrared samples to learn modality-independent emotional features; the feature fusion module filters and fuses information-rich visible light and infrared samples to generate fused features, combining information from the two modes.
[0059] (4) The present invention adopts an end-to-end training method, which makes the training results more reasonable. Attached Figure Description
[0060] Figure 1 This is a network framework diagram of the present invention;
[0061] Figure 2 A visualization of the feature clustering results of the data on the original network;
[0062] Figure 3 This is a visualization of the data after feature clustering according to the present invention.
[0063] Figure 4 This is a diagram showing the confusion matrix results of the sentiment analysis in this invention;
[0064] Figure 5 This is a parameter analysis diagram of the feature fusion module of the present invention. Detailed Implementation
[0065] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, 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.
[0066] The technical solution of the present invention will be further described below with reference to the accompanying drawings and specific embodiments:
[0067] Example 1
[0068] This invention presents a day-night cross-domain facial expression recognition method based on prototype transmission. Due to different imaging principles, each modality possesses both modality-related and modality-independent features. To achieve domain adaptation between different modalities, we aim to extract modality-independent shared features. This invention uses the classic convolutional neural network ResNet as the backbone network for feature extraction. The network has three input branches: a visible light image, an infrared image, and a fused image after a fusion module. Features extracted from these three branches are then fed into subsequent modules for computation. Visible light features are input into the attention diversification information capture module to constrain the network to learn more detailed emotional information; both visible light and infrared features are input into the prototype transmission module, using the model parameters trained by the network to obtain class prototypes, reducing the domain offset between the two domains. The specific network framework diagram is shown below. Figure 1 .
[0069] The day-night cross-domain facial expression recognition method based on prototype transmission includes the following steps:
[0070] Step 1: Using the NVIE and Oulu-CASIA datasets, the datasets are divided into training and testing sets proportionally. Based on the day-night cross-domain emotion recognition task, visible light images are considered as the source domain. Infrared images are considered as the target area. The training set includes labeled visible light images and unlabeled infrared images, while the test set consists of unlabeled infrared images. For both visible light and infrared images, a feature extractor with shared pre-trained weights is used to extract visible light features f. rgb and infrared features f ir .
[0071] Step 2: Perform pixel-level fusion of visible light and infrared light images, and calculate the emotional richness of the images using information entropy; fuse the selected samples with richer emotions, prioritizing the N samples with the highest information content for feature fusion during the processing of each batch of samples, to obtain the modality fusion feature f. mix .
[0072] The method for calculating the emotional richness of an image using information entropy is as follows:
[0073]
[0074] Where H(X) represents information entropy, p(x) i ) represents the grayscale value x in the image. i The proportion of pixels, n = 255;
[0075] In a given source domain sample and target domain samples In this case, the feature fusion method is as follows:
[0076]
[0077] Where, x st This represents the image after fusing two modalities, where λ is the fusion rate. This represents the visible light image before fusion. Indicates the infrared image before fusion;
[0078] The loss function for feature fusion is:
[0079]
[0080] in, This represents the probability that the model predicts the fused sample belongs to the i-th category. This represents the true label value of visible light. This represents the actual infrared tag value;
[0081] Step 3: Extract the visible light features f from the feature extractor. rgb and infrared features f ir The data is fed into the domain discriminator, and the feature extractor and the domain discriminator are trained simultaneously. The specific process is as follows: the training process of the feature extractor is to maximize the error of the domain discriminator, that is, the features extracted by the feature extractor are so that the domain discriminator cannot distinguish whether they come from the source domain or the target domain; the adversarial learning method is used to enable the network to extract the common modal information of the two.
[0082] Step 4: Use a diverse feature capture module to capture the visible light features f extracted in Step 1. rgb Multi-branch attention enhancement is performed to capture diverse detailed features, making the network focus more on local emotional features of the face rather than overly focusing on the overall face. Then, a partition loss method is used to guide the parallel attention head to focus on different facial feature regions.
[0083] The method for capturing diverse detailed features is as follows:
[0084] The diverse feature capture module contains many independent parallel cross-attention heads; each cross-attention head is a combination of a spatial attention unit and a channel attention unit; the feature extractor extracts features from the input, then inputs these features into the spatial attention unit to extract spatial features; then the spatial features are input into the channel attention unit to extract channel features. These two dimensions of features are ultimately combined into an attention vector.
[0085] The spatial attention unit consists of four convolutional layers and one activation function. 1×1, 1×3, and 3×3 convolutional kernels are used to capture local features at multiple scales. The channel attention unit consists of a global average pooling layer, two linear layers, and one activation function. To enable the multi-head structure to better learn attention maps of different local features, a partitioning loss is introduced to further guide the cross-attention heads to focus on different key regions, avoiding attention point overlap.
[0086] Specifically, H = {H1, ..., H} k} represents a spatial attention head, K represents the number of spatial attention heads, and s represents the output s of the j-th spatial attention unit. j Represented as:
[0087] s j =f·H j (w s f), j∈{1,...,K}
[0088] Among them, w s For spatial attention head H j The network parameters are , where · represents element-wise multiplication, and f is the feature extracted from the image after passing through the feature extractor.
[0089] The final attention feature a j Represented as:
[0090] a j =s j ·H j ′(w c ,s j ),j∈{1,...,K}
[0091] Where H′={H1′,...,H k ′} represents the channel attention head, w c For channel attention head H j Network parameters of ′;
[0092] A partitioning loss method is proposed to guide parallel attention heads to focus on different facial feature regions. Specifically, this is achieved by maximizing the variance between attention vectors. The partitioning loss is expressed as follows:
[0093]
[0094] Where N is the number of samples in the current batch, and L is the dimension of the attention feature vector for each head. express variance It is a j The l th Each element.
[0095] Step 5: Extract the visible light features f from Step 1. rgb and infrared features f ir Bidirectional transmission with the category prototype μ is performed to bridge the domain gap between the two domains.
[0096] The method for obtaining the class prototype is abstracted from the linear layer parameters during the classifier training process, as follows: the class prototype and the target feature are bidirectionally aligned, and by minimizing the expected cost under these two different joint distributions, the target feature will approach the prototype and move away from the decision boundary.
[0097] The target features are transferred to the class prototype, and the class prototype μ is decomposed using the chain rule. k and target domain features The joint distribution represents the target features. To class prototype μ k The conditions for movement are distributed as follows:
[0098]
[0099] Where p(μ) k () represents the discrete prior distribution of K classes in the target domain. Used to measure the similarity between a class prototype and target features.
[0100] The expected cost of moving the target feature to the class prototype is defined as:
[0101]
[0102] Among them, the function μ k right The cost of movement is defined using cosine similarity.
[0103] Each target sample is assigned to a prototype based on the similarity between the prototype and the class distribution. Intuitively, minimizing this expected movement cost encourages each target feature to move closer to neighboring class prototypes, thus reducing violations of the clustering assumption. If each prototype is viewed as a pattern in the distribution of class source features, this loss will encourage pattern-finding behavior. To ensure that there are some target features near each prototype and to avoid discarding class prototypes, the cost is increased in the opposite direction, i.e., moving from the prototype to the target feature.
[0104] Given M target samples The empirical distribution representing the features of this batch of targets is represented by the prototype features μ. k The probability of moving to the target feature is defined as a conditional distribution:
[0105]
[0106] The probability of moving the target feature to the prototype different, The probability of the target sample for each prototype is normalized to ensure that each prototype is assigned some target features.
[0107] Therefore, the expected cost of moving from the prototype to the target feature is defined as:
[0108]
[0109] The prototype bidirectional transfer loss is expressed as:
[0110]
[0111] The loss function obtained during training is:
[0112] Λ=Λ cls +Λ adv +Λ part +Λ transport +Λ mixup
[0113] Among them, Λ cls Supervised classification loss, Λ adv It is the adversarial loss for aligning the source and target domains, Λ part Indicates attention partitioning loss, Λ transport It is the prototype bidirectional transmission loss, Λ mixup It is the feature fusion loss.
[0114] Experimental verification
[0115] Using the publicly available visible and near-infrared facial emotion datasets Oulu-CASIA and NVIE (visible and thermal infrared), an unsupervised modality transfer method was employed, with visible light samples as the source domain and infrared modality samples as the target domain. The training set consisted of labeled visible light images and unlabeled infrared images, while the test set used unlabeled infrared images to validate the network's effectiveness. The network was trained for 50 epochs on a GeForce RTX 3090 GPU with a batch size of 32. Experiments were conducted on CNN and Transformer architectures using ResNet50 and ImageNet pre-trained Swim-base as backbones, respectively. The initial learning rate was set to 0.001 for both ResNet and Transformer networks. AdamW with a momentum of 0.9 and a weight decay of 0.05 was used as the optimizer. Recognition accuracy was used as the evaluation metric. The invention was compared with existing cross-domain emotion recognition methods on different datasets and general domain adaptation methods. This invention underwent quantitative testing against four existing cross-domain emotion recognition methods on different datasets and five general domain adaptation methods. For fair comparison, two backbones, ResNet and Transformer, were used. The experimental results are shown in Table 1, where bold indicates the best performance and underline indicates the second-best performance. As can be seen from Table 1, this invention achieved the best performance on all three datasets.
[0116] Table 1 Performance Comparison Test Results
[0117]
[0118] like Figures 2 to 5 As shown, Figure 2 A visualization of the feature clustering results of the data on the original network; Figure 3 This is a visualization of the data after feature clustering according to the present invention. Figure 4 This is a diagram showing the confusion matrix results of the sentiment analysis in this invention; Figure 5 This is a parameter analysis diagram of the feature fusion module of this invention; the network results were visualized and analyzed. Due to the learning difficulty of the NVIE dataset and its current low recognition accuracy, the experiments were mainly conducted on the Oulu-CASIA dataset. First, the infrared features of the test set were characterized using t-SNE. It can be observed that the proposed model can cluster samples of the same category together, indicating that the network can learn discriminative features. The results are shown in... Figure 3 Secondly, such as Figure 4As shown, a confusion matrix was calculated to observe the classification and confusion relationships of individual emotions. Experimental results show that most emotions were correctly identified with the highest probability. Finally, Grad-CAM++ was used to visualize the attention module, demonstrating that the multi-branch attention head can capture detailed facial expression information.
[0119] This invention discloses a day-night cross-domain facial expression recognition method based on prototype transfer. To address the problem of emotion recognition under low-light conditions, this invention proposes a novel day-night cross-domain emotion recognition method. The invention constructs a modality transfer between visible light and infrared images, as infrared images and dark nighttime images are weak in detail representation. Therefore, an attention-transfer multi-feature capture module focused on facial emotions is proposed to capture more transferable local emotional features. To address the significant domain shift between samples under different lighting conditions, a prototype feature transfer module is proposed to learn modality-independent categorical features to narrow the domain gap between visible light and infrared features. Finally, to overcome the presence of a large number of low-emotion-value samples in the dataset, a high-confidence fusion module is proposed to select information-rich visible light and infrared samples for fusion, thereby generating fused features containing style information about both domains. Experiments using low-light visible and infrared data demonstrate that the proposed method is effective in improving the accuracy of nighttime emotion recognition and is applicable to most nighttime scenarios.
[0120] An electronic device includes a memory and a processor, the memory being used to store a program that supports the processor in executing the prototype-transmitted day-night cross-domain facial expression recognition method of Embodiment 1, the processor being configured to execute the program stored in the memory.
[0121] A storage medium storing a computer program, which, when executed by a processor, performs the steps of the day-night cross-domain facial expression recognition method based on prototype transmission in Embodiment 1.
[0122] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A day-night cross-domain facial expression recognition method based on prototype transmission, characterized in that, Includes the following steps: Step 1: Obtain the dataset and divide it into training and test sets proportionally. Based on the day-night cross-domain emotion recognition task, visible light images are considered as the source domain. Infrared images are considered as the target area. For visible light and infrared images, a feature extractor with shared pre-trained weights is used to extract visible light features. and infrared features ; Step 2: Perform pixel-level fusion of visible light and infrared light images, and calculate the emotional richness of the images using information entropy; fuse the selected samples with richer emotions, prioritizing the N samples with the highest information content for feature fusion during the processing of each batch of samples to obtain the modality-fused features. ; The method for calculating the emotional richness of an image using information entropy is as follows: in, Represents information entropy. Indicates the grayscale value in the image The proportion of pixels, n=255; In a given source domain sample and target domain samples In this case, the feature fusion method is as follows: in, This represents the image after the two modalities have been fused. This represents the visible light image before fusion. It's the fusion rate. Indicates the infrared image before fusion; The loss function for feature fusion is: in, This represents the probability that the model predicts the fused sample belongs to the i-th category. This represents the true label value of visible light. This represents the actual infrared tag value; Step 3: Extract the visible light features from the feature extractor. and infrared features The data is fed into the domain discriminator, and the feature extractor and the domain discriminator are trained simultaneously. Adversarial learning is used to enable the network to extract the common modal information of the two. Step 4: Extract the visible light features using a diversified feature capture module. Multi-branch attention enhancement is performed to capture diverse detailed features, and then partition loss is used to guide the parallel attention head to focus on different facial feature regions; Step 5: Extract the visible light features and infrared features With category prototype Bidirectional transmission is performed to narrow the gap between the two domains; the specific method is as follows: (1) the class prototype is abstracted from the linear layer parameters in the classifier training process; (2) Calculate the expected cost of moving from the target feature to the prototype, transfer from the target feature to the class prototype, and assign each target sample to the prototype based on the similarity between the prototype and the class distribution. (3) Increase costs in the opposite direction, i.e. move from the prototype to the target feature, ensure that there is a target feature near each prototype, and avoid discarding class prototypes; The method of increasing cost in the opposite direction, i.e., moving from the prototype to the target feature, is as follows: Given Target samples , The empirical distribution representing the features of this batch of targets will be used to represent the prototype features. The probability of moving to the target feature is defined as a conditional distribution: The expected cost of moving from the prototype to the target feature is defined as: The prototype bidirectional transfer loss is expressed as: The loss function obtained during training is: in, It is supervised classification loss. It is an adversarial loss that aligns the source and target domains. This represents attention partitioning loss. It is the prototype bidirectional transmission loss. It is the feature fusion loss.
2. The day-night cross-domain facial expression recognition method based on prototype transmission according to claim 1, characterized in that, The method for capturing diverse detailed features described in step 4 is as follows: set up Indicates spatial attention head, The number of spatial attention heads, the first... The output of each spatial attention unit Represented as: in, For spatial attention head Network parameters, This is represented as element-wise multiplication, where f is the feature extracted from the image after passing through the feature extractor. Final attention features Represented as: in, Indicates the channel attention head. For channel attention head Network parameters.
3. The day-night cross-domain facial expression recognition method based on prototype transmission according to claim 2, characterized in that, The partitioning loss described in step 4 is expressed as follows: in, This is the number of samples in the current batch. It is the dimension of the attention feature vector for each head. express variance yes The Each element.
4. The day-night cross-domain facial expression recognition method based on prototype transmission according to claim 1, characterized in that, The method for abstracting class prototypes from the linear layer parameters during classifier training is as follows: By aligning the prototype and target features bidirectionally, and minimizing the expected cost under these two different joint distributions, the target features will approach the prototype and move away from the decision boundary. The target features are transferred to the class prototype, and the class prototype is decomposed using the chain rule. and target domain features The joint distribution of the target features represents the target features. To class prototype The conditional distribution of the movement is as follows: in, express Discrete prior distributions of each class in the target domain Used to measure the similarity between a class prototype and target features.
5. The day-night cross-domain facial expression recognition method based on prototype transmission according to claim 1, characterized in that, The method for calculating the expected cost of moving from the target feature to the prototype is as follows: Among them, the function express right The cost of movement is defined using cosine similarity.
6. An electronic device, comprising a memory and a processor, characterized in that, The memory is used to store a program that supports the processor in executing the day-night cross-domain facial expression recognition method based on prototype transmission as described in any one of claims 1 to 5, wherein the processor is configured to execute the program stored in the memory.
7. A storage medium storing a computer program, characterized in that, The computer program, when run by a processor, executes the steps of the day-night cross-domain facial expression recognition method based on prototype transmission as described in any one of claims 1 to 5.
