Gesture recognition model construction method and device, electronic equipment and medium

Through the MobileNetV4 small network and multi-scale feature fusion, combined with the online mining of difficult samples and the loss balance weighting strategy, the problem of low recognition accuracy of gesture recognition technology under illumination changes, gesture position changes and background interference is solved, and the recognition accuracy between different models is achieved. The adaptability and recognition accuracy are improved.

CN118587742APending Publication Date: 2024-09-03CHONGQING JINKANG NEW ENERGY VEHICLE CO LTD

Patent Information

Application Number
CN202410769469.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

Existing gesture recognition technology has low recognition accuracy under the influence of lighting changes, gesture position changes, background interference and other factors, and the model is difficult to adapt between different models and is prone to false detections.

Method used

The MobileNetV4 small network is used for feature extraction and multi-scale feature fusion, combined with online mining of difficult samples and loss balance weighting strategies to improve the recognition accuracy and reliability of the model.

Benefits of technology

It improves the accuracy and reliability of gesture recognition and enables the model to perform well on a variety of hardware platforms. It is especially suitable for vehicle-mounted OMS or DMS systems with limited resources, and enhances the discrimination and generalization capabilities of difficult samples.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587742A
    Figure CN118587742A
Patent Text Reader

Abstract

The invention relates to the field of vehicle-mounted gesture interaction, in particular to a gesture recognition model construction method and device, electronic equipment and a medium. The gesture recognition model construction method comprises the following steps: inputting a preprocessed gesture image into a MobileNetV4small network for feature extraction to obtain feature maps of different scales; fusing the feature maps of different scales by using an FPN feature pyramid network to obtain a fused feature map; and inputting the fusion feature map into a full connection layer of the MobileNetV4small network, and outputting a classification feature vector. According to the invention, the accuracy and reliability of gesture recognition are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle-mounted gesture interaction, and in particular to a gesture recognition model construction method, device, electronic equipment and medium. Background Art

[0002] At present, the main methods for static gesture classification include classification methods based on conventional neural networks, classification methods based on attention mechanisms, and classification methods based on time series prediction, etc. These methods have achieved good recognition accuracy to a certain extent.

[0003] However, in practical applications, these methods are susceptible to factors such as changes in lighting, changes in gesture position, and background interference when performing gesture recognition tasks, which in turn affects the recognition effect of the algorithm. Especially when the above-mentioned interference factors are more serious, the performance of the network model will be significantly reduced. Specifically, 1. The recognition accuracy of some difficult gesture categories needs to be improved. 2. The detection effect of the model in strong light and dark light scenes is unsatisfactory, and it is greatly affected by the camera angle and the change of gesture position. It is not possible to get a good adaptation effect on another model by training the gesture data of one model, resulting in a large amount of data being collected for model training each time a model is adapted. 3. The model is sensitive to some background interference, which is easy to cause false detection, such as human ears, wrinkled textures on clothes, and some hats with similar colors to gestures.

[0004] In view of this, the present invention is proposed. Summary of the invention

[0005] The object of the present invention is to provide a method, device, electronic device and medium for constructing a gesture recognition model to improve the accuracy and reliability of gesture recognition.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions:

[0007] In a first aspect, the present invention provides a method for constructing a gesture recognition model, comprising:

[0008] The preprocessed gesture image is input into the MobileNetV4 small network for feature extraction to obtain feature maps of different scales;

[0009] The FPN feature pyramid network is used to fuse the feature maps of different scales to obtain a fused feature map;

[0010] The fused feature map is input into the fully connected layer of the MobileNetV4 small network, and a classification feature vector is output.

[0011] As a further preferred technical solution, before inputting the preprocessed gesture image into the MobileNetV4small network for feature extraction to obtain feature maps of different scales, the method further includes:

[0012] Collecting gesture images of people in the car; the gesture images include the following categories: heart, shush, OK, yeah, five, and negative;

