Embodied machine head facial motion control method and device based on deep reinforcement learning

By employing deep reinforcement learning, a facial image segmentation and self-supervised expression control model was constructed, which solved the problem of relying on manually labeled data in existing technologies. This enabled natural, coherent, and adaptive control of robot head expressions, improving the naturalness and accuracy of human-computer interaction.

CN123129117APending Publication Date: 2026-11-20武汉大步智能科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610072883.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-20
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing methods for controlling the head of humanoid robots rely on large-scale manually labeled data, resulting in high training costs. They lack the ability to adapt to complex and ever-changing interactive scenarios, have insufficient continuity and stability of movements, and lack flexibility and diversity, making it difficult to achieve natural and real-time facial expressions.

Method used

We employ a deep reinforcement learning-based embodied machine head and face motion control method. By constructing a deep learning network for facial image segmentation and a self-supervised facial expression control model, and combining an encoder-decoder network and a self-supervised learning strategy, we achieve end-to-end expression feature mapping and motor control, reducing reliance on manual annotation and utilizing unlabeled data for continuous learning and adaptive updates.

Benefits of technology

It improves the naturalness and anthropomorphism of the robot's head expressions, enhances the realism and coherence of human interaction, reduces data annotation costs, and improves the model's generalization ability and long-term autonomous learning ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123129117A_ABST
    Figure CN123129117A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on deep reinforcement learning's embodied machine head face movement control method and equipment, through face image segmentation method and self-supervised learning method, face space representation and cross-frame dynamics representation are extracted simultaneously, combined with reinforcement learning training strategy, research and explore a kind of based on deep reinforcement learning's humanoid robot head control method.The input is the expression features provided by an external LLM model and the current state of the robot, and the output is the motor control instruction for driving the robot head and facial actuator.It improves the naturalness and humanization of the humanoid robot head motion, especially the robot head motion can more accurately mimic human facial features, enhancing the realism and coherence when interacting with humans.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence, specifically to a method and device for controlling the head and face motion of an embodied machine based on deep reinforcement learning. Background Technology

[0002] Humanoid robot head control methods refer to the technology of collecting external information through sensors and combining it with control algorithms to drive the robot's head actuators, thereby enabling actions such as rotation, nodding, shaking, and gazing. This method not only simulates natural human communication behavior but also enhances the anthropomorphism of robots in scenarios such as voice interaction, emotional expression, and environmental perception. Through proper head control, robots can demonstrate attention, responsiveness, and interactive intentions, thus enhancing communication with humans. This approach has wide applications in service robots, educational companionship, medical assistance, and human-computer interaction research.

[0003] With the development of neural networks, deep learning-based methods have been widely applied to humanoid robot head control, leveraging the powerful fitting capabilities of neural networks to achieve good results. Existing research primarily employs deep learning-based pose estimation and motion mapping methods, achieving automatic mapping from input signals to head movements through end-to-end model training. These methods can learn complex nonlinear relationships driven by large-scale data, exhibiting strong adaptability and generalization capabilities. In multimodal interaction scenarios, deep learning methods enable robots to generate more natural and coherent head movements based on changes in the environment and human behavior, significantly improving the intelligence and anthropomorphism of the interaction. However, current humanoid robot head control methods suffer from the following problems.

[0004] First, deep learning models typically rely on large-scale manually labeled data, resulting in high training costs and difficulty in covering complex and ever-changing interaction scenarios. Traditional deep learning methods tend to focus on static mapping relationships, lacking consideration for long-term interaction feedback between the robot and its environment. This leads to insufficient continuity and stability in the generated actions, and the coordinated control of multi-degree-of-freedom head joints still faces significant challenges, easily resulting in unnatural movements, delayed responses, or over-reliance on offline-trained models. Therefore, research into more natural, real-time, and adaptive robot head control methods is of significant practical importance.

