Singing mouth shape real-time detection method based on space-time depth feature adaptive decision
Through a detection method based on adaptive decision-making of spatio-temporal depth features, using YOLOv8, capsule network and BiLSTM network, combined with the love evolutionary algorithm to optimize the random forest algorithm, real-time detection of singing mouth shapes is achieved, which solves the subjectivity of mouth shape detection in the existing technology. It solves the problems of safety, accuracy and real-time and improves the detection efficiency and accuracy.
Patent Information
- Application Number
- CN202410717659.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-06-04
AI Technical Summary
Existing singing mouth shape detection methods are highly subjective, have high requirements on image quality and lighting conditions, high equipment costs and real-time detection limitations, making it difficult to provide accurate and efficient mouth shape change detection.
A real-time singing mouth shape detection method based on adaptive decision-making of spatio-temporal depth features is adopted. Mouth shape target detection is performed through the YOLOv8 network. The capsule network and BiLSTM network are combined to extract spatial depth features, and the love evolution algorithm is used to optimize the random forest algorithm for adaptive decision classification. , to achieve real-time detection of the singer’s mouth shape.
It improves the objectivity and efficiency of singing mouth shape detection, provides more accurate mouth shape change detection results, is suitable for auxiliary judgment in singing teaching, and improves the singer's singing level and stage performance.
Smart Images