[0013] The gesture image is scaled proportionally, random noise is added, Mosiac data is enhanced, ColorJitter is operated, and normalization is performed to obtain a preprocessed gesture image.

[0014] As a further preferred technical solution, the MobileNetV4 small network includes at least 4 convolutional layers, wherein the universal inverted neck structure modules of the first convolutional layer and the second convolutional layer include instance normalization operations, and the third convolutional layer and the fourth convolutional layer include universal inverted neck structure modules and Mobile MQA modules.

[0015] As a further preferred technical solution, after outputting the classification feature vector, the method further includes:

[0016] Adjusting the target loss of difficult samples according to the classification feature vector and the adaptive adjustment matrix;

[0017] According to the classification feature vector, the loss balance weights of different categories are adjusted.

[0018] As a further preferred technical solution, adjusting the target loss of difficult samples according to the classification feature vector and the adaptive adjustment matrix includes:

[0019] Determining loss values ​​of different samples according to the classification feature vector and the cross entropy loss function with label smoothing;

[0020] According to the loss values ​​of the different samples and the adaptive adjustment matrix, the target loss of the difficult samples is adjusted.

[0021] As a further preferred technical solution, adjusting the target loss of difficult samples according to the loss values ​​of different samples and the adaptive adjustment matrix includes:

[0022] Concatenate the loss values ​​of each sample into different loss vectors;

[0023] Sort the loss value of each sample by a numerical value;

[0024] From the sorted loss vectors, select the K loss vectors with the largest values;

[0025] Generate calculation weights corresponding to the K loss vectors according to the adaptive adjustment matrix, and use a softmax layer to normalize the calculation weights;

[0026] The K loss vectors are weighted and combined with the loss values ​​of the remaining samples and the regular penalty term to form the difficult sample target loss.

[0027] As a further preferred technical solution, adjusting the loss balance weights of different categories according to the classification feature vector includes:

[0028] Determining the difficulty of identifying samples of different categories according to the classification feature vector;

[0029] According to the difficulty of identifying samples of different categories, the loss balance weights of different categories are adjusted.

[0030] In a second aspect, the present invention provides a gesture recognition model construction device, comprising:

[0031] The feature extraction module is used to input the preprocessed gesture image into the MobileNetV4small network for feature extraction to obtain feature maps of different scales;

[0032] A multi-scale feature fusion module is used to fuse the feature maps of different scales using an FPN feature pyramid network to obtain a fused feature map;

[0033] The classification feature vector output module is used to input the fused feature map into the fully connected layer of the MobileNetV4 small network and output the classification feature vector.

[0034] In a third aspect, the present invention provides an electronic device, comprising:

[0035] at least one processor, and a memory communicatively coupled to at least one of the processors;

[0036] The memory stores instructions that can be executed by at least one of the processors, and the instructions are executed by at least one of the processors so that at least one of the processors can perform the above method.

[0037] In a fourth aspect, the present invention provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to enable a computer to execute the above method.

[0038] Compared with the prior art, the present invention has the following beneficial effects:

[0039] The gesture recognition model construction method provided by the present invention is based on the MobileNetV4 small network, and improves the accuracy and reliability of gesture recognition through steps such as feature extraction and multi-scale feature fusion. The model constructed by the method of the present invention performs well on a variety of hardware platforms, including mobile CPUs, DSPs, GPUs, and dedicated accelerators, and is particularly beneficial for vehicle-mounted OMS or DMS systems that need to operate in a resource-constrained environment.

[0040] Furthermore, the universal inverted neck structure module of the first and second convolutional layers of the MobileNetV4 small network contains instance normalization operations, which can reduce fluctuations in the gradient update process, thereby improving the stability of training. This is especially important for the shallower feature extraction part, because the shallow features are directly affected by the input data; and by normalizing the feature map of each sample, the statistical differences between samples can be reduced, which helps to improve the generalization ability of the model on different gesture samples. The universal inverted neck structure module and MobileMQA module of the third and fourth convolutional layers make the model universal and flexible, able to adapt to different scenarios and needs, and help the model better understand the position, shape and posture information of the hand in the overall image. This global correlation capture ability can improve the model's ability to recognize hand targets.