[0005] Furthermore, existing technologies for head control often rely on mapping input signals to pre-set fixed actions or trajectory libraries. While this approach can achieve robot head movement to some extent, it lacks flexibility and diversity, making it difficult to dynamically adjust to subtle changes in the real-time interactive environment and human behavior. These fixed actions often appear stiff and formulaic, lacking natural transitions and emotional expression, and are insufficient to support a high-level human-computer interaction experience. Summary of the Invention

[0006] To improve the naturalness and anthropomorphism of humanoid robot head movements, particularly to more accurately mimic human facial features and enhance the realism and coherence of human interaction, this invention proposes a method and device for controlling embodied robot head and facial motion based on deep reinforcement learning. The method takes as input facial expression features and the robot's current state provided by an external LLM model, and outputs motor control commands to drive the robot's head and facial actuators.

[0007] The embodied robot head and face motion control method based on deep reinforcement learning of the present invention includes the following steps:

[0008] Step S1: Construct a deep learning network for facial image segmentation to divide the acquired facial images into regions, dividing the face into upper and lower halves, in order to extract spatial features of different regions.

[0009] Step S2: Collect a dataset of facial images from multiple people, from multiple angles, and with multiple expressions. Use the facial image dataset to train the deep learning network constructed in Step S1 to obtain a facial segmentation model.

[0010] Step S3: Use the facial segmentation model obtained in step S2 to divide the facial image dataset into upper and lower facial images, and combine the upper and lower halves of different individuals' faces to achieve data augmentation.

[0011] Step S4: Construct a self-supervised facial expression control model based on a CNN network. This network includes a feature encoder, a feature fusion layer, and an action generation module. The input of the feature encoder is the current facial state of the robot captured by m external cameras and the facial dataset processed in step S3. The output is the encoded n sets of facial spatial representations and temporal dynamic representations. The number of action generation modules is n. The input data of each action generation module is the spatial representation and temporal representation output by the feature encoder. The output is the control signal that drives each motor of the robot's face, where m is greater than or equal to 1 and n is greater than or equal to 1.

[0012] Step S5: Use the facial images enhanced by facial combination in step S3 to train the self-supervised model constructed in step S4.

[0013] Step S6: Construct a deep learning network for facial expression judgment. This network includes a text emotion judgment subnetwork and a facial expression judgment subnetwork. The text emotion judgment network performs semantic analysis on the generated text based on an external large language model and outputs a text emotion label. The facial expression judgment network takes real-time facial images of the conversation partners captured by a camera as input data and outputs an emotion category label.

[0014] Step S7: Train the facial expression judgment sub-network constructed in step S6 using the facial expression dataset processed in step S3.

[0015] Step S8: Using the model trained in step S7, combined with the text-based emotional expressions generated by LLM, perform expression judgment and input the judgment result into the self-supervised facial expression control model constructed in step S5 to generate corresponding motor drive signals, thereby realizing real-time control of the robot's head expressions.

[0016] Furthermore, the facial image segmentation deep learning network U-Net includes an encoder-decoder network and a feature fusion module. The encoder stage takes the original facial image as input and extracts features using convolutional and pooling layers. The decoder stage takes the output of the encoder as input, recovers spatial resolution layer by layer using deconvolution and upsampling, and fuses the encoded and decoded features of corresponding layers using skip connections to preserve local details. The feature fusion module fuses the feature images generated by different layers. The feature fusion layer connects the encoder and decoder modules, and all feature fusion layers are vertically connected. The output of the last feature fusion layer is used as the extracted facial segmentation mask, which includes two categories: the upper half of the face and the lower half of the face.

[0017] Furthermore, step S1 employs a feature fusion module to fuse the output of the convolutional layer before each pooling layer of the encoding network with the output of the final convolutional layer of the corresponding decoding network; in step S1, the encoding-decoding network uses pooling indexes to preserve feature details.

[0018] Furthermore, the specific process of step S2 is as follows:

[0019] S2-1 uses N samples for training, where each sample contains an original facial image and its corresponding region annotation information. Represents the c-th image. The region annotation information representing the image can be described as follows: The fused image features obtained from steps S1-3 can be expressed as follows:

[0020]

[0021] in, The facial image features are extracted through an encoder-decoder network and a feature fusion module. The fused feature map;