Figure CN118736641A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of face recognition, in particular to a real-time singing lip shape detection method based on spatiotemporal depth feature adaptive decision making. Background Art
[0002] Singing is an art form, and its vocal skills and performance methods are crucial to the singer's expressiveness and musical communication. During the singing process, changes in the mouth shape will directly affect the resonance, timbre and pitch of the sound. Therefore, accurate detection and evaluation of singing vocal mouth shape will help singers better master vocal skills and improve their singing level. At the same time, in vocal teaching, teachers usually need to observe and guide students' vocal mouth shape. Singing vocal mouth shape detection technology can provide teachers with objective and accurate evaluation basis, helping them better guide students to practice vocalization. Therefore, singing vocal mouth shape detection has important application value and practical significance in music research and teaching.
[0003] At present, the existing methods for singing lip shape detection are mainly divided into three methods: manual observation, traditional image feature extraction and recognition, and instrument-assisted detection:
[0004] Manual observation is the most traditional and direct method, which requires professional vocal teachers or judges to observe with their naked eyes to evaluate the singer's lip shape. Although this method can intuitively capture subtle changes, it is highly subjective, easily affected by the observer's experience and fatigue, and cannot provide quantitative data.
[0005] Traditional image feature extraction and recognition methods use the singer's video or image to extract lip shape features, such as lip shape and opening degree, and then use traditional image processing methods to identify and analyze these features to determine whether the singer's lip shape is correct. Although this method can provide relatively objective and quantitative evaluation results and reduce the influence of human factors, it has high requirements on image quality and lighting conditions, and the accuracy and robustness of the algorithm still need to be further improved.
[0006] The third method is to use instrument-assisted detection, which usually uses special instruments or equipment to detect the singer's lip shape, such as using optical sensors, pressure sensors, etc. to measure the movement and strength of the lips. Although these instruments can provide accurate measurement data and help to more accurately evaluate the singer's lip shape, the equipment cost is high, the operation may be relatively complicated, and there may be certain limitations for real-time detection. Summary of the invention
[0007] The present invention proposes a real-time singing lip shape detection method based on spatiotemporal depth feature adaptive decision-making, which can detect the changes in the singer's lip shape during singing in real time. Compared with the manual method, it has more objective standards and higher efficiency. It can be used as an auxiliary tool for lip shape detection during singing practice, and can be used to assist in judging whether the singer's lip shape is standard in singing teaching, thereby improving the singer's singing level and stage expression.
[0008] The present invention adopts the following technical solutions.
[0009] The method for real-time detection of singing lip shape based on adaptive decision-making of spatiotemporal depth features comprises the following steps:
[0010] Step S1, collecting a singer's face video image, and annotating the image according to the actual lip shape of the singer, to construct a sample data set for model training and testing;
[0011] Step S2: construct a real-time detection network for singing lip shape targets based on YOLOv8 to segment the singing lip shape images from the face video;
[0012] Step S3, constructing a lip shape spatial depth feature extraction model based on a capsule network, inputting a series of extracted spatial depth features into a BiLSTM network, and further extracting time series features of the lip shape image through the BiLSTM network;
[0013] Step S4, using the love evolution algorithm to optimize the hyperparameters of the random forest algorithm, mapping the extracted time series features to the high-dimensional space of the random forest for adaptive decision classification;
[0014] Step S5: Use the training set and validation set in the sample data set to train the model, and use the test set in the sample data set to test the model and analyze the results.
[0015] The method of step S1 is specifically as follows: singers of different age groups and different genders are selected as collection objects, with the number of people being no less than 300. In order to ensure the robustness of the model, the same shooting equipment is used to collect videos in three time periods: morning, noon and evening. The collected videos are extracted according to continuous time series, and collected according to the mouth shape classification of vertical mouth, round mouth, pointed mouth, open mouth, closed mouth and smiling. No less than 6,000 continuous time series are extracted for each mouth shape, and these images are divided into training set, verification set and test set in a ratio of 8:1:1.
[0016] In step S2, the collected continuous time series image of the face of the singing person is subjected to lip shape detection; in step S2, a real-time detection network for singing lip shape target based on YOLOv8 is first constructed, and then the face image of the singing person is detected and segmented to effectively perform real-time detection of the lip shape, and the lip shape image of the singing person is segmented from the face video as the input of the model in the subsequent steps;
[0017] The network structure of YOLOv8 is as follows Figure 1 As shown in the figure, it consists of three parts: Backbone, Neck, and Head. Backbone is responsible for extracting high-level semantic features from the input image. It contains multiple convolutional layers and pooling layers, and builds a deep feature extractor to convert the image into a feature representation with rich semantic information.
[0018] Neck is used to further integrate and adjust the features extracted by Backbone. By fusing features at different levels, the network's ability to perceive the target is improved. The Neck structure consists of a series of convolutional layers and upsampling layers, which are used to fuse low-level feature maps with high-level feature maps to provide more global and local feature information, thereby helping to capture the details and contextual relationships of the target and improve the accuracy of target detection.
[0019] Head is the last layer of the YOLOv8 model. In the object detection task, the bounding box regressor and classifier are used to output the bounding box position and category information of the object;
[0020] The calculation method of the training loss of the singing lip shape image real-time detection and segmentation network model based on YOLOv8 is as follows:
[0021] The loss function of YOLOv8 includes the rectangular box loss rect / box_loss and the classification loss cls_loss. The total loss function is the sum of the two with their respective weight coefficients. The calculation formula is shown in formula (1).
[0022] Loss = a × L obj +b×L rect +c×L cls (1)
[0023] Among them, a, b, c are the weight coefficients of each loss, and the sum of the three is equal to 1;
[0024] The classification loss and confidence loss are calculated using BCEWithLogitsLoss, and the rectangular box loss is calculated using CIoU_Loss function + Distribution Focal Loss. The calculation method is shown in formula (2).
[0025]
[0026] b and b in the formula gt Represents the center point of the prediction box and the center point of the gt box, ρ 2 () represents the Euclidean distance, c is the length of the diagonal of the smallest rectangle containing the two boxes;
[0027] If A is the real box and B is the predicted box, the IoU calculation formula is as shown in formula (3).
[0028]
[0029] DFL loss: DFL optimizes the probabilities of the two positions closest to label y in the form of cross entropy, so that the network can focus on the distribution of the target position and the surrounding area more quickly.
[0030] The category loss is calculated by using the category score of the predicted box and the one-hot performance of the true box, as shown in formula (4).
[0031]
[0032] In step S3, a capsule network is used to increase the attention paid to the position feature information of the lip sync;
[0033] The capsule network includes convolutional layers, initial capsules and digital capsules. The structure is as follows Figure 3 As shown in the figure. The convolution structure is used for feature extraction in the capsule network. The convolution layer in the capsule network extracts local features in the image by performing convolution operations on the input data. During the convolution process, each convolution kernel slides on different positions of the input data and shares the same weight parameters.
[0034] The initial capsule is the initial layer in the capsule network, which is responsible for extracting low-level local features from the input lip shape image or video. The features include edges, corners, and textures for subsequent lip shape recognition. The initial capsule captures these features through a set of learnable weight parameters and bias parameters, and encodes these features into the capsule's output vector. The capsule's output vector represents the presence or absence of the feature, as well as the spatial information and directionality of the feature, and is used to capture the shape and dynamic changes of the lips in lip shape detection.
[0035] The digital capsule is located in the deeper layer of the capsule network and is responsible for building a higher-level abstract representation from the low-level features extracted by the initial capsule, that is, for capturing more complex lip patterns and structures; by combining and transforming the information from the initial capsule to form a more comprehensive understanding of the lip shape.
[0036] In step S3, the BiLSTM network uses a deep learning method to model and extract features of lip shape changes. By considering the context information of the sequence at the same time, the dynamic changes and contextual relationships in the lip shape time series are more accurately captured, and the deep-level features in the lip shape time series are extracted. The deep-level features include static information of the lip shape and process information of the dynamic changes of the lip shape. The specific method is as follows: the BiLSTM network receives a series of spatial depth features extracted by the capsule network as input and converts them into time series data. Then, the network processes the sequence through the long short-term memory network LSTM layer in both forward and reverse directions; the forward LSTM layer encodes from the start position to the end position of the sequence to capture the forward lip shape change information; and the reverse LSTM layer encodes from the end position to the start position of the sequence to capture the backward lip shape change information; the outputs of the LSTM layers in these two directions are spliced together to make full use of the context information in the sequence.
[0037] In step S4, the output of BiLSTM is used as the input variable of the random forest decision tree, and the love evolution algorithm is used to optimize the number of hyperparameter subsets T and the number of features m of the random forest. Finally, the classification results of each decision tree are voted to achieve the function of automatically determining the lip shape category. The specific implementation process includes the following steps:
[0038] Step 1: Build a data set and divide the data into two parts, one part is divided into training data and the other part is divided into test data.
[0039] Step 2: Use random forest to build a model based on the optimization parameters of the love evolution algorithm, and evaluate the performance of the model on the training data as happiness; the evaluation process includes the evaluation of accuracy and loss function value;
[0040] Step 3: Use the bootstrap resampling method to extract T times with replacement from the updated training data set to form T training subsets;
[0041] Step 4: Use the output of BiLSTM as the input variable of the random forest decision tree. The generation of the decision tree is the process of recursively constructing a binary classification tree. At each node of the tree, m features are randomly selected from the M input variables as candidate features. Generally, m takes the root mean square value of M. Then, the optimal feature and the best binary cut point are selected from these m features to split the node, thereby establishing T decision trees and generating a random forest. Step 5: Use the love evolution algorithm to optimize the number of hyperparameter subsets T and the number of features m of the random forest, and generate multiple pairs of spouses for love evaluation.
[0042] Step 6: For spouses whose acceptance is greater than 0.5, break up and enter the reflection stage to continue reflecting and changing their own characteristics until the conditions are met before moving to the next step;
[0043] Step 7: Continue the value and role phase for spouses with low acceptance. If the acceptance is greater than 0.5 at a certain stage, it will go to step 6 to update the features;
[0044] Step 8: Repeat steps 6 and 7 for multiple iterations until the termination condition is met (such as reaching the maximum number of iterations or meeting the preset accuracy requirements);
[0045] Step 9: Based on the lip shape detection and classification results of each decision tree in the optimized random forest, vote to determine the final lip shape category result.
[0046] The detection method is used to assist in judging whether the singer's lip shape is standard in singing teaching.
[0047] The present invention adopts YOLOv8 network to detect lip shape, avoids manual segmentation of lip shape, and greatly improves model efficiency; uses capsule network to extract spatial depth features of input lip shape, can pay attention to the position feature information of lip shape, and is more in line with human cognitive process; and BI-LSTM can effectively extract time series features, improve the real-time detection accuracy of singing vocalization lip shape; uses love evolution algorithm to optimize the hyperparameters of random forest to achieve the best lip shape detection effect. The method of the present invention can detect the changes of singers' lip shape in real time during singing, and has more objective standards and higher efficiency than manual methods. It can be used as an auxiliary tool for lip shape detection during singing practice, and can assist in judging whether the singer's lip shape is standard in singing teaching, so as to improve the singer's singing level and stage performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:
[0049] Attached Figure 1 It is a schematic diagram of the YOLOv8 lip shape detection network structure of the present invention;
[0050] Attached Figure 2 It is a schematic diagram of the network structure of the overall model of the present invention;
[0051] Attached Figure 3 Schematic diagram of the capsule network structure of the present invention;
[0052] Attached Figure 4 It is a schematic diagram of the overall process of the method of the present invention;
[0053] Attached Figure 5Schematic diagram of the training loss of the real-time segmentation network model of singing lip shape images based on YOLOv8 in the present invention;
[0054] Attached Figure 6 It is a schematic diagram of the average training map of the real-time segmentation network model of singing lip shape images based on YOLOv8 in the present invention;
[0055] Attached Figure 7 It is a schematic diagram of the detection structure of the mouth shape target in the present invention. DETAILED DESCRIPTION
[0056] As shown in the figure, the real-time detection method of singing lip shape based on spatiotemporal depth feature adaptive decision-making includes the following steps:
[0057] Step S1, collecting a singer's face video image, and annotating the image according to the actual lip shape of the singer, to construct a sample data set for model training and testing;
[0058] Step S2: construct a real-time detection network for singing lip shape targets based on YOLOv8 to segment the singing lip shape images from the face video;
[0059] Step S3, constructing a lip shape spatial depth feature extraction model based on a capsule network, inputting a series of extracted spatial depth features into a BiLSTM network, and further extracting time series features of the lip shape image through the BiLSTM network;
[0060] Step S4, using the love evolution algorithm to optimize the hyperparameters of the random forest algorithm, mapping the extracted time series features to the high-dimensional space of the random forest for adaptive decision classification;
[0061] Step S5: Use the training set and validation set in the sample data set to train the model, and use the test set in the sample data set to test the model and analyze the results.
[0062] The method of step S1 is specifically as follows: singers of different age groups and different genders are selected as collection objects, with the number of people being no less than 300. In order to ensure the robustness of the model, the same shooting equipment is used to collect videos in three time periods: morning, noon and evening. The collected videos are extracted according to continuous time series, and collected according to the mouth shape classification of vertical mouth, round mouth, pointed mouth, open mouth, closed mouth and smiling. No less than 6,000 continuous time series are extracted for each mouth shape, and these images are divided into training set, verification set and test set in a ratio of 8:1:1.
[0063] In step S2, the collected continuous time series image of the face of the singing person is subjected to lip shape detection; in step S2, a real-time detection network for singing lip shape target based on YOLOv8 is first constructed, and then the face image of the singing person is detected and segmented to effectively perform real-time detection of the lip shape, and the lip shape image of the singing person is segmented from the face video as the input of the model in the subsequent steps;
[0064] The network structure of YOLOv8 is as follows Figure 1 As shown in the figure, it consists of three parts: Backbone, Neck, and Head. Backbone is responsible for extracting high-level semantic features from the input image. It contains multiple convolutional layers and pooling layers, and builds a deep feature extractor to convert the image into a feature representation with rich semantic information.
[0065] Neck is used to further integrate and adjust the features extracted by Backbone. By fusing features at different levels, the network's ability to perceive the target is improved. The Neck structure consists of a series of convolutional layers and upsampling layers, which are used to fuse low-level feature maps with high-level feature maps to provide more global and local feature information, thereby helping to capture the details and contextual relationships of the target and improve the accuracy of target detection.
[0066] Head is the last layer of the YOLOv8 model. In the object detection task, the bounding box regressor and classifier are used to output the bounding box position and category information of the object;
[0067] The calculation method of the training loss of the singing lip shape image real-time detection and segmentation network model based on YOLOv8 is as follows:
[0068] The loss function of YOLOv8 includes rectangular box loss rect / box_loss and classification loss cls_loss as follows Figure 5 As shown in , the total loss function is the sum of the weight coefficients of the two. The calculation formula is shown in formula (1).
[0069] Loss = a × L obj +b×L rect +c×L cls (1)
[0070] Among them, a, b, c are the weight coefficients of each loss, and the sum of the three is equal to 1;
[0071] The classification loss and confidence loss are calculated using BCEWithLogitsLoss, and the rectangular box loss is calculated using CIoU_Loss function + Distribution Focal Loss. The calculation method is shown in formula (2).
[0072]
[0073] b and b in the formula gt Represents the center point of the prediction box and the center point of the gt box, ρ 2 () represents the Euclidean distance, c is the length of the diagonal of the smallest rectangle containing the two boxes;
[0074] If A is the real box and B is the predicted box, the IoU calculation formula is as shown in formula (3).
[0075]
[0076] DFL loss: DFL optimizes the probabilities of the two positions closest to label y in the form of cross entropy, so that the network can focus on the distribution of the target position and the surrounding area more quickly.
[0077] The category loss is calculated by using the category score of the predicted box and the one-hot performance of the true box, as shown in formula (4).
[0078]
[0079] The average map during training is Figure 6 mAP_0.5:0.95 means obtaining multiple mean average precision (mAP) values at different intersection-over-union (IoU) thresholds (from 0.5 to 0.95, with a step size of 0.05) (0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95), and then taking the average of all values.
[0080] In step S3, a capsule network is used to increase the attention paid to the position feature information of the lip sync;
[0081] The capsule network includes convolutional layers, initial capsules and digital capsules. The structure is as follows Figure 3 As shown in the figure. The convolution structure is used for feature extraction in the capsule network. The convolution layer in the capsule network extracts local features in the image by performing convolution operations on the input data. During the convolution process, each convolution kernel slides on different positions of the input data and shares the same weight parameters.
[0082] The initial capsule is the initial layer in the capsule network, which is responsible for extracting low-level local features from the input lip shape image or video. The features include edges, corners, and textures for subsequent lip shape recognition. The initial capsule captures these features through a set of learnable weight parameters and bias parameters, and encodes these features into the capsule's output vector. The capsule's output vector represents the presence or absence of the feature, as well as the spatial information and directionality of the feature, and is used to capture the shape and dynamic changes of the lips in lip shape detection.
[0083] The digital capsule is located in the deeper layer of the capsule network and is responsible for building a higher-level abstract representation from the low-level features extracted by the initial capsule, that is, for capturing more complex lip patterns and structures; by combining and transforming the information from the initial capsule to form a more comprehensive understanding of the lip shape.
[0084] In step S3, the BiLSTM network uses a deep learning method to model and extract features of lip shape changes. By considering the context information of the sequence at the same time, the dynamic changes and contextual relationships in the lip shape time series are more accurately captured, and the deep-level features in the lip shape time series are extracted. The deep-level features include static information of the lip shape and process information of the dynamic changes of the lip shape. The specific method is as follows: the BiLSTM network receives a series of spatial depth features extracted by the capsule network as input and converts them into time series data. Then, the network processes the sequence through the long short-term memory network LSTM layer in both forward and reverse directions; the forward LSTM layer encodes from the start position to the end position of the sequence to capture the forward lip shape change information; and the reverse LSTM layer encodes from the end position to the start position of the sequence to capture the backward lip shape change information; the outputs of the LSTM layers in these two directions are spliced together to make full use of the context information in the sequence.
[0085] In step S4 of this example, an adaptive random forest algorithm based on the love evolution algorithm is used; the random forest (RF) algorithm is composed of a large number of decision trees, and the classification results of all decision trees are voted to determine the final result. The training set used by each tree is resampled by Bootstrap. The training process randomly selects samples and feature attributes, which enhances the diversity and uncertainty of the algorithm. The feature variables of each tree are not exactly the same. Even if some input features are unreliable, it will only affect a small number of decision trees and will not affect the final voting decision effect. Therefore, the algorithm has strong adaptability to data, can directly process high-dimensional data, is less affected by noise and abnormal data, and has high classification accuracy and strong generalization ability.
[0086] Love Evolution Algorithm (LEA) is a new meta-heuristic optimization algorithm inspired by and improved on the stimulus-value-role theory. In LEA, personal characteristics are abstracted as variables, and all characteristics of a person are regarded as a candidate solution, with happiness as the objective function value. LEA includes three stages: stimulus, value, and role. Both parties experience and benefit from these stages, regardless of the outcome of the relationship. In the stimulus stage, both parties are stimulated by their respective appearance, behavior, and personality. The value stage involves the use of convolution to define the convolution operator and determine which couples can enter the role stage. In addition, one of the characteristics of LEA is its unique search operation, including convolution, crossover, and mutation of multiplication and division between variables, which makes it have strong evolutionary ability, fast search speed, and strong optimization ability.
[0087] In step S4, the output of BiLSTM is used as the input variable of the random forest decision tree, and the love evolution algorithm is used to optimize the number of hyperparameter subsets T and the number of features m of the random forest. Finally, the classification results of each decision tree are voted to achieve the function of automatically determining the lip shape category. The specific implementation process includes the following steps:
[0088] Step 1: Build a data set and divide the data into two parts, one part is divided into training data and the other part is divided into test data.
[0089] Step 2: Use random forest to build a model based on the optimization parameters of the love evolution algorithm, and evaluate the performance of the model on the training data as happiness; the evaluation process includes the evaluation of accuracy and loss function value;
[0090] Step 3: Use the bootstrap resampling method to extract T times with replacement from the updated training data set to form T training subsets;
[0091] Step 4: Use the output of BiLSTM as the input variable of the random forest decision tree. The generation of the decision tree is the process of recursively constructing a binary classification tree. At each node of the tree, m features are randomly selected from the M input variables as candidate features. Generally, m takes the root mean square value of M. Then, the optimal feature and the best binary cut point are selected from these m features to split the node, thereby establishing T decision trees and generating a random forest. Step 5: Use the love evolution algorithm to optimize the number of hyperparameter subsets T and the number of features m of the random forest, and generate multiple pairs of spouses for love evaluation.
[0092] Step 6: For spouses whose acceptance is greater than 0.5, break up and enter the reflection stage to continue reflecting and changing their own characteristics until the conditions are met before moving to the next step;
[0093] Step 7: Continue the value and role phase for spouses with low acceptance. If the acceptance is greater than 0.5 at a certain stage, it will go to step 6 to update the features;
[0094] Step 8: Repeat steps 6 and 7 for multiple iterations until the termination condition is met (such as reaching the maximum number of iterations or meeting the preset accuracy requirements);
[0095] Step 9: Based on the lip shape detection and classification results of each decision tree in the optimized random forest, vote to determine the final lip shape category result.
[0096] The detection method is used to assist in judging whether the singer's lip shape is standard in singing teaching.
[0097] The facial lip shape detected in this example is as follows Figure 7 As shown in (a)-(f), after the facial image of the singing person is input into the trained YOLOv8 model, the corresponding lip shape diagram can be automatically detected and segmented.
[0098] In this example, the singing lip shape detection process is as follows Figure 4 As shown in the figure: First, a real-time segmentation network model for singing lip shape images based on YOLOv8 is constructed, and the collected singing lip shape time series is input into YOLOv8 for lip shape detection to obtain the lip shape time series graph; secondly, the lip shape time series graph is divided into training set, validation set and test set according to 8:1:1; then, a series of spatial depth features are extracted from the lip shape time series graph by using the capsule network, and input into the BiLSTM network to extract the time series features of the singing lip shape; then, the random forest with parameters optimized by the love evolution algorithm is used for prediction and classification; finally, the training set and validation set are used to train the overall model, and the model is tested and the results are analyzed through the test set, and the performance of the model can be judged by inputting the test set.
[0099] In this example, in order to meet the needs of large-scale image processing and improve training efficiency, this example uses RTX 3080 (10GB) and 12vCPU Intel (R) Xeon (R) Platinum 8255C CPU @ 2.50GHz processors, uses Python programming language, uses Cuda version 11.0, and uses Pytorch1.7.0 as the deep learning framework.
[0100] This patent selects facial video images of teachers and their students from the Department of Music of Fujian Normal University singing vowels to construct a data set, and selects 300 teachers and students of different ages and genders as the collection objects. In order to ensure the robustness of the model, the same shooting equipment is used to collect videos in three time periods: morning, noon and evening. The collected videos are extracted according to continuous time series, and collected according to the mouth shape classifications such as vertical mouth, round mouth, pointed mouth, open mouth, closed mouth, and smile. 6,000 continuous time series are extracted for each mouth shape, and a total of 36,000 images for six mouth shapes are extracted. These images are divided into training set, validation set and test set in a ratio of 8:1:1, that is, 28800:3600:3600.
Claims
1. A real-time singing lip shape detection method based on spatiotemporal depth feature adaptive decision making, characterized by: The steps include: Step S1, collecting a singer's face video image, and annotating the image according to the actual lip shape of the singer, to construct a sample data set for model training and testing; Step S2: construct a real-time detection network for singing lip shape targets based on YOLOv8 to segment the singing lip shape images from the face video; Step S3, constructing a lip shape spatial depth feature extraction model based on a capsule network, inputting a series of extracted spatial depth features into a BiLSTM network, and further extracting time series features of the lip shape image through the BiLSTM network; Step S4, using the love evolution algorithm to optimize the hyperparameters of the random forest algorithm, mapping the extracted time series features to the high-dimensional space of the random forest for adaptive decision classification; Step S5: Use the training set and validation set in the sample data set to train the model, and use the test set in the sample data set to test the model and analyze the results.
2. The method for real-time detection of singing lip shape based on spatiotemporal depth feature adaptive decision-making according to claim 1 is characterized in that: The method of step S1 is specifically as follows: singers of different age groups and different genders are selected as collection objects, with the number of people being no less than 300. In order to ensure the robustness of the model, the same shooting equipment is used to collect videos in three time periods: morning, noon and evening. The collected videos are extracted according to continuous time series, and collected according to the mouth shape classification of vertical mouth, round mouth, pointed mouth, open mouth, closed mouth and smiling. No less than 6,000 continuous time series are extracted for each mouth shape, and these images are divided into training set, verification set and test set in a ratio of 8:1:
1.
3. The method for real-time detection of singing lip shape based on spatiotemporal depth feature adaptive decision-making according to claim 1, characterized in that: In step S2, the collected continuous time series image of the face of the singing person is subjected to lip shape detection; in step S2, a real-time detection network for singing lip shape target based on YOLOv8 is first constructed, and then the face image of the singing person is detected and segmented to effectively perform real-time detection of the lip shape, and the lip shape image of the singing person is segmented from the face video as the input of the model in the subsequent steps; The network structure of YOLOv8 consists of three parts: Backbone, Neck, and Head. Backbone is responsible for extracting high-level semantic features from the input image. It contains multiple convolutional layers and pooling layers, and builds a deep feature extractor to convert the image into a feature representation with rich semantic information. Neck is used to further integrate and adjust the features extracted by Backbone, and improve the network's perception of the target by fusing features at different levels. The Neck structure consists of a series of convolutional layers and upsampling layers, which are used to fuse low-level feature maps with high-level feature maps, providing more global and local feature information, thereby helping to capture the details and contextual relationships of the target and improve the accuracy of target detection. Head is the last layer of the YOLOv8 model. In the object detection task, the bounding box regressor and classifier are used to output the bounding box position and category information of the object; The calculation method of the training loss of the singing lip shape image real-time detection and segmentation network model based on YOLOv8 is as follows: The loss function of YOLOv8 includes the rectangular box loss rect / box_loss and the classification loss cls_loss. The total loss function is the sum of the two with their respective weight coefficients. The calculation formula is shown in formula (1). Loss=a×L obj +b×L rect +c×L cls (1) Among them, a, b, c are the weight coefficients of each loss, and the sum of the three is equal to 1; The classification loss and confidence loss are calculated using BCEWithLogitsLoss, and the rectangular box loss is calculated using CIoU_Loss function + DistributionFocal Loss. The calculation method is shown in formula (2). b and b in the formula gt Represents the center point of the prediction box and the center point of the gt box, ρ 2 () represents the Euclidean distance, c is the length of the diagonal of the smallest rectangle containing the two boxes; If A is the real box and B is the predicted box, the IoU calculation formula is as shown in formula (3). DFL loss: DFL optimizes the probabilities of the two positions closest to label y in the form of cross entropy, so that the network can focus on the distribution of the target position and the surrounding area more quickly. The category loss is calculated by using the category score of the predicted box and the one-hot performance of the true box, as shown in formula (4).
4. The method for real-time detection of singing lip shape based on spatiotemporal depth feature adaptive decision-making according to claim 3 is characterized in that: In step S3, a capsule network is used to increase the attention paid to the position feature information of the lip sync; The capsule network includes convolutional layers, initial capsules, and digital capsules. The convolutional structure is used for feature extraction in the capsule network. The convolutional layer in the capsule network extracts local features from the image by performing convolution operations on the input data. During the convolution process, each convolution kernel slides on different positions of the input data and shares the same weight parameters. The initial capsule is the initial layer in the capsule network, which is responsible for extracting low-level local features from the input lip shape image or video. The features include edges, corners, and textures for subsequent lip shape recognition. The initial capsule captures these features through a set of learnable weight parameters and bias parameters, and encodes these features into the capsule's output vector. The capsule's output vector indicates the presence or absence of the feature, as well as the spatial information and directionality of the feature, and is used to capture the shape and dynamic changes of the lips in lip shape detection. The digital capsule is located in the deeper layer of the capsule network and is responsible for building a higher-level abstract representation from the low-level features extracted by the initial capsule, that is, for capturing more complex lip patterns and structures; by combining and transforming the information from the initial capsule to form a more comprehensive understanding of the lip shape.
5. The method for real-time detection of singing lip shape based on spatiotemporal depth feature adaptive decision making according to claim 4 is characterized in that: In step S3, the BiLSTM network uses a deep learning method to model and extract features of lip shape changes. By considering the context information of the sequence at the same time, the dynamic changes and contextual relationships in the lip shape time series are more accurately captured, and the deep-level features in the lip shape time series are extracted. The deep-level features include static information of the lip shape and process information of the dynamic changes of the lip shape. The specific method is as follows: the BiLSTM network receives a series of spatial depth features extracted by the capsule network as input and converts them into time series data. Then, the network processes the sequence through the long short-term memory network LSTM layer in both forward and reverse directions; the forward LSTM layer encodes from the start position to the end position of the sequence to capture the forward lip shape change information; and the reverse LSTM layer encodes from the end position to the start position of the sequence to capture the backward lip shape change information; the outputs of the LSTM layers in these two directions are spliced together to make full use of the context information in the sequence.
6. The method for real-time detection of singing lip shape based on spatiotemporal depth feature adaptive decision making according to claim 5, characterized in that: In step S4, the output of BiLSTM is used as the input variable of the random forest decision tree, and the love evolution algorithm is used to optimize the number of hyperparameter subsets T and the number of features m of the random forest. Finally, the classification results of each decision tree are voted to achieve the function of automatically determining the lip shape category. The specific implementation process includes the following steps: Step 1: Build a data set and divide the data into two parts, one part is divided into training data and the other part is divided into test data. Step 2: Use random forest to build a model based on the optimization parameters of the love evolution algorithm, and evaluate the performance of the model on the training data as happiness; the evaluation process includes the evaluation of accuracy and loss function value; Step 3: Use the bootstrap resampling method to extract T times with replacement from the updated training data set to form T training subsets; Step 4: Use the output of BiLSTM as the input variable of the random forest decision tree. The generation of the decision tree is the process of recursively constructing a binary classification tree. At each node of the tree, m features are randomly selected from the M input variables as candidate features. Generally, m takes the root mean square value of M. Then, the optimal feature and the best binary cut point are selected from these m features to split the node, thereby establishing T decision trees and generating a random forest. Step 5: Use the love evolution algorithm to optimize the number of hyperparameter subsets T and the number of features m of the random forest, and generate multiple pairs of spouses for love evaluation. Step 6: For spouses whose acceptance is greater than 0.5, break up and enter the reflection stage to continue reflecting and changing their own characteristics until the conditions are met before moving to the next step; Step 7: Continue the value and role phase for spouses with low acceptance. If the acceptance is greater than 0.5 at a certain stage, it will go to step 6 to update the features; Step 8: Repeat steps 6 and 7 for multiple iterations until the termination condition is met (such as reaching the maximum number of iterations or meeting the preset accuracy requirements); Step 9: Based on the lip shape detection and classification results of each decision tree in the optimized random forest, vote to determine the final lip shape category result.
7. The method for real-time detection of singing lip shape based on spatiotemporal depth feature adaptive decision-making according to claim 1, characterized in that: The detection method is used to assist in judging whether the singer's lip shape is standard in singing teaching.
Citation Information
Patent Citations
Method for mapping audio clip into human face mouth shape key point
CN111429885A
Face video recognition method, device and equipment and storage medium
CN111797735A
Battery pack
KR1020220118635A