[0041] Furthermore, the present invention further improves the model's ability to discriminate difficult samples through an online difficult sample mining method, and saves parameter overhead by mining difficult samples on small batches of samples.

[0042] Furthermore, the present invention also introduces a loss balance weighting strategy, through which more appropriate loss balance weights for different categories can be obtained, further improving the problem of imbalance in loss calculation of each category, and adding a regularization penalty term to alleviate overfitting. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0044] Figure 1 It is a flowchart of the method for constructing a gesture recognition model provided by the present invention;

[0045] Figure 2 It is a schematic diagram of the feature conversion process in the gesture recognition model of the present invention;

[0046] Figure 3 It is a structural schematic diagram of a gesture recognition model building device provided by the present invention;

[0047] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0048] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0049] As mentioned in the background technology, the existing technology has the problem of insufficient accuracy and reliability of gesture recognition. In this regard, the inventors of this application have found through a lot of analysis that the reasons for the above problems mainly include the following aspects: 1. The existing model simply calculates the loss function value of the output feature vector and the true value. 2. The existing model needs to be improved in capturing the association between hand features in a global scope. This association helps the model better understand the position, shape and posture information of the hand in the overall image; therefore, improving the ability to capture global associations will help improve the model's ability to recognize hand targets. 3. The ability of the existing model to suppress background information that is not related to hand features needs to be improved. Therefore, in actual tasks, the model should focus on the key features of the hand, thereby enhancing the hand's representation ability and improving recognition accuracy.

[0050] Therefore, the present invention adopts the MobileNetV4 small network to construct a gesture recognition model through feature extraction, multi-scale feature fusion and other steps. The model constructed by this method has a relatively accurate recognition effect. The present invention is further described in detail below in conjunction with the embodiments.

[0051] Example 1

[0052] Figure 1 It is a flowchart of a gesture recognition model construction method provided in this embodiment. The method can be executed by a gesture recognition model construction device. The device can be composed of software and / or hardware and is generally integrated in an electronic device. The electronic device can be a computer. For the sake of ease of understanding, each step in the construction method of this embodiment is executed by a computer.

[0053] like Figure 1 As shown, this embodiment provides a method for constructing a gesture recognition model, comprising the following steps:

[0054] S101, collecting gesture images of people in the car; the gesture images include the following categories: heart, shush, OK, yeah, five and negative.

[0055] Among them, the occupants include the driver, the front passenger and the rear passenger. This embodiment preferably collects gesture images of the occupants in as many models as possible to improve the accuracy of model training. The gesture image is a gesture image under the camera of the real vehicle OMS (Occupancy Monitoring System) and DMS (Driver Monitoring System). In the category of gesture images, "heart" refers to the gesture of the occupants making a heart-shaped gesture, "shush" refers to the gesture of the occupants making a "shush" (that is, silence), "yeah" refers to the gesture of the occupants making a "yeah" (that is, the index finger and the middle finger are open and separated by a certain distance, and the other fingers are curled up, representing victory and happiness), "five" refers to the gesture of the occupants making a gesture of all fingers open (that is, the gesture of clapping), "negative" refers to other gestures except the above heart, shush, OK, yes, and five, which are also used as negative sample images. For negative sample images, this embodiment samples them in the dataloader according to the set probability (such as 0.3).

[0056] S102, scaling the gesture image in equal proportion, adding random noise, performing Mosiac data enhancement, performing ColorJitter operation, and normalization processing to obtain a preprocessed gesture image.