[0022] S2-2, calculate the cross-entropy loss using the fused image features and real image labels obtained in the previous step; the parameters of each encoding, decoding, and fusion layer are initialized using a random method during network training. Let... These are the parameter weights in the network. It is to fuse feature maps at the pixel level The output value, For pixels The true label, This indicates the probability that the model predicts the pixel belongs to the corresponding category. Therefore, for each pixel... The cross-entropy loss can be expressed as:

[0023]

[0024] in, This indicates the number of categories, namely, the upper half of the face and the lower half of the face.

[0025] The total loss of the entire image is the average of the losses of each pixel:

[0026]

[0027] in, and These represent the height and width of the image, respectively.

[0028] Furthermore, the specific process of step 3 is as follows:

[0029] S3-1, Facial Image Dataset The data is input into the facial segmentation model constructed in step S2 to obtain the upper and lower half-face segmentation mask for each image. and And the fused features are extracted through an encoder-decoder network and a feature fusion module:

[0030]

[0031] S3-2, extract the upper half of the face from each image. With the lower half of the face Extracted from the segmentation mask:

[0032]

[0033] in, This demonstrates pixel-level masking operations.

[0034] S3-3, randomly combine the upper and lower halves of the face of different individuals to generate... An enhanced fused image:

[0035]

[0036] in, This means stitching the upper and lower halves of the face together to create a complete facial image. For the generated enhanced samples.

[0037] Furthermore, the specific process of step S4 is as follows:

[0038] S4-1, Construct a self-supervised facial expression control model based on a convolutional neural network (CNN). This model includes a feature encoder. Used to extract facial spatial features and temporal dynamic features; feature fusion layer Used to fuse features from different sources and levels; Action generation module It is used to generate control signals for each motor on the robot's face.

[0039] S4-2, the input of the feature encoder is Group data ,in Indicates the first The robot's current facial state is captured by external cameras; the encoder output is... Group fusion features ,in For the first Group facial spatial representation, For the first Group temporal dynamic representation; the feature fusion layer fuses the spatial and temporal representations of different groups:

[0040]

[0041] S4-3, Each Action Generation Module The input is the fused features The output is the control signal that drives the motors on the robot's face. The robot's facial actuators are directly controlled to achieve corresponding facial expressions. The entire model is optimized through a self-supervised training method, using the facial state captured by the robot's own camera and the dataset generated in step S3 for error backpropagation. No manual annotation is required, which improves the model's generalization ability and the naturalness of expressions.

[0042] Furthermore, the specific process of step S5 is as follows:

[0043] S5-1: Input m enhanced facial images and their facial states into the feature encoder to obtain m spatial representations and m temporal representations. After passing through the feature fusion layer, m fused features are obtained and input into the action generation module. The output is m*n motor control signals, where n is the actual number of motors controlled.

[0044] S5-2, calculate the self-supervised loss using the results from the previous step, and iteratively update the parameters using gradient descent until the loss converges. The specific loss calculation formula is as follows:

[0045]

[0046] Furthermore, the specific process of step S6 is as follows:

[0047] S6-1, Construct a facial expression judgment subnetwork, input m acquired facial images into a convolutional neural network encoder, and extract m spatial feature representations. The m sequence features are input into the time series modeling module to obtain m time series dynamic features. The m sets of spatial and temporal features are input into the classification layer to calculate the facial expression categories:

[0048]

[0049] S6-2, output the n text sentiment labels from the LLM model. The m*n sets of facial image labels are input into a fusion function, and weighted summaries are used to obtain m*n sets of expression category classification results:

[0050]

[0051] in, , These are the probability distributions of the two sub-networks, These are the weighting coefficients.

[0052] Furthermore, the specific process of step S7 is as follows:

[0053] S7-1, the result obtained in step S3 An enhanced facial image is used as input to train a facial expression judgment sub-network. This sub-network then passes through a facial expression judgment encoding network to generate... One extracted feature vector;

[0054] S7-2, input the feature vector generated in the previous step into the classification layer, use the cross-entropy loss function as the optimization objective, and use stochastic gradient descent to iteratively update the cross-entropy loss:

[0055]

[0056] in, Indicates the first Each sample is predicted to be of category [class]. The probability, This is an indicator function.

[0057] Furthermore, the specific process of step S8 is as follows:

[0058] S8-1, Input the n facial images captured by the external camera and the corresponding text emotion labels from the n LLMs into the facial expression judgment neural network model constructed in step S7 to obtain the determined emotion category. ;

[0059] S8-2, the final emotion category will be determined. The input is fed into the self-supervised facial expression control model constructed in step S5 to generate motion vectors, which are then sent to the robot's head motor assembly to realize facial expression generation on the robot's head.

[0060] Based on the same inventive concept, the present invention also designs an electronic device, which is characterized by comprising:

[0061] One or more processors;

[0062] Storage device for storing one or more programs;

[0063] When one or more programs are executed by the one or more processors, the one or more processors implement the deep reinforcement learning-based embodied machine head and face motion control method as described above.

[0064] Based on the same inventive concept, the present invention also designs a computer-readable medium storing a computer program, wherein the program, when executed by a processor, implements the embodied machine head and face motion control method based on deep reinforcement learning as described above.

[0065] Advantages of this invention:

[0066] 1. This invention innovatively employs an encoder-decoder network to achieve end-to-end mapping from raw facial expression image data to motor drive parameters. By introducing an encoder to perform multi-scale abstract representation of facial expression features and utilizing a decoder to achieve high-resolution facial expression reconstruction and mapping, the model can maintain robustness in complex environments, reduce feature loss, and ensure the naturalness and consistency of the robot's facial expression output.

[0067] 2. This invention innovatively constructs a U-Net deep learning network architecture for facial segmentation, modeling the upper half of the face (eyebrows, eyes, etc.) and the lower half (lips, jaw, etc.) separately. This structure can effectively separate the facial expression dynamics of different regions, improve the accuracy of capturing local features, and achieve global-local information fusion through cross-layer feature concatenation in the decoding stage, thereby enabling the robot to display more delicate and coordinated facial expressions.

[0068] 3. This invention innovatively employs a self-supervised learning training strategy, eliminating the need for large-scale manually labeled facial expression data. Instead, it optimizes the model through pseudo-label generation and minimizing reconstruction errors. This strategy significantly reduces data labeling costs and enables continuous learning and adaptive updates using unlabeled real-world interaction data, thereby enhancing the robot's generalization ability and long-term autonomous learning capabilities in real-world environments.

[0069] 4. This invention innovatively combines the output of a large language model with facial images captured by a camera to generate and judge facial expressions, achieving joint reasoning of multimodal emotions. By fusing textual semantic emotion tags with visual expression recognition results, it can more accurately determine the true emotional state of the interactive object, reducing ambiguity and misjudgment caused by a single modality, thereby significantly improving the accuracy of robot head expression control and the naturalness of human-computer interaction. Attached Figure Description

[0070] Figure 1 This is a schematic diagram of facial image segmentation according to the present invention.

[0071] Figure 2 This is a neural network architecture diagram of the self-supervised facial expression control model of the present invention.

[0072] Figure 3 This is a neural network architecture diagram of the facial expression judgment model of the present invention.

[0073] Figure 4 This is a schematic diagram of the head motor architecture of the present invention. Detailed Implementation

[0074] To facilitate understanding and implementation of the present invention by those skilled in the art, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0075] The method provided in this invention designs a head and face motion control method for embodied machines based on deep reinforcement learning, which includes the following steps:

[0076] Step S1: Construct a deep learning network for facial image segmentation to divide the acquired facial images into regions, separating the face into upper and lower halves, in order to extract spatial features of different regions. This network is an improved U-Net network. Building upon the existing U-Net network structure, which employs a symmetrical encoder-decoder architecture, extracts multi-scale features through layer-by-layer convolution and downsampling, restores resolution through layer-by-layer upsampling during decoding, and uses skip connections to concatenate shallow and deep features, this network incorporates a multi-level feature fusion module between the encoder and decoder networks. This module not only performs skip connections between corresponding layers but also achieves cross-layer feature aggregation in the vertical direction to enhance the fusion of global and local information. Furthermore, index information is preserved during pooling, enabling more accurate recovery of spatial details in facial images during decoding. To meet the real-time requirements of robotic embedded platforms, the network size is optimized, keeping the number of parameters between 8M and 15M, ensuring efficient operation in resource-constrained environments. The network comprises an encoder network, a decoder network, and a feature fusion module. The encoder network extracts spatial detail features from facial images layer by layer, the decoder network progressively restores image size and outputs segmented regions, and the feature fusion module combines feature maps from different layers to improve segmentation accuracy. The specific implementation process is described below:

[0077] S1-1: The input facial image is fed into the encoding network, which contains multiple convolutional and pooling layers. Through layer-by-layer convolution and downsampling, spatial features at different scales are extracted. At the same time, before the pooling operation, the corresponding convolutional layer output is recorded and passed to the concat connection layer in the decoding stage to preserve local detail features.

[0078] In S1-2, during the decoding stage, the recorded pooling index is used to perform layer-by-layer upsampling and deconvolution operations to gradually restore the spatial resolution of the image. The decoding network and the encoding network correspond one-to-one, forming a symmetrical structure. Each upsampling is concat-fused with the feature map corresponding to the encoding stage.

[0079] S1-3 involves sequentially convolving and compressing the multiple fusion layers obtained in the decoding stage to obtain the segmentation results of the upper and lower halves of the face, and outputting the corresponding region feature maps.

[0080] Preferably, the convolutional layer uses a 3×3 convolutional kernel, and the upsampling uses a 2×2 deconvolutional kernel; the output layer uses a 1×1 convolutional kernel to generate the final segmentation map.

[0081] Preferably, the number of network parameters is between 8M and 15M, and more preferably about 12M, to ensure real-time processing performance on the embedded control chip.

[0082] Step S2 involves training the facial image segmentation network constructed in Step S1 using a dataset of collected facial images from multiple people, from multiple angles, and with multiple expressions. This yields a facial segmentation model capable of accurately distinguishing between the upper and lower face regions. The specific implementation process is as follows:

[0083] S2-1 uses N samples for training, where each sample contains an original facial image and its corresponding region annotation information. Represents the c-th image. The region annotation information representing the image can be described as follows: The fused image features obtained from steps S1-3 can be expressed as follows:

[0084]

[0085] in, To represent the mapping function of the encoder-decoder network and the feature fusion module, The fused feature map;

[0086] S2-2, calculate the cross-entropy loss based on the fused image features and the real image labels; let... These are the parameter weights in the network. It is to fuse feature maps at the pixel level The output value, For pixels The true label, then for pixels The cross-entropy loss can be expressed as:

[0087]

[0088] in, =2 indicates the number of categories, namely the upper half of the face and the lower half of the face.

[0089] The total loss of the entire image is the average of the losses of each pixel:

[0090]

[0091] Preferably, in this embodiment, training uses randomly initialized network weights, a batch size of 32, a learning rate of 0.001, and iterative training using the Adam optimizer.

[0092] Step S3 involves using the facial segmentation model trained in Step S2 to divide the facial image dataset into upper and lower face regions. Then, by randomly combining the upper and lower face regions from different individuals, an enhanced facial image dataset is generated to improve the diversity and robustness of the model training. The specific implementation process is as follows:

[0093] S3-1, Facial Image Dataset The data is input into the facial segmentation model constructed in step S2 to obtain the upper and lower half-face segmentation mask for each image. and And the fused features are extracted through an encoder-decoder network and a feature fusion module:

[0094]

[0095] S3-2, extract the upper half of the face from each image. With the lower half of the face Extracted from the segmentation mask:

[0096]

[0097] in, This indicates a mask operation based on pixels;

[0098] S3-3, randomly combine the upper and lower halves of the face of different individuals to generate... An enhanced fused image:

[0099]

