Gesture recognition method and system fused with lip reading recognition
By integrating lip reading recognition technology and using the attention mechanism to fuse gesture and lip language features, it solves the problem that the existing system cannot recognize silent lip sounds, improves recognition accuracy and efficiency, and meets the complex communication needs of people with hearing and language impairments.
Patent Information
- Application Number
- CN202410752114.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-08-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing gesture recognition systems cannot meet the complex communication needs of people with hearing and speech impairments, especially when lip sounds are silent.
Using a gesture recognition method that integrates lip reading recognition, the gesture and lip language features are extracted through the feature extraction module, and the attention mechanism is used to fuse them to improve recognition accuracy and efficiency.
It improves the accuracy and efficiency of gesture and lip recognition, enhances the adaptability and practicality of the model, and can better meet the complex communication needs of people with hearing and language impairments.
Smart Images

Figure CN118570888A
Abstract
Description
Technical Field
[0001] The invention relates to a gesture recognition method and system integrated with lip reading recognition, belonging to the technical field of gesture recognition. Background Art
[0002] With the rapid development of artificial intelligence, the importance of gesture recognition technology in the field of intelligent human-computer interaction has become increasingly prominent. The widespread application of this technology provides a new way of communication for people with hearing and speech impairments, especially in the context of a significant increase in the number of patients with hearing-related diseases worldwide. The development of gesture recognition technology is particularly urgent. According to the latest data from the World Health Organization, the number of patients with hearing-related diseases is on the rise worldwide, which may be affected by a variety of factors, including an aging population, environmental factors, and the prevalence of diseases. In the face of this trend, it is crucial to provide effective communication methods for the hearing-impaired. Gesture recognition technology has become a powerful tool for improving the daily lives of the hearing-impaired with its convenient and intuitive features, enabling them to express their intentions, obtain information, and better integrate into social and professional activities through gestures.
[0003] However, for some people with hearing and speech impairments, gesture recognition alone may not be enough to meet their complex communication needs. People with hearing and speech impairments usually make almost silent lip sounds when making gestures, and the current gesture recognition system cannot meet this need. It can be seen that in order to solve this technical problem, a gesture recognition method and system that integrates lip reading recognition is urgently needed. Summary of the invention
[0004] The purpose of the present invention is to overcome the deficiencies in the prior art and provide a gesture recognition method and system integrated with lip reading recognition, which improves the accuracy and efficiency of gesture and lip reading recognition by comprehensively utilizing gesture and lip reading features and adopting an attention mechanism to perform feature fusion on the extracted gesture features and lip reading features, while also enhancing the adaptability and practicability of the model.
[0005] To achieve the above object, the present invention is implemented by adopting the following technical solutions: In a first aspect, the present invention provides a gesture recognition method integrating lip reading recognition, comprising: Get the target image; Inputting the target image into a pre-trained recognition model to obtain a recognition result; The recognition model includes a feature extraction module, a feature fusion module, a classification module and an output module, wherein the feature extraction module is used to extract gesture features and lip reading features according to the target image; the feature fusion module is used to fuse the gesture features and lip reading features based on the attention mechanism to obtain fused features; the classification module is used to classify the fused features to obtain recognition results.
[0006] Furthermore, the feature fusion module is used to fuse the gesture features and the lip reading features based on the attention mechanism to obtain fused features, including: Convert gesture features into query matrices and lip reading features into key matrices and value matrices; Perform a scaled dot product operation according to the obtained query matrix and the key matrix to obtain a dot product operation result; Normalize the obtained dot product operation results to obtain the attention weight matrix; Perform matrix multiplication on the attention weight matrix and the value matrix to obtain the fused features.
[0007] Furthermore, the feature extraction module includes a gesture feature extraction module and a lip reading feature extraction module, wherein: The extraction method of the gesture feature extraction module includes: Extract the gesture area in the target image and obtain the gesture sequence; According to the gesture sequence, the gesture area is located to complete the gesture tracking. After completing gesture tracking, gesture segmentation is performed to obtain gesture features.
[0008] Furthermore, locating the gesture area according to the gesture sequence to complete gesture tracking includes: According to the acquired gesture sequence, determine the category to which the current feature belongs and obtain the predicted gesture category; Perform non-maximum suppression operation according to the predicted gesture category to obtain the target gesture category; Perform bounding box positioning on the target gesture category to obtain bounding box coordinates; The bounding box coordinates are integrated with the target gesture category to obtain the position information of the gesture feature in the target image.
[0009] Furthermore, the extraction method of the lip reading feature extraction module includes: Extracting a lip reading sequence from a target image, and performing 3D convolution processing on the lip reading sequence after preprocessing to obtain a first feature; After normalizing the first feature, a ReLU activation function operation is performed to obtain a second feature; Perform maximum pooling downsampling on the second feature to obtain a third feature; Perform DenseNet dense layer processing according to the third feature to obtain the fourth feature; The fourth feature is captured by a bidirectional GRU layer to obtain a fifth feature; The fifth feature is mapped and classified to obtain the lip reading feature.
[0010] In a second aspect, the present invention provides a gesture recognition system integrating lip reading recognition, comprising: Image acquisition module: used to acquire the target image; Recognition module: used to input the target image into a pre-trained recognition model to obtain a recognition result; The recognition model includes a feature extraction module, a feature fusion module, a classification module and an output module, wherein the feature extraction module is used to extract gesture features and lip reading features according to the target image; the feature fusion module is used to fuse the gesture features and lip reading features based on the attention mechanism to obtain fused features; the classification module is used to classify the fused features to obtain recognition results.
[0011] In a third aspect, the present invention provides a computer device, including a processor and a storage medium; The storage medium is used to store instructions; The processor is used to operate according to the instructions to execute the steps of the method according to the first aspect.
[0012] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that when the program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0013] Compared with the prior art, the present invention has the following beneficial effects: The gesture recognition method and system integrated with lip reading recognition provided by the present invention improves the accuracy and efficiency of gesture and lip reading recognition by comprehensively utilizing gesture and lip reading features and adopting an attention mechanism to perform feature fusion on the extracted gesture features and lip reading features, while also enhancing the adaptability and practicability of the model. The gesture recognition method and system integrated with lip reading recognition provided by the present invention use gesture features as query matrices and lip reading features as key matrices and value matrices to perform feature fusion based on an attention mechanism when fusing gesture features and lip reading features, thereby effectively weighting and integrating features from different sources to generate richer and more comprehensive feature representations to improve the accuracy of gesture recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 is a flow chart of a gesture recognition method integrating lip reading recognition provided in Example 1; Figure 2 This is a schematic diagram of the YOLOv5s gesture recognition process; Figure 3 This is the YOLOv5s architecture diagram; Figure 4 This is the structure diagram of the Focus module; Figure 5It is a schematic diagram of the slicing operation process; Figure 6 It is a schematic diagram of the CBL module structure; Figure 7 This is the schematic diagram of the C3 module; Figure 8 It is a schematic diagram of the SPP structure; Fig. 9 It is a schematic diagram of the combined structure of FPN+PAN; Fig.10 This is a visualization diagram of mAP; Fig.11 It is a schematic diagram of F1-Score for each category; Fig.12 is a diagram of the confusion matrix; Fig.13 It is a schematic diagram of the lip reading recognition process; Fig.14 It is a schematic diagram of the D3D model; Fig.15 This is a schematic diagram of the DenseLayer structure; Fig.16 It is a schematic diagram of the TrandBlock structure; Fig.17 It is a visual diagram of the training process; Fig.18 It is a schematic diagram of the Precision-Recall curve of all categories; Fig.19 This is a structural diagram of feature fusion using vision Transformer; Fig. 20 This is a schematic diagram of the Hagrid dataset categories; Fig.21 This is a sample picture of some LRW-1000; Fig. 22 It is a schematic diagram of gesture recognition one; Fig.23 This is a schematic diagram of the two up gesture recognition; Fig.24 It is a schematic diagram of gesture recognition three; Fig.25 It is a schematic diagram of gesture recognition four; Fig.26 This is a schematic diagram of gesture recognition two. DETAILED DESCRIPTION
[0015] The technical solution of the present invention is described in detail below through the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present application and the specific features in the embodiments are detailed descriptions of the technical solution of the present application, rather than limitations on the technical solution of the present application. In the absence of conflict, the embodiments of the present application and the technical features in the embodiments can be combined with each other.
[0016] The term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship. Embodiment 1
[0017] Figure 1 This is a flow chart of a gesture recognition method integrated with lip reading recognition in the first embodiment of the present invention. The gesture recognition method integrated with lip reading recognition provided in this embodiment can be applied to a terminal and can be executed by a gesture recognition system integrated with lip reading recognition. The system can be implemented by software and / or hardware. The system can be integrated in a terminal, for example: any smart phone, tablet computer or computer device with communication function. Figure 1 The method of this implementation specifically includes the following steps: Get the target image; Inputting the target image into a pre-trained recognition model to obtain a recognition result; The recognition model includes a feature extraction module, a feature fusion module, a classification module and an output module, wherein the feature extraction module is used to extract gesture features and lip reading features according to the target image; the feature fusion module is used to fuse the gesture features and lip reading features based on the attention mechanism to obtain fused features; the classification module is used to classify the fused features to obtain recognition results.
[0018] The feature fusion module is used to fuse gesture features and lip reading features based on the attention mechanism to obtain fused features, including: Convert gesture features into query matrices and lip reading features into key matrices and value matrices; Perform a scaled dot product operation according to the obtained query matrix and the key matrix to obtain a dot product operation result; Normalize the obtained dot product operation results to obtain the attention weight matrix; Perform matrix multiplication on the attention weight matrix and the value matrix to obtain the fused features.
[0019] The feature extraction module includes a gesture feature extraction module and a lip reading feature extraction module, wherein: The extraction method of the gesture feature extraction module includes: Extract the gesture area in the target image and obtain the gesture sequence; According to the gesture sequence, the gesture area is located to complete the gesture tracking. After completing gesture tracking, gesture segmentation is performed to obtain gesture features.
[0020] Locating the gesture area based on the gesture sequence to complete gesture tracking includes: According to the acquired gesture sequence, determine the category to which the current feature belongs and obtain the predicted gesture category; Perform non-maximum suppression operation according to the predicted gesture category to obtain the target gesture category; Perform bounding box positioning on the target gesture category to obtain bounding box coordinates; The bounding box coordinates are integrated with the target gesture category to obtain the position information of the gesture feature in the target image.
[0021] The extraction method of the lip reading feature extraction module comprises: Extracting a lip reading sequence from a target image, and performing 3D convolution processing on the lip reading sequence after preprocessing to obtain a first feature; After normalizing the first feature, a ReLU activation function operation is performed to obtain a second feature; Perform maximum pooling downsampling on the second feature to obtain a third feature; Perform DenseNet dense layer processing according to the third feature to obtain the fourth feature; The fourth feature is captured by a bidirectional GRU layer to obtain a fifth feature; The fifth feature is mapped and classified to obtain the lip reading feature.
[0022] Next, the identification method is introduced in combination with the specific content: YOLO is a real-time target detection algorithm. Unlike traditional target detection algorithms based on sliding windows or region proposals, YOLO converts the target detection task into a single regression problem, and only needs one forward propagation to simultaneously output the location and category information of the target. However, in order to solve the problem of algorithm performance degradation caused by too many targets or large changes in target size, researchers have proposed improved versions such as YOLOv2, YOLOv3, YOLOv4, YOLOv5s and the latest YOLOv8. These versions improve the accuracy and generalization ability of the algorithm by introducing more advanced network structures while maintaining real-time performance. As an advanced real-time target detection algorithm, YOLOv5s adopts a simpler convolutional neural network architecture than YOLOv8. It is usually faster than YOLOv8 in processing images and is more suitable for small target detection. This embodiment uses YOLOv5s for gesture recognition. Through its powerful feature extraction capability and optimized network structure, it can accurately identify gestures in images and output their location and category information in real time.
[0023] The YOLOv5s architecture is used to train the gesture recognition process. The Light-HAGRID gesture dataset is used. The YOLOv5s model is selected. After the training parameters are configured, training is performed. During the training process, YOLOv5s performs data enhancement technology to increase the diversity of the dataset through random scaling, rotation, and flipping operations to ensure that the model has good recognition capabilities when facing gestures of different angles and scales. After the model starts to learn the features of gestures from the dataset, it extracts the key features of gestures by analyzing the color, texture, shape, etc. in the image. When a gesture image from external input is obtained, the model will first preprocess the image by resizing and normalizing it so that the image can meet the input requirements of the model. The model extracts features from the image and compares them with the learned gesture features. It determines which category the gesture of the input image belongs to by calculating the similarity between the features. Since the model may predict multiple overlapping bounding boxes for the same target, non-maximum suppression is needed to eliminate redundant predictions. Finally, after completing the post-processing operations, the model will output one or more classification categories and their corresponding bounding box coordinates, indicating the location and category of the gesture in the image, and finally output the result. Figure 2 shown.
[0024] The architecture of YOLOv5s is mainly composed of five parts: input, backbone, neck, head and output. Figure 3As shown in the figure. The input of YOLOv5s is the image to be detected, and its size is usually 608*608*3, which represents the width, height and number of color channels of the image respectively. In the input stage, it mainly includes the implementation of Mosaic data enhancement, the calculation of adaptive anchor boxes and the execution of adaptive image scaling operations.
[0025] In the Backbone network, it is mainly responsible for extracting image features. The Backbone network is mainly composed of the Focus module, CBL module, C3 module and SPP module. The structure of the Focus module is as follows: Figure 4 As shown in the figure, this is the key difference between YOLOv5s and previous versions. It is used to downsample the input feature map, combine adjacent pixels into smaller feature maps according to certain rules, and slice the image. Figure 5 For example, after the original 4*4*3 image is sliced, its dimension is converted to a 2*2*12 feature map. When input into the YOLOv5s model and then operated by the Focus module, the original input 608*608*3 image will become a 304*304*12 feature map, and then after 32 convolution kernels, it will be further converted into a 304*304*32 feature map.
[0026] The CBL module is the basic unit of the convolution layer. C stands for the convolution layer, which is mainly responsible for performing image convolution operations; B stands for the batch normalization layer, which normalizes the image to ensure that the mean of the convolution layer output in the same batch is 0 and the variance is 1, thereby improving the stability and convergence speed of the model. L refers to the Leaky ReLU activation function. The CBL module structure is as follows: Figure 6 shown.
[0027] The C3 module mainly performs adaptive aggregation of feature maps, which can fuse feature information at different levels and play the role of feature aggregation. Its structure is as follows Figure 7 As shown in the figure, the C3 structure is based on the iteration of the cross-channel feature fusion (CSP) structure of YOLOv4. It realizes the fusion of multi-scale features by connecting feature maps of different layers. At the same time, the residual connection method is used to reduce the amount of network calculation.
[0028] The Spatial Pyramid Pooling (SPP) module is a technique for pooling and fusing information of different scales. It uses the maximum pooling method to perform pooling operations on images at different scales. By introducing multiple scales of maximum pooling layers and merging their outputs in the channel dimension through the Concat operation, the SPP module can effectively capture multi-scale information in the image. Its structure is shown in the figure below. Figure 8 shown.
[0029] The Neck module is located between the Backbone and the Head, and acts as a bridge between the two. Its main task is to further fuse and enhance the features extracted by the Backbone. Compared with its predecessor, YOLOv5s uses a structure that combines FPN (Feature Pyramid Network) and PAN (Pyramid Attention Network) in the Neck module. FPN is mainly responsible for transmitting features from top to bottom in order to obtain rich semantic information at different scales, while PAN uses a bottom-up approach to transmit position information to ensure that the model can better understand the spatial layout of the object. The combined structure of FPN+PAN is shown in Figure 1. Fig. 9 shown.
[0030] Because the image annotation file provided by the dataset is in json format, it needs to be converted to YOLO format. The conversion parameters are as follows: if __name__ == "__main__": parser = argparse.ArgumentParser("Convert Hagrid annotations toYolo annotations format", add_help=False) parser.add_argument("--bbox_format", default="cxcywh", type=str,help="bbox format: xyxy, cxcywh, xywh") parser.add_argument("--cfg", default="converter_config.yaml", type=str, help="path to data config") parser.add_argument("--out", default=". / hagrid_yolo_format", type=str, help="path to output dir") args = parser.parse_args() run_convert(args) Modify the configuration file to: dataset: dataset_annotations:<path_to_annotations> # Path to the dataset annotation file dataset_folder:<path_to_dataset> # The folder path where the image file is located phases: [train, test, val] targets: - one - stop -stop_inverted -three - four - call - dislike - fist - like -mute - ok - palm - peace - rock -two_up -two_up_inverted -three2 -peace_inverted -no_gesture This experiment uses the TensorBoard tool to visualize the training process of the gesture recognition model. Through in-depth understanding and analysis of the training process, it provides a useful reference for model optimization and improvement. By using the TensorBoard tool to visualize the training process, pay attention to the training indicators of each epoch, including the change of the loss function, the improvement trend of the accuracy rate, and the change of mAP, it shows that as the training progresses, the mAP (mean average precision) gradually increases. The confusion matrix is also used to analyze the performance of the model on different gesture categories.
[0031] In this example, we introduced the technical route analysis of gesture recognition tasks using the YOLOv5s architecture. We selected the Light-HAGRID gesture dataset and used the YOLOv5s model for training. By performing data augmentation and model training on the dataset, we obtained a model that can accurately recognize gestures and implemented the entire recognition process through the YOLOv5s architecture. Next, we will continue to introduce the technical route analysis of lip reading recognition.
[0032] This embodiment proposes a D3D model architecture that combines 3D convolution and DenseNet with reference to the Chinese lip reading data set LRW-1000 to extract lip features to complete training and recognition work. The uniqueness of the D3D model architecture is that it combines the dense connection characteristics of DenseNet and the spatial information processing capabilities of 3D convolution. Through its unique connection method, DenseNet allows the output of each layer to be directly used as the input of all subsequent layers, thereby effectively alleviating the problem of gradient disappearance and strengthening the transmission and reuse of feature information. 3D convolution can capture the dynamic changes of the lips in the spatiotemporal dimensions, which is crucial for lip reading technology. By combining these two technologies, the D3D model architecture can fully utilize the feature reuse capabilities of DenseNet when extracting lip features, and fully capture the spatiotemporal information of 3D convolution, thereby more accurately completing lip reading training and recognition work.
[0033] The video sequence after image preprocessing will be input into the front-end module of the D3D (3D DenseNet) network. The image data will first pass through a 3D convolution layer with specific parameters, which has a convolution kernel of size 5 / 7 / 7 and a step size of 1 / 2 / 2, followed by normalization and ReLU activation function operation, and preliminary feature extraction and normalization of the input image. The processed image needs to be downsampled by the maximum pooling layer (MaxPool3D), and the data will be further refined, which can effectively reduce the complexity of the operation and retain important features. After the DenseNet part of the processing, the data is gradually passed to the subsequent dense layers, and each layer will receive the output of all previous layers as part of its input. This dense connection method facilitates the flow and reuse of feature information, and high-level features will be sent to the back-end module.
[0034] The backend module contains two bidirectional GRU (Gated Recurrent Unit) layers, each with 256 units, which can model sequence data and capture dependencies in the time dimension. Finally, the features processed by the bidirectional GRU layer are sent to a fully connected layer (Fully Connected, FC) containing 1000 neurons, which finally maps the high-level features to the final recognition results. The overall architecture of lip reading recognition is as follows Fig.13 shown.
[0035] Technical route analysis The D3D model is a front-end network structure that is a 3D variant of DenseNet. The model contains a series of Conv3D, BN, ReLU, MaxPool3D, AvgPool3D layers, as well as DenseLayers, Bi-GRU, and FC components to extract spatial-temporal features and perform sequence recognition. The architecture design of this model combines 3D convolution and 2D convolution to achieve better feature extraction and recognition performance. Fig.14 shown.
[0036] The DenseLayer structure is a component in the D3D model that is used to implement densely connected feature extraction. The structure includes a series of convolution, BN and ReLU layers, as well as TransBlock. The DenseLayer structure achieves efficient feature extraction and transmission through multi-layer stacking, thus providing the model with rich feature representation capabilities. Fig.15 shown.
[0037] The TrandBlock structure is another component in the D3D model, which is used to transform and process features. This structure includes Conv3D, BN, ReLU layers, and AvgPool3D. The TrandBlock structure continuously transforms and pools features to achieve multi-layer abstraction and dimensionality reduction of features, allowing the model to better adapt to input data of different scales and complexities, thereby improving the performance of the model in recognition tasks. Fig.16 shown.
[0038] Lip reading recognition training results and analysis class _DenseLayer(nn.Sequential): def __init__(self, num_input_features, growth_rate, bn_size, drop_rate): super(_DenseLayer, self).__init__() # First layer: 1x1x1 3D convolution operation self.add_module('norm1', nn.BatchNorm3d(num_input_features)), self.add_module('relu1', nn.ReLU(inplace=True)), self.add_module('conv1', nn.Conv3d(num_input_features, bn_size* growth_rate, kernel_size=1, stride=1, bias=False)), # Second layer: 3x3x3 3D convolution operation self.add_module('norm2', nn.BatchNorm3d(bn_size * growth_rate)), self.add_module('relu2', nn.ReLU(inplace=True)), self.add_module('conv2', nn.Conv3d(bn_size * growth_rate,growth_rate, kernel_size=3, stride=1, padding=1, bias=False)), self.drop_rate = drop_rate def forward(self, x): # Pass the input x into two layers of convolution operations and perform dropout operations when necessary new_features = super(_DenseLayer, self).forward(x) if self.drop_rate>0: new_features = F.dropout(new_features, p=self.drop_rate,training=self.training) # Concatenate the original input x with the new features to get the output return torch.cat([x, new_features], 1) The training process is visualized by using the Tensorboard tool.
[0039] This embodiment describes the technical route of lip reading recognition adopted by this system, introduces the overall architecture of lip reading recognition in detail, and adopts the extraction technology of D3D model for training. The D3D model uses the deep learning method to perform multi-level feature extraction and fusion of lip reading sequences, thereby effectively mining the information hidden in the lip reading and fully capturing the features in the lip reading sequence.
[0040] Fusion technology route In the process of model construction, the lightweight Hagrid trained by YOLOv5s is used to recognize gestures and extract gesture features; the D3D model is used to recognize lip reading and extract lip reading features. After obtaining the features of the two modalities, the attention mechanism in VisionTransformer is used to fuse the features of the two modalities. The two features pass through the fully connected layer respectively, with the gesture features as the query (Q) matrix and the lip reading features as the key (K) and value (V) matrices. Through back propagation, the fully connected layer weights that convert the original features into Q, K and V matrices are learned during the training process. In the fusion technology route of vision transformer, Q (query) and K (key) are used to perform scaled dot product operations. Then the softmax function is applied to the calculated matrix on the last dimension to obtain the normalized attention weight matrix. In this process, information from different modalities can be effectively fused in the attention weight. Finally, by performing matrix multiplication operations on the attention weight and the V (value) matrix, the fusion processing of multimodal information is realized and the features of the fused modality are obtained. The fused features are input into the classifier to obtain the classification results. Its architecture diagram is as follows Fig.19 As shown: Related model code class VisionTransformer(nn.Module):# VisionTransformer model code def __init__(self, config, img_size=224, num_classes=21843, zero_head=False, vis=False): super(VisionTransformer, self).__init__() # Initialize the VisionTransformer class self.num_classes = num_classes # Number of categories self.zero_head = zero_head # Whether to use zero head self.classifier = config.classifier # classifier # Create Transformer model self.transformer = Transformer(config, img_size, vis) # Create a linear layer as the head of the classifier self.head = Linear(config.hidden_size, num_classes) def forward(self, x, labels=None): # Transform the input data x through the Transformer model and obtain the attention weight x, attn_weights = self.transformer(x) # Get logits from the converted feature x through the head classifier logits = self.head(x[:, 0]) # If labels are provided, calculate the loss if labels is not None: loss_fct = CrossEntropyLoss() loss = loss_fct(logits.view(-1, self.num_classes),labels.view(-1)) return loss else: # Otherwise return logits and attention weights return logits, attn_weights This example uses the attention mechanism in VisionTransformer to complete the fusion work, introduces the architecture and route used, introduces the model, introduces the multimodal recognition formed by fusing gesture and lip reading features, introduces the technical route, and the system implementation results. The vision Transformer model is used to fuse lip reading features and gesture features, and joint training is performed, and relevant experimental results are analyzed.
[0041] Experimental results and analysis Experimental environment Table 1 Experimental environment configuration Configuration items Specification GPU NVIDIA RTX 2080 Ti CPU Intel Core i9-9900 Memory 32GB Python Python 3.9 Experimental Configuration The following is an explanation of the configuration implemented by this system, which can realize tasks such as data visualization, image processing, and model training.
[0042] matplotlib==3.5.1 mediapipe numpy==1.21.5 opencv-python Pillow==9.0.0 pandas==1.4.0 scipy torch torchvision tqdm Experimental Dataset The Hagrid dataset is a large and rich dataset of gesture recognition images. Fig. 20 As shown in Figure 2. It contains 552,992 FullHD (1920 × 1080) RGB images, which are classified into 18 categories of gestures, each with a corresponding label. The images in the dataset are mainly collected in indoor environments, covering various lighting conditions, including artificial light and natural light, and even images under extreme conditions, such as facing and backing the window. In addition, the subjects in the dataset range in age from 18 to 65 years old, and they need to show gestures at a distance of 0.5 to 4 meters from the camera. The data is carefully organized into training and test sets. Among them, about 92% of the images are used as training sets, containing 509,323 images, while the remaining 8% are used as test sets, containing 43,669 images. Since the scale of this dataset is quite large, with a total size of 716GB, in order to facilitate training, this paper uses the Light-HaGRID dataset with a streamlined dataset and reduced resolution. This dataset covers 18 different gesture categories, each category contains about 7,000 pictures, totaling 123,731 pictures (more than 120,000 pictures).
[0043] The LRW-1000 dataset was proposed by the Institute of Computing Technology, Chinese Academy of Sciences, Huazhong University of Science and Technology, and University of Chinese Academy of Sciences in 2018. This is currently the largest and only public Chinese word-level lip reading dataset. The LRW-1000 dataset is recorded by multiple different speakers and covers 500 different words. Each word has up to 1,000 pronunciation samples, which cover a variety of accents, speaking speeds, and speaking styles, making the dataset more diverse and challenging. In addition, the length of each video is fixed at 1.16 seconds, and the target word appears in the middle of the video, which facilitates the training and testing of the model. The data samples involved in the dataset are mainly from news and interview programs of China Central Television, covering a wide range of speaker groups, totaling about 2,000 different individuals. These data samples contain 39,289 original sentences, and further processed to obtain 718,018 lip reading samples. The diversity of these samples is reflected in the speaker's speaking speed, direction, age, gender, and makeup, providing rich resources for lip reading research. Different from the LRW dataset, the samples in the LRW-1000 dataset are presented as framed images of the original sentences, and these images only focus on the lip area, thus focusing on the specific needs of lip reading research. Fig.21 shown.
[0044] Data preprocessing In the YOLOv5s gesture recognition task, the YOLOv5s model requires a fixed-size input, so the image needs to be resized to 608*608 pixels. Then, normalization is performed to convert the pixel values of the image from an integer range of 0-255 to a floating point range of 0-1 to eliminate the difference in image brightness. After that, data enhancement is performed to expand the data set through rotation, flipping, scaling, and cropping operations, so that the model can learn more gestures of different postures.
[0045] For the processing of the LRW-1000 dataset, we do need to pay attention to two key issues: image size and sequence length. Since the original size of the sample images in the LRW-1000 dataset ranges from 20 pixels to 321 pixels, for the reusability and processing efficiency of the model, we need to normalize these images to a uniform size. Here, we choose to scale the images to 96x96 pixels. Since all samples are lip area images, we can choose to convert color images to grayscale images. This step can simplify the image processing process and reduce the amount of computation for model training. The grayscale image still retains the main features of the lip area.
[0046] Results Since the training images belong to different data sets and the data of the two modalities need to have the same meaning, the overlapping data found by this system are the gestures one, two, two up, three, and four in the Hagrid data set, and the corresponding lip readings in LRW-1000 are the numbers 1, 2, 3, and 4. In order to ensure the recognition accuracy, our system uses imported images for gesture recognition. This method can reduce the problem of low recognition accuracy caused by unstable gestures. The recognition results are as follows Figures 22 to 26 As shown: This example mainly describes the progress and environment of the experiment, introduces the data set used, explains the relevant process of data preprocessing, and displays and analyzes the results. Embodiment 2
[0047] A gesture recognition system integrating lip reading recognition, comprising: Image acquisition module: used to acquire the target image; Recognition module: used to input the target image into a pre-trained recognition model to obtain a recognition result; The recognition model includes a feature extraction module, a feature fusion module, a classification module and an output module, wherein the feature extraction module is used to extract gesture features and lip reading features according to the target image; the feature fusion module is used to fuse the gesture features and lip reading features based on the attention mechanism to obtain fused features; the classification module is used to classify the fused features to obtain recognition results.
[0048] The gesture recognition system integrated with lip reading recognition provided in the embodiment of the present invention can execute the gesture recognition method integrated with lip reading recognition provided in any embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. Embodiment 3
[0049] An embodiment of the present invention further provides a computer device, including a processor and a storage medium; The storage medium is used to store instructions; The processor is used to operate according to the instructions to perform the steps of the following method: Get the target image; Inputting the target image into a pre-trained recognition model to obtain a recognition result; The recognition model includes a feature extraction module, a feature fusion module, a classification module and an output module, wherein the feature extraction module is used to extract gesture features and lip reading features according to the target image; the feature fusion module is used to fuse the gesture features and lip reading features based on the attention mechanism to obtain fused features; the classification module is used to classify the fused features to obtain recognition results.
[0050] For the details of each step in this embodiment, please refer to the first embodiment, which will not be described in detail here. Since this embodiment and the first embodiment adopt the same technical concept, it also has the technical effects described in the first embodiment. Embodiment 4
[0051] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the following method are implemented: Get the target image; Inputting the target image into a pre-trained recognition model to obtain a recognition result; The recognition model includes a feature extraction module, a feature fusion module, a classification module and an output module, wherein the feature extraction module is used to extract gesture features and lip reading features according to the target image; the feature fusion module is used to fuse the gesture features and lip reading features based on the attention mechanism to obtain fused features; the classification module is used to classify the fused features to obtain recognition results.
[0052] For the details of each step in this embodiment, please refer to the first embodiment, which will not be described in detail here. Since this embodiment and the first embodiment adopt the same technical concept, it also has the technical effects described in the first embodiment.
[0053] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0054] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or boxes.
[0055] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction system, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0056] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0057] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A gesture recognition method integrating lip reading recognition, characterized in that: include: Get the target image; Inputting the target image into a pre-trained recognition model to obtain a recognition result; The recognition model includes a feature extraction module, a feature fusion module, a classification module and an output module, wherein the feature extraction module is used to extract gesture features and lip reading features according to the target image; the feature fusion module is used to fuse the gesture features and lip reading features based on the attention mechanism to obtain fused features; the classification module is used to classify the fused features to obtain recognition results.
2. The method for hand gesture recognition integrating lip reading recognition according to claim 1, characterized in that: The feature fusion module is used to fuse gesture features and lip reading features based on the attention mechanism to obtain fused features, including: Convert gesture features into query matrices and lip reading features into key matrices and value matrices; Perform a scaled dot product operation according to the obtained query matrix and the key matrix to obtain a dot product operation result; Normalize the obtained dot product operation results to obtain the attention weight matrix; Perform matrix multiplication on the attention weight matrix and the value matrix to obtain the fused features.
3. The method for hand gesture recognition integrating lip reading recognition according to claim 2, wherein: The feature extraction module includes a gesture feature extraction module and a lip reading feature extraction module, wherein: The extraction method of the gesture feature extraction module includes: Extract the gesture area in the target image and obtain the gesture sequence; According to the gesture sequence, the gesture area is located to complete gesture tracking. After completing gesture tracking, gesture segmentation is performed to obtain gesture features.
4. The method for hand gesture recognition integrating lip reading recognition according to claim 3, characterized in that: Locating the gesture area based on the gesture sequence to complete gesture tracking includes: According to the acquired gesture sequence, determine the category to which the current feature belongs and obtain the predicted gesture category; Perform non-maximum suppression operation according to the predicted gesture category to obtain the target gesture category; Perform bounding box positioning on the target gesture category to obtain bounding box coordinates; The bounding box coordinates are integrated with the target gesture category to obtain the position information of the gesture feature in the target image.
5. The method for hand gesture recognition integrating lip reading recognition according to claim 3, characterized in that: The extraction method of the lip reading feature extraction module comprises: Extracting a lip reading sequence from a target image, and performing 3D convolution processing on the lip reading sequence after preprocessing to obtain a first feature; After normalizing the first feature, a ReLU activation function operation is performed to obtain a second feature; Perform maximum pooling downsampling on the second feature to obtain a third feature; Perform DenseNet dense layer processing according to the third feature to obtain the fourth feature; The fourth feature is captured by a bidirectional GRU layer to obtain a fifth feature; The fifth feature is mapped and classified to obtain the lip reading feature.
6. A gesture recognition system integrating lip reading recognition, characterized in that: include: Image acquisition module: used to acquire the target image; Recognition module: used to input the target image into a pre-trained recognition model to obtain a recognition result; The recognition model includes a feature extraction module, a feature fusion module, a classification module and an output module, wherein the feature extraction module is used to extract gesture features and lip reading features according to the target image; the feature fusion module is used to fuse the gesture features and lip reading features based on the attention mechanism to obtain fused features; the classification module is used to classify the fused features to obtain recognition results.
7. A computer device, characterized in that: including processor and storage medium; The storage medium is used to store instructions; The processor is used to operate according to the instructions to execute the steps of the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 5 are implemented.