[0057] This embodiment does not limit the specific operations of proportional scaling, adding random noise, Mosiac data enhancement, ColorJitter operation and normalization processing, and can be implemented in the field. The main purpose of the above preprocessing of gesture images in this embodiment is to facilitate subsequent feature extraction. Among them, proportional scaling can avoid image distortion or distortion, which is particularly important for tasks such as object detection and image classification, because distorted images may cause the model to misunderstand the image content and affect the training effect. Adding random noise can improve the robustness of the algorithm. Mosiac data enhancement can increase the diversity of pictures, enrich background information, and avoid overfitting. The ColorJitter operation can randomly change the brightness, contrast, saturation and hue of the image, increase the diversity of the data set, and thus improve the robustness and generalization ability of the deep learning model. The normalization operation can improve the stability and convergence speed of model training, and prevent certain eigenvalues ​​from being too large or too small to dominate or ignore the learning process of the model.

[0058] S110, input the preprocessed gesture image into the MobileNetV4 small network for feature extraction to obtain feature maps of different scales.

[0059] The MobileNetV4 small network is a lightweight network. The MobileNetV4small network in this embodiment includes at least 4 convolutional layers, wherein the universal inverted neck structure modules of the first and second convolutional layers include instance normalization operations, and the third and fourth convolutional layers include universal inverted neck structure modules and Mobile MQA modules. The instance normalization operation can reduce the fluctuations in the gradient update process, thereby improving the stability of the training, which is particularly important for the shallower feature extraction part, because the shallow features are directly affected by the input data; and by normalizing the feature map of each sample, the statistical differences between samples can be reduced, which helps to improve the generalization ability of the model on different gesture samples. The universal inverted neck structure module and the Mobile MQA module make the model universal and flexible, able to adapt to different scenarios and needs, and help the model better understand the position, shape and posture information of the hand in the overall image. This global correlation capture capability can improve the model's recognition ability of hand targets.

[0060] like Figure 2 As shown in the figure, taking a 224*224*3 gesture RGB picture as an example, when feature extraction is performed based on the Mobilenetv4small network, the feature map is gradually converted from 224*224 to 112*112, 56*56, 14*14 and finally to 7*7.

[0061] The core of the Mobilenetv4 small network of the present invention lies in the Universal Inverted Bottleneck (UIB) module and the Mobile MQA module, with an optimized neural network architecture search (NAS) recipe. UIB also introduces a new variant ExtraDW (extra depth convolution). Mobile MQA has designed a groundbreaking attention block designed specifically for accelerators, achieving up to 39% inference acceleration.

[0062] S120, using an FPN feature pyramid network to fuse the feature maps of different scales to obtain a fused feature map.

[0063] Among them, the FPN (Feature Pyramid Network) feature pyramid network is a pyramid operation at a feature scale. It realizes the feature pyramid operation by fusing top-down and bottom-up feature maps. It does not introduce too many parameters and can improve the detection capability of multi-scale targets at a very low computational cost.

[0064] In the present invention, after feature extraction in S110, the feature maps output by each convolutional layer are input into the FPN feature pyramid network for fusion, thereby improving the generalization ability of gesture recognition.

[0065] like Figure 2 As shown in the figure, taking a 224*224*3 gesture RGB picture as an example, after the aforementioned S110 feature extraction, the feature maps output by each convolutional layer (such as 56*56, 14*14, and 7*7 maps) are fused through the FPN feature pyramid network to finally form a 56*56 fused feature map.

[0066] S130, input the fused feature map into the fully connected layer of the MobileNetV4 small network, and output a classification feature vector.

[0067] The above-mentioned "classification feature vector" refers to a high-dimensional vector processed by the feature extraction layer and the fully connected layer in the deep learning classification model. It contains a high-level feature representation of the input data and is ultimately used to predict the category to which the data belongs.

[0068] After the fused feature map is input into the fully connected layer of the MobileNetV4 small network, the classification feature vector can be output. At this time, it can be considered that the gesture image has been classified and the model construction is completed. In order to further improve the accuracy of the model, this embodiment also adds difficult sample online mining and loss balance weighting strategy, see S140 and S150 for details.

[0069] S140: Adjust the target loss of difficult samples according to the classification feature vector and the adaptive adjustment matrix.