[0100] in, This means directly stitching together the images of the upper and lower halves of the face to create a complete facial image. For the generated enhanced samples.

[0101] Preferably, the original dataset contains N ≥ 1000 images, and the number of augmented samples i ≥ 5N is generated to ensure the diversity of the training data.

[0102] Preferably, the random combination of the upper and lower halves of the face adopts a uniform random selection strategy to ensure that the facial regions of each individual appear with similar frequency in the enhanced samples.

[0103] Preferably, the size of the generated enhanced image is the same as that of the original image, which facilitates subsequent input into the self-supervised facial expression control model.

[0104] Step S4 involves constructing a self-supervised facial expression control model based on a convolutional neural network (CNN). This model extracts spatial and temporal dynamic features of the face and maps them to motor control signals that drive the robot's facial actuators, thereby achieving natural generation of facial expressions on the robot's head. The specific implementation process is as follows:

[0105] S4-1, Construct a self-supervised facial expression control model based on a convolutional neural network (CNN). This model includes a feature encoder capable of simultaneously extracting spatial and temporal features. The preferred approach is to employ a structure combining convolutional neural networks with temporal modeling units (such as one-dimensional convolution, temporal convolutional networks TCN, or long short-term memory networks LSTM) to extract facial spatial and temporal dynamic features, ensuring that the output reflects the continuous changes in facial expressions over time; feature fusion layer Used to fuse features from different sources and levels; Action generation module It is used to generate control signals for each motor on the robot's face.

[0106] S4-2, the input of the feature encoder is Group data ,in Indicates the first The robot's current facial state is captured by a set of external cameras. This represents the generated enhanced facial image; the encoder output is... Group fusion features ,in For the first Group facial spatial representation, For the first The feature fusion layer employs a concatenation and weighted mapping approach, first concatenating spatial and temporal features along the feature dimension, and then weighting them through a fully connected layer with trainable weight parameters to obtain the final fused feature representation. :

[0107]

[0108] S4-3, Each Action Generation Module The input is the fused features The output is the control signal that drives the motors on the robot's face. The dimensions are matched to the actual number of facial motors on the robot, and the output values ​​are mapped to the PWM drive signal range through a normalization function to directly control the robot's facial actuators and achieve corresponding facial expressions. The entire model is optimized through a self-supervised training method. Specifically, firstly, the enhanced data generated in step S3 drives the model to output motor control signals, and the robot's own camera captures the facial state after execution. Then, this captured state is compared with a reference image to calculate the reconstruction loss (mean squared error, MSE). Finally, this loss is used as a feedback signal to iteratively update the parameters of the feature encoder, feature fusion layer, and action generation module through backpropagation and an optimizer, thereby achieving data-driven optimization without manual annotation, improving the model's generalization ability and the naturalness of expressions. This eliminates the need for manual annotation, thus improving the model's generalization ability and the naturalness of expressions.

[0109] Preferably, m ≥ 5, ensuring that each training input contains enough historical facial states to capture temporal dynamic features.

[0110] Preferably, the dimension of the output signal of the action generation module matches the actual number of motors, with each module typically corresponding to 20 motors; training uses the Adam optimizer with a learning rate of 0.001, a batch size of m=16, and iterates until the loss converges.

[0111] Step S5: Using the enhanced facial image dataset generated in step S3, train the self-supervised facial expression control model constructed in step S4 to optimize the motor control signals of the motion generation module and improve the accuracy and naturalness of facial expression generation. The specific implementation process is as follows:

[0112] In step S5-1, m enhanced facial images and their corresponding current robot facial states are input into the feature encoder of step S4 to obtain m spatial representations and m temporal dynamic representations. The spatial representations are derived from the convolutional features of a single frame image, while the temporal dynamic representations are obtained by organizing the enhanced images and continuously acquired state images of the robot into an input sequence and introducing a temporal modeling unit (LSTM neural network) into the encoder to extract cross-frame change features. After passing through the feature fusion layer, m fused features are generated and input into n motion generation modules, and the output is m×n robot facial motor control signals, where n is the actual number of motors controlled.