[0070] The above "adaptive adjustment matrix" is used to adjust the contribution weight of the loss vector in the loss calculation. The number of rows is the number of samples, and the number of columns is the dimension of the loss vector. Through this step, the target loss of difficult samples can be adjusted to improve the recognition accuracy of the model.

[0071] Optionally, adjusting the target loss of difficult samples according to the classification feature vector and the adaptive adjustment matrix includes:

[0072] Determining loss values ​​of different samples according to the classification feature vector and the cross entropy loss function with label smoothing;

[0073] According to the loss values ​​of the different samples and the adaptive adjustment matrix, the target loss of the difficult samples is adjusted.

[0074] The above “cross entropy loss function with label smoothing” refers to an improved loss function used to alleviate the problems of overfitting and overconfidence of deep learning models. Label smoothing achieves better model training results by slightly smoothing the distribution of target labels, that is, converting hard labels (one-hot vectors) into soft labels.

[0075] Optionally, adjusting the target loss of difficult samples according to the loss values ​​of the different samples and the adaptive adjustment matrix includes:

[0076] Concatenate the loss values ​​of each sample into different loss vectors;

[0077] Sort the loss value of each sample by a numerical value;

[0078] From the sorted loss vectors, select the K loss vectors with the largest values;

[0079] Generate calculation weights corresponding to the K loss vectors according to the adaptive adjustment matrix, and use a softmax layer to normalize the calculation weights;

[0080] The K loss vectors are weighted and combined with the loss values ​​of the remaining samples and the regular penalty term to form the difficult sample target loss.

[0081] When forming the difficult sample target loss, the K loss vectors can be weighted and then averaged with the loss values ​​of the remaining samples, and finally a regular penalty term is added to form the difficult sample target loss.

[0082] This embodiment further improves the model's ability to distinguish difficult samples by mining difficult samples online, and saves parameter overhead by mining difficult samples on small batches of samples.

[0083] S150. Adjust the loss balance weights of different categories according to the classification feature vector.

[0084] The above-mentioned “loss balance weight” refers to assigning different weights to samples of different categories when calculating the loss function to balance the imbalance between categories. This is especially important when dealing with class imbalance problems, because an unbalanced data set may cause the model to favor the majority class and ignore the minority class.

[0085] Optionally, adjusting the loss balance weights of different categories according to the classification feature vector includes:

[0086] Determining the difficulty of identifying samples of different categories according to the classification feature vector;

[0087] According to the difficulty of identifying samples of different categories, the loss balance weights of different categories are adjusted.

[0088] Specifically, similar to the aforementioned S140, difficult samples of samples of different categories can be identified based on the classification feature vector, and then the difficulty of identifying samples of different categories can be determined. If the difficulty of identifying samples of different categories varies greatly, it means that there is an imbalance in the identification of samples of different categories. Therefore, it is necessary to adjust the loss balance weight to balance the identification of different samples.

[0089] For example, we are dealing with a static gesture recognition problem. During training, we found that some categories (such as the five gesture) are easy to recognize, while other categories (such as the heart gesture) are difficult to recognize. We can adjust the loss balance weights by following the steps below:

[0090] Train the model and obtain the classification feature vector: First, train the model and obtain the classification feature vector during the training process.

[0091] Compute hard examples: In each batch, we compute the model’s predicted probability for each example and identify hard examples (i.e., examples that the model is less confident about).

[0092] Analyze the difficulty of category recognition: Determine the difficulty of recognition for each category based on the distribution of difficult samples. If the proportion of difficult samples in a category is high, it means that the category is difficult to recognize.

[0093] Adjust loss balance weights: Adjust the loss balance weights based on the difficulty of recognition. Give higher weights to difficult-to-recognize categories so that the model pays more attention to these categories during training.

[0094] This embodiment introduces a loss balance weighting strategy to derive more appropriate loss balance weights for different categories, further improving the problem of imbalanced loss calculations for each category, and adding a regular penalty term to alleviate overfitting.

[0095] The gesture recognition model construction method of this embodiment is based on the MobileNetV4 small network, and improves the accuracy and reliability of gesture recognition through feature extraction, multi-scale feature fusion and other steps. The model constructed by the method of the present invention performs well on a variety of hardware platforms, including mobile CPUs, DSPs, GPUs and dedicated accelerators, and is particularly beneficial for vehicle-mounted OMS or DMS systems that need to operate in resource-constrained environments.

[0096] Furthermore, between S120 and S130, a step of inputting the fused feature map into a pooling layer is also included. After the pooling layer, a 28*28 feature map can be formed, thereby further compressing the features.

[0097] Example 2

[0098] like Figure 3 As shown, this embodiment provides a gesture recognition model construction device, including:

[0099] A feature extraction module 201 is used to input the preprocessed gesture image into the MobileNetV4small network for feature extraction to obtain feature maps of different scales;

[0100] A multi-scale feature fusion module 202 is used to fuse the feature maps of different scales using an FPN feature pyramid network to obtain a fused feature map;

[0101] The classification feature vector output module 203 is used to input the fused feature map into the fully connected layer of the MobileNetV4small network and output a classification feature vector.

[0102] The device is used to execute the above method, and thus has at least functional modules and beneficial effects corresponding to the above method.

[0103] Furthermore, the device also includes a data acquisition module (not shown) for acquiring gesture images of people in the car; the gesture images include the following categories: heart, shush, OK, yeah, five and negative.

[0104] Furthermore, the device also includes a preprocessing module (not shown) for performing proportional scaling, adding random noise, Mosiac data enhancement, ColorJitter operation and normalization processing on the gesture image to obtain a preprocessed gesture image.

[0105] Furthermore, the device also includes a difficult sample target loss adjustment module (not shown) for adjusting the difficult sample target loss according to the classification feature vector and the adaptive adjustment matrix.

[0106] Furthermore, the device also includes a loss balance weight adjustment module (not shown) for adjusting the loss balance weights of different categories according to the classification feature vector.

[0107] Example 3

[0108] like Figure 4 As shown, this embodiment provides an electronic device, including:

[0109] at least one processor; and

[0110] a memory communicatively connected to at least one of the processors; wherein,

[0111] The memory stores instructions executable by at least one of the processors, and the instructions are executed by at least one of the processors to enable at least one of the processors to perform the above method. At least one processor in the electronic device can perform the above method, and thus has at least the same advantages as the above method.

[0112] Optionally, the electronic device also includes an interface for connecting various components, including a high-speed interface and a low-speed interface. Various components are interconnected using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on a memory to display graphical information of a GUI (Graphical User Interface) on an external input / output device (such as a display device coupled to an interface). In other embodiments, if necessary, multiple processors can be used together with multiple memories, and / or multiple buses can be used together with multiple memories. Similarly, multiple electronic devices can be connected (for example, as a server array, a group of blade servers, or a multi-processor system), and each device provides some necessary operations. Figure 4 A processor 301 is taken as an example.

[0113] The memory 302, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the gesture recognition model construction method in the embodiment of the present invention (for example, the feature extraction module, multi-scale feature fusion module, and classification feature vector output module in the gesture recognition model construction device). The processor 301 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 302, that is, realizing the above-mentioned gesture recognition model construction method.

[0114] The memory 302 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 302 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 302 may further include a memory remotely arranged relative to the processor 301, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0115] The electronic device may further include: an input device 303 and an output device 304. The processor 301, the memory 302, the input device 303 and the output device 304 may be connected via a bus or other means. Figure 4 The example of connecting through bus is taken in the following.

[0116] The input device 303 can receive input digital or character information, and the output device 304 can include a display device, an auxiliary lighting device (e.g., LED), and a tactile feedback device (e.g., a vibration motor), etc. The display device can include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some embodiments, the display device can be a touch screen.

[0117] Example 4

[0118] This embodiment provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to enable a computer to execute the above method. The computer instructions on the computer-readable storage medium are used to enable a computer to execute the above method, and thus have at least the same advantages as the above method.