[0113] S5-2, the motor control signal obtained in step S5-1 is used to perform self-supervised loss calculation with the robot's current facial state. The parameters of the feature encoder, feature fusion layer, and action generation module are iteratively updated using gradient descent until the loss converges, thereby optimizing model performance. The loss function is:

[0114]

[0115] in, This is the robot's current facial state. This is the facial state captured after the robot performs the operation.

[0116] Preferably, m ≥ 8 and n ≥ 20 to ensure the number of training samples and the coverage of motor control. The motion generation module adopts a fully connected layer, and the output signal range is normalized according to the PWM signal.

[0117] Preferably, the Adam optimizer is used, with a learning rate of 0.001, a training batch size of m=16, and an iteration count of epochs=100.

[0118] Step S6 involves constructing a deep learning network for facial expression recognition. By fusing facial images captured by a camera with the textual emotion output of a large language model, the network accurately identifies the expression category, providing a reference for robot facial expression generation. The specific implementation process is as follows:

[0119] S6-1, construct a facial expression judgment sub-network, input m acquired facial images into a convolutional neural network encoder to extract m spatial feature representations; then input the m sequence features into the temporal modeling module to obtain m temporal dynamic features; input the spatial features and temporal features into the classification layer, and calculate the facial expression category through a fully connected layer and a softmax layer;

[0120] S6-2: Input the n text emotion labels generated by the external large language model and the m sets of facial image prediction labels into the fusion function, and perform weighted fusion with a weight coefficient a=0.2 to obtain the final m*n sets of expression categories.

[0121] Step S7: Using the enhanced facial image dataset generated in step S3, train the facial expression judgment sub-network constructed in step S6 to improve the accuracy and generalization ability of expression classification. The specific implementation process is as follows:

[0122] S7-1, the i enhanced facial images obtained in step S3 are used as the input of the encoder of the facial expression judgment sub-network. The feature vector of each image is extracted and its dimension h is set to 128 to fully represent the spatial and temporal information.

[0123] S7-2, Input the feature vector generated in step S7-1 into the classification layer and use the cross-entropy loss function as the optimization objective.

[0124] Step S8: The facial expression judgment result is combined with the self-supervised facial expression control model to achieve real-time facial expression control of the robot's head through a reinforcement learning mechanism. The specific implementation process is as follows:

[0125] S8-1: Input the robot's facial images captured by n external cameras and the corresponding n LLM output text emotion labels into the facial expression judgment neural network trained in step S7. Take the robot's facial expression state captured by the camera and the judged emotion category as the state, take the generated motor control signal as the action, get the reward by calculating the naturalness of the expression, and iteratively update the model parameters to continuously improve the naturalness and interactive adaptability of the robot's facial expression output, and finally obtain the judged emotion category.

[0126] S8-2, the final determined emotion category is input into the self-supervised facial expression control model constructed in step S5 to generate motion vectors, which correspond to the 20 motors driving the robot's head, thereby realizing the generation of facial expressions on the robot's head.

[0127] This method achieves efficient data augmentation by constructing and training a facial image segmentation neural network. It combines self-supervised learning with an encoder-decoder network structure and incorporates the multimodal output of a large language model, thereby significantly improving the accuracy of robot head expression control and the naturalness of human-computer interaction. This invention uses the feedback from the robot's head movements as reward signals; the motor drive signals output by the model as actions; and the input visual and textual emotional information as states. Through iterative deep reinforcement learning strategies, the motor control parameters are continuously optimized, making the robot's facial expressions more natural, coherent, and consistent with emotional expression. Therefore, this invention does not rely solely on supervised learning but achieves continuous adaptive adjustment of the robot in real-world interaction scenarios through reinforcement learning strategy optimization.

[0128] Example 2

[0129] Based on the same inventive concept, the present invention also designs an electronic device, which is characterized by comprising:

[0130] One or more processors;

[0131] Storage device for storing one or more programs;

[0132] When one or more programs are executed by the one or more processors, the one or more processors implement the humanoid robot head control method based on deep reinforcement learning as described above.