[0119] The medium in the present invention may adopt any combination of one or more computer-readable media. The medium may be a computer-readable signal medium or a computer-readable storage medium. The medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of the medium (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, the medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device, or device.

[0120] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0121] The program code contained on the computer-readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, RF (Radio Frequency), etc., or any suitable combination of the above.

[0122] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0123] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.

[0124] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. A method for constructing a gesture recognition model, characterized in that: include: The preprocessed gesture image is input into the MobileNetV4 small network for feature extraction to obtain feature maps of different scales; The FPN feature pyramid network is used to fuse the feature maps of different scales to obtain a fused feature map; The fused feature map is input into the fully connected layer of the MobileNetV4 small network, and a classification feature vector is output.

2. The method for constructing a gesture recognition model according to claim 1, characterized in that: Before inputting the preprocessed gesture image into the MobileNetV4 small network for feature extraction to obtain feature maps of different scales, the method further includes: Collecting gesture images of people in the car; the gesture images include the following categories: heart, shush, OK, yeah, five, and negative; The gesture image is scaled proportionally, random noise is added, Mosiac data is enhanced, ColorJitter is operated, and normalization is performed to obtain a preprocessed gesture image.

3. The method for constructing a gesture recognition model according to claim 1, characterized in that: The MobileNetV4small network includes at least 4 convolutional layers, wherein the universal inverted neck structure modules of the first convolutional layer and the second convolutional layer include instance normalization operations, and the third convolutional layer and the fourth convolutional layer include universal inverted neck structure modules and Mobile MQA modules.

4. The method for constructing a gesture recognition model according to claim 1, characterized in that: After the output classification feature vector, it also includes: Adjusting the target loss of difficult samples according to the classification feature vector and the adaptive adjustment matrix; According to the classification feature vector, the loss balance weights of different categories are adjusted.

5. The method for constructing a gesture recognition model according to claim 4, characterized in that: The step of adjusting the target loss of difficult samples according to the classification feature vector and the adaptive adjustment matrix includes: Determining loss values ​​of different samples according to the classification feature vector and the cross entropy loss function with label smoothing; According to the loss values ​​of the different samples and the adaptive adjustment matrix, the target loss of the difficult samples is adjusted.

6. The method for constructing a gesture recognition model according to claim 5, characterized in that: The step of adjusting the target loss of difficult samples according to the loss values ​​of different samples and the adaptive adjustment matrix includes: Concatenate the loss values ​​of each sample into different loss vectors; Sort the loss value of each sample by a numerical value; From the sorted loss vectors, select the K loss vectors with the largest values; Generate calculation weights corresponding to the K loss vectors according to the adaptive adjustment matrix, and use a softmax layer to normalize the calculation weights; The K loss vectors are weighted and combined with the loss values ​​of the remaining samples and the regular penalty term to form the difficult sample target loss.

7. The method for constructing a gesture recognition model according to claim 4, characterized in that: The step of adjusting the loss balance weights of different categories according to the classification feature vector includes: Determining the difficulty of identifying samples of different categories according to the classification feature vector; According to the difficulty of identifying samples of different categories, the loss balance weights of different categories are adjusted.

8. A gesture recognition model construction device, characterized in that: include: The feature extraction module is used to input the preprocessed gesture image into the MobileNetV4small network for feature extraction to obtain feature maps of different scales; A multi-scale feature fusion module is used to fuse the feature maps of different scales using an FPN feature pyramid network to obtain a fused feature map; The classification feature vector output module is used to input the fused feature map into the fully connected layer of the MobileNetV4 small network and output the classification feature vector.

9. An electronic device, characterized in that: include: at least one processor, and a memory communicatively coupled to at least one of the processors; The memory stores instructions executable by at least one of the processors, and the instructions are executed by at least one of the processors so that the at least one processor can execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Behavior recognition method and device

    CN113052147A

Cited By

  • Lightweight pork freshness grading method and system based on improved MobileNetV4

    CN120635552A