[0133] Since the electronic device described in Embodiment 2 of this invention implements the embodied robot head and face motion control method based on deep reinforcement learning in Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this electronic device based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All electronic devices used in any method of this invention's embodiments fall within the scope of protection of this invention.

[0134] Example 3

[0135] Based on the same inventive concept, the present invention also designs a computer-readable medium storing a computer program, wherein the program, when executed by a processor, implements the humanoid robot head control method based on deep reinforcement learning as described above.

[0136] Since the computer-readable medium described in Embodiment 3 of this invention is for implementing the embodied robot head and face motion control method based on deep reinforcement learning in Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of the electronic device based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All computer-readable media used in any method of this invention are within the scope of protection of this invention.

[0137] The specific embodiments described herein are merely illustrative of the spirit of the invention. Those skilled in the art to which this invention pertains may make various modifications or additions to the described specific embodiments or use similar methods to substitute them, without departing from the spirit of the invention or exceeding the scope defined by the appended claims.

Claims

1. A method for controlling the head and face motion of an embodied machine based on deep reinforcement learning, characterized in that, Includes the following steps: Construct and train a deep learning network for facial image segmentation to segment an input facial image into upper and lower face regions; The trained segmentation model is used to segment the upper and lower halves of a multi-expression facial image dataset, and the segments are randomly combined to generate an augmented dataset. A self-supervised facial expression control model is constructed, including a feature encoder, a feature fusion layer, and multiple motion generation modules, which are used to generate control signals for the robot's facial motors based on the input facial state and enhanced image; The self-supervised facial expression control model is trained using the enhanced facial image dataset. A facial expression judgment network is constructed, including a text emotion judgment subnetwork and a facial expression judgment subnetwork, to fuse text emotion labels and visual expression recognition results; The facial expression judgment subnetwork was trained using the enhanced facial image dataset; The real-time acquired facial images and the text emotion labels output by the external large language model are input into the trained facial expression judgment network to obtain the emotion category judgment result, which is then input into the trained self-supervised facial expression control model to generate motor drive signals to control the robot's head expression.

2. The method according to claim 1, characterized in that: The deep learning network for facial image segmentation is a U-Net structure, including an encoding network, a decoding network, and a feature fusion module. The encoding network extracts multi-scale features through convolution and pooling, and the decoding network restores image resolution through deconvolution and upsampling, and fuses the features with the corresponding layer features of the encoding network through skip connections. The feature fusion module vertically connects multiple layers of features to output a segmentation mask for the upper and lower halves of the face.

3. The method according to claim 1, characterized in that: In the process of training a deep learning network for facial image segmentation, the cross-entropy loss function is used to calculate the error between the segmentation result and the true label, and the network parameters are optimized by gradient descent.

4. The method according to claim 1, characterized in that: The upper and lower face halves are randomly combined, and the number of enhanced samples generated is no less than 5 times the number of original samples.

5. The method according to claim 1, characterized in that: The feature encoder extracts both spatial and temporal dynamic features simultaneously; the feature fusion layer concatenates and weights the spatial and temporal features; and the motion generation module outputs control signals that match the number of facial motors on the robot.

6. The method according to claim 1, characterized in that: The self-supervised facial expression control model is trained using the enhanced facial image dataset. The training process employs a self-supervised loss function, and the model is optimized by comparing the difference between the robot's facial state after executing the control signal and the desired state.

7. The method according to claim 1, characterized in that: The specific process of the facial expression recognition network includes: The text sentiment judgment subnetwork generates sentiment labels based on the text semantic analysis results output by the large language model; The facial expression judgment subnetwork extracts emotional features from image sequences based on a convolutional neural network and a temporal modeling module; The final emotion category is obtained by weighted fusion of textual and visual emotion probabilities.

8. The method according to claim 1, characterized in that: The emotion category determination result serves as the state input, and the motor control signal serves as the action output. The control parameters are iteratively optimized through reinforcement learning strategies to improve the naturalness of facial expressions and the adaptability of interactions.

9. An electronic device comprising a processor and a storage device, the storage device storing a program, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 8.