Vehicle-mounted gesture recognition method

Through the improved yolov8 algorithm and vehicle-mounted processor, combined with the panoramic camera, the problem of insufficient recognition time and accuracy in vehicle-mounted gesture recognition technology is solved, achieving faster and more accurate vehicle-mounted gesture control, reducing costs and improving the driving experience. .

CN118760356APending Publication Date: 2024-10-11PT GUANGXI SHUANGYING GROUP
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410846785.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

Existing vehicle gesture recognition technology has shortcomings in recognition time, recognition accuracy and response speed, and the cost is high, making it difficult to meet users' needs for more accuracy, faster speed and lower cost.

Method used

Using the improved yolov8 algorithm, combined with the panoramic camera and on-board processor, by creating and training its own data set, using the Task-AlignedAssigner positive and negative sample allocation strategy and a custom loss function, the recognition accuracy and speed are improved, and the model is transplanted to Deployed on Android operating system.

Benefits of technology

It achieves more accurate on-vehicle gesture recognition, shortens the recognition time, improves the response speed, reduces the system cost, and improves the convenience, comfort and safety of driving operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0004915896620000031
    Figure BDA0004915896620000031
  • Figure BDA0004915896620000041
    Figure BDA0004915896620000041
  • Figure BDA0004915896620000071
    Figure BDA0004915896620000071
Patent Text Reader

Abstract

The invention belongs to the technical field of automobile intelligent gesture recognition, and particularly relates to a vehicle-mounted gesture recognition method which comprises the following steps: S1, installing vehicle-mounted hardware, and building a virtual environment; s2, downloading a yov8 source code, and completing configuration in the pycharm; s3, creating an own data set and presetting picture tags in the data set; s4, training a data set created by the user and outputting a training result; s5, the trained result model is tested, and whether the model effect reaches the standard or not is tested; if yes, executing S6; if not, returning to execute S3; and S6, transplanting the model to a vehicle-mounted processor. The vehicle-mounted gesture control method can realize vehicle-mounted gesture control which is more accurate, shorter in recognition time, higher in response speed and lower in cost, and has a better market application prospect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of automobile intelligent gesture recognition, and in particular relates to a vehicle-mounted gesture recognition method. Background Art

[0002] With the continuous development of automobile intelligent technology, human-computer interaction computer vision technology and gesture recognition technology, intelligent automobile gesture recognition technology has gradually become an important research direction in the field of automobile intelligence. Human-computer interaction is one of the important research directions in computer science and technology, which can improve the convenience of users using various intelligent devices and improve user experience. Gesture recognition is an important means of human-computer interaction. It is a technology that can recognize human gestures. It responds to human intentions by perceiving and analyzing human postures and movements. This technology relies on technologies such as sensors, image processing and deep learning algorithms to capture, collect and analyze human movements, and convert human movements into information that computers can receive, understand and process. Gesture recognition technology is gradually attracting widespread attention from researchers and has been widely used in various fields such as automobile intelligence, virtual reality, and smart homes. Intelligent automobile gesture recognition technology can control the vehicle's navigation system, entertainment functions, window switches and other on-board equipment by capturing the driver's gestures, improving the convenience, comfort and safety of driving operations.

[0003] In recent years, the accurate recognition of in-vehicle gesture recognition technology mainly relies on two technologies: camera technology and touch space technology. The characteristics of these two recognition technologies are different, but the common goal is to achieve accurate recognition and control of user gestures. Camera technology collects and analyzes user gestures and converts them into instructions that the control system can understand. Users can control certain functions of in-vehicle devices through corresponding gestures without touching the device. However, current camera technology also has some defects, such as the recognition time, recognition accuracy and response speed of gestures, which need to be improved. Touch space technology is a more advanced gesture recognition technology. By using the principle of 3D magnetic field to recognize user gestures, touch space technology can detect gesture control at a longer distance. It relies on the performance of chip technology and requires higher performance chips to process gesture information, which is more expensive.

[0004] In summary, the in-vehicle gesture recognition technology has achieved some results, but there is still a long way to go before the technology matures. Users need an in-vehicle gesture control technology with more accurate gesture recognition, shorter recognition time, faster response speed and low cost. In view of this, the present application provides an in-vehicle gesture recognition method to solve the above technical problems.

[0005] The information disclosed in this background technology section is only intended to enhance the understanding of the overall background of the invention and should not be regarded as an acknowledgment or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the invention

[0006] The purpose of the present invention is to provide a vehicle-mounted gesture recognition method to achieve more accurate, shorter recognition time, faster response speed and low-cost vehicle-mounted gesture control.

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

[0008] A vehicle-mounted gesture recognition method comprises the following steps:

[0009] S1. Install vehicle hardware and build a virtual environment;

[0010] S2. Download yolov8 source code and complete the configuration in pycharm;

[0011] S3. Create your own dataset and preset the image labels in the dataset;

[0012] S4, train the dataset you created and output the training results;

[0013] S5, test the trained result model to determine whether the test effect meets the standard; if so, execute S6; if not, return to execute S3;

[0014] S6. Port the model to the vehicle processor.

[0015] Preferably, the vehicle-mounted hardware includes a panoramic camera, two camera modules, a PC and a vehicle-mounted processor; the panoramic camera is installed on the roof of the car, the two camera modules are installed at the front and rear of the car respectively, and are connected to the vehicle-mounted controller; the PC is used to configure the virtual environment and train the gesture recognition model.

[0016] Preferably, building a virtual environment includes the following steps:

[0017] S7. Use the condaprompt command prompt window to create a virtual environment and name it;

[0018] S8. Unzip the downloaded yolov8 source code and open it in pycharm. Set the interpreter under the project:ultralytics-main tab in settings to the virtual environment created in S1.

[0019] S9. Configure conda in the pycharm terminal, change the shell path under the tools tab in settings to the location of condaprompt, and restart after the configuration is completed;

[0020] S10. Use the conda activate command in the pycharm terminal to activate the virtual environment, so that the "(base)" character at the beginning of the command line is replaced with the name of the virtual environment created in S7.

[0021] S11. Use the pip install command to install the relevant packages in requirements.txt and other required ultralytics resource packages and yolo resource packages;

[0022] S12. Download the pre-trained weights. Find the yolovn8 pre-trained weights under the Detection tab in the readme file of the yolov8 source code download interface. After downloading the file, put it in the venv folder under the docs root directory under the ultralytics-main tab. Finally, further improve the loss function in yolov8.

[0023] As a preferred method, the yolov8 algorithm uses the Task-AlignedAssigner positive and negative sample allocation strategy in TOOD, and dynamically adjusts the allocation ratio of positive and negative samples during training through Task-AlignedAssigner; selects positive samples based on the scores of classification and regression loss values ​​as weighted scores, and the calculation formula is:

[0024] t=s α +u β

[0025] s is the predicted score corresponding to the labeled category; u is the IoU of the predicted box and the GT Box, and the product of the two is used to measure the degree of alignment Task-Alignment; α and β are weight hyperparameters; t is used to simultaneously control the optimization of the classification score and IoU to achieve Task-Alignment and guide the network to dynamically focus on high-quality anchors.

[0026] As a preference, loss calculation is divided into classification loss and regression loss; the classification loss VFL LOSS function of yolov8 is:

[0027]

[0028] Among them, q is the IoU between the predicted box bbox and the real box gt; p is the score, that is, the probability;

[0029] The regression loss CIOU loss function of yolov8 is:

[0030]

[0031] Among them, IoU is the intersection over union ratio, b and bgt represent the center points of the two rectangular boxes, ρ represents the Euclidean distance between the two rectangular boxes, c represents the diagonal distance of the closed area of ​​the two rectangular boxes, v is used to measure the consistency of the relative proportions of the two rectangular boxes, and α is the weight coefficient;

[0032] The regression loss DFL function of yolov8 is:

[0033] DFL(S i ,S i+1 )=-((y i+1 -y)log(S i )+(yy i )log(S i+1 ))

[0034] Among them, y i+1 is the predicted value, y is the mapped value, and y i is the near-forecast value.

[0035] As a preference, create your own dataset in S3, prepare the human gesture images to be recognized in advance, preset the information expressed by the gestures in the images, set the relevant label files, and annotate the human gesture images through the open source data annotation tool Labelimg; save the set label file format as a txt file and add corresponding labels; the added labels are the response information made when the human gestures are recognized, then store the annotated images in the Apple folder under the ultralytics-main folder, and store the .yaml files in the root directory of the Apple dataset.

[0036] As a preference, train your own created dataset in S4, set the dataset path to be trained and the pre-trained weight file to be loaded by the specific YOLO model used in advance, and set the required number of epochs; the training results are saved in the runs folder.

[0037] As a preferred method, the criterion for judging the test effect in S5 is: the trained model is run, the model successfully identifies the category according to the label in the annotation file, and gives the probability value, and the probability value meets the required requirements, that is, the model is built. If the recognition accuracy is not ideal, return to S3, continue to improve the number and quality of pictures in the data set, enhance the images in the input data set, and modify the loss function according to the indicator curve in the training results, find the loss function value suitable for the current model, and then retrain to improve the model performance.

[0038] As a preferred method, in S6, the model is transplanted to the onboard processor with Android operating system, the trained model is deployed to the Android system, the trained yolov8 model is converted into an ONNX model, and the network structure is simplified using onnx-simplifier. TNN is used for deployment on the Android side, which can support multi-threaded CPU and GPU accelerated reasoning.

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

[0040] (1) The vehicle-mounted gesture recognition method of the present invention adopts the improved YOLOv8 algorithm, which is an efficient algorithm that supports image classification, object detection and instance segmentation tasks. It uses a new backbone network, Ancher-Free detection head and loss function to improve the recognition accuracy and recognition speed of the existing camera recognition method.

[0041] (2) The vehicle-mounted gesture recognition method of the present invention has good flexibility. The trained gesture recognition model can be transplanted to different vehicle-mounted control systems and can be run on various hardware platforms such as Raspberry Pi and Android operating system platform.

[0042] (3) The vehicle-mounted gesture recognition method of the present invention can better replace the cost required by using touch space recognition technology, which is conducive to further reducing the cost of the gesture recognition system. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 is a structural diagram of a vehicle-mounted gesture recognition device provided by an embodiment of the present invention;

[0044] Figure 2 is a flow chart of a vehicle-mounted gesture recognition method provided by an embodiment of the present invention;

[0045] Figure 3 4 is a camera deployment diagram of a vehicle-mounted gesture recognition device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0046] The following is a clear and complete description of the technical solution of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by technicians in this field without creative work are within the scope of protection of the present invention.

[0047] In the description of the present invention, it should be noted that the orientations or positional relationships indicated by terms such as "center", "up", "down", "left", "right", "vertical", "horizontal", "inside" and "outside" are based on the orientations or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the invention.

[0048] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be a connection between two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0049] See attached Figure 1-3 , a vehicle-mounted gesture recognition method, comprising the following steps:

[0050] Step 1: Prepare a panoramic camera, two camera modules, a PC, and an on-board processor. The panoramic camera is installed on the roof of the car, and the two camera modules are installed at the front and rear of the car respectively, and connected to the on-board controller. Transplant the trained gesture recognition model from the PC to the on-board processor. The PC is used to configure the virtual environment. First, use the condaprompt command prompt window to create a virtual environment and name it.

[0051] Step 2. Download the yolov8 source code and unzip it, then open it in pycharm. In the project:ultralytics-main tab in settings, set the interpreter to the virtual environment created in step 1.

[0052] Step 3. Configure conda in the pycharm terminal, change the shellpath under the tools tab in settings to the location of condaprompt in step 1, and restart after the configuration is completed;

[0053] Step 4. Use the conda activate command in the pycharm terminal to activate the virtual environment. When the "(base)" character at the beginning of the command line is replaced with the name of the virtual environment created in step 1, it means that the activation is successful.

[0054] Step 5. Use the pip install command to install the relevant packages in requirements.txt and other required ultralytics resource packages and yolo resource packages;

[0055] Step 6. Download the pre-trained weights. Find the yolovn8 pre-trained weights under the Detection tab in the readme file of the source code download interface in step 2. After downloading the file, put it in the venv folder under the docs root directory under the ultralytics-main tab. Finally, further improve the loss function in yolov8 to achieve better recognition effect. At this point, the preliminary environment configuration is completed.

[0056] The loss value calculation process in this algorithm includes two parts: positive and negative sample allocation strategy and loss calculation. The yolov8 algorithm directly references the Task-AlignedAssigner positive and negative sample allocation strategy in TOOD; Task-AlignedAssigner is an allocator that dynamically adjusts the allocation ratio of positive and negative samples during training. The positive sample is selected based on the scores of the classification and regression loss values ​​as weighted scores. The formula is as follows:

[0057] t=s α +u β

[0058] s is the prediction score corresponding to the labeled category, u is the IoU between the prediction box and the GT Box, and the product of the two can measure the degree of alignment (Task-Alignment); α and β are weight hyperparameters; t can simultaneously control the optimization of the classification score and IoU to achieve Task-Alignment, thereby guiding the network to dynamically focus on high-quality anchors. When the category score is higher and the IoU is higher, the value of t is closer to 1.

[0059] The loss calculation is divided into two parts: classification loss and regression loss.

[0060] The classification loss VFL LOSS function of yolov8 is:

[0061]

[0062] q is the IoU (intersection over union) of the predicted box bbox and the real box gt; p is the score, that is, probability.

[0063] The regression loss CIOU loss function and DFL function of yolov8 are:

[0064]

[0065] IoU is the intersection over union ratio, b and bgt represent the center points of the two rectangular boxes, ρ represents the Euclidean distance between the two rectangular boxes, c represents the diagonal distance of the closed area of ​​the two rectangular boxes, v is used to measure the consistency of the relative proportions of the two rectangular boxes, and α is the weight coefficient.

[0066] DFL(S i ,S i+1 )=-((y i+1 -y)log(S i )+(yy i )log(S i+1 ))

[0067] Among them, y i+1 is the predicted value, y is the mapping value, y i Nowcast value.

[0068] Step 7. Create a data set by yourself, prepare the human gesture pictures to be recognized in advance, preset the information expressed by the gestures in the pictures, set the relevant label files, and annotate the human gesture pictures through the open source data annotation tool Labelimg; save the set label file format as a txt file and add corresponding labels. The labels are the response information made when the human gestures are recognized; then store the annotated pictures in the Apple folder under the ultralytics-main folder, and store the .yaml files in the root directory of the Apple data set;

[0069] Step 8. Train your own data set, set the path of the data set to be trained, the pre-trained weight file to be loaded by the specific YOLO model used, and set the required number of epochs; enter the run command in the terminal, start running, and wait for the results;

[0070] Step 9: Check the training results. The training results are saved in the runs folder. Run the trained model. If the model successfully identifies the category according to the label in the annotation file and gives the probability value, the model is built. If the recognition accuracy is not ideal, return to step 7 to continue to improve the number and quality of pictures in the data set, enhance the images in the input data set, and modify the loss function described in step 6 according to the indicator curve in the training results to find the loss function value suitable for the current model, and then retrain to improve the model performance.

[0071] Step 10: Port the model to the vehicle processor. The common operating system of the vehicle processor is Android. Deploy the trained model to the Android system. Convert the trained yolov8 model to an ONNX model, use onnx-simplifier to simplify the network structure, and use TNN to deploy on the Android side, which can support multi-threaded CPU and GPU accelerated reasoning.

[0072] Step 11: After the transplantation is completed, the real-time gesture recognition effect is tested on the vehicle processor; if the model successfully identifies the category according to the label in the annotation file and gives the probability value, it is successful.

[0073] The panoramic camera in this embodiment is arranged inside the roof, and the camera modules are arranged at the front and rear of the vehicle respectively. Figure 3 The camera deployment diagram is as follows:

[0074] Step 1: Use the panoramic camera to capture the gesture image information of the driver and passengers in the car in real time and send it to the on-board processor;

[0075] Step 2: The onboard processor analyzes the image information captured by the panoramic camera to determine whether it is consistent with the gesture preset in the model transplanted into the onboard processor; if not, no response is made; if consistent, a start control instruction is issued to the camera module;

[0076] Step 3: After receiving the control command, the camera module adjusts its own shooting direction to the position where the user shows the gesture, uses the camera module to capture the current user's gesture, and sends it to the on-board processor; the on-board processor analyzes the current gesture image, recognizes the current operation gesture information, and then generates a preset operation instruction;

[0077] Step 4: The vehicle-mounted processor sends the generated operation instruction to the controller. After receiving the operation instruction, the controller controls the corresponding device to perform the operation corresponding to the preset operation gesture according to the instruction, thereby realizing gesture control of vehicle-mounted devices, such as Bluetooth, air conditioning, music and other vehicle-mounted devices.

[0078] The vehicle-mounted gesture recognition method of the present invention utilizes camera technology and the improved efficient algorithm model yolov8, has a better effect on object detection and recognition, can improve the accuracy of vehicle-mounted gesture recognition, shorten the recognition time, speed up the response speed, and achieve lower-cost vehicle-mounted gesture control. It can also improve the convenience, comfort and safety of operation of the driver and passengers during driving. It is very practical and has good market application prospects.

[0079] The foregoing description of specific exemplary embodiments of the present invention is for the purpose of illustration and demonstration. These descriptions are not intended to limit the present invention to the precise form disclosed, and it is clear that many changes and variations can be made based on the above teachings. The purpose of selecting and describing the exemplary embodiments is to explain the specific principles of the present invention and its practical application, so that those skilled in the art can realize and utilize various different exemplary embodiments of the present invention and various different selections and changes. The scope of the present invention is intended to be limited by the claims and their equivalents.

Claims

1. A vehicle-mounted gesture recognition method, characterized in that: The following steps are involved: S1. Install vehicle hardware and build a virtual environment; S2. Download yolov8 source code and complete the configuration in pycharm; S3. Create your own dataset and preset the image labels in the dataset; S4, train the dataset you created and output the training results; S5, test the trained result model to determine whether the test effect meets the standard; if so, execute S6; if not, return to execute S3; S6. Port the model to the vehicle processor.

2. The vehicle-mounted gesture recognition method according to claim 1, characterized in that: The vehicle hardware includes a panoramic camera, two camera modules, a PC and an on-board processor; The panoramic camera is installed on the roof of the car, and the two camera modules are installed on the front and rear of the car respectively and connected to the on-board controller; the PC is used to configure the virtual environment and train the gesture recognition model.

3. The vehicle-mounted gesture recognition method according to claim 2, characterized in that: Building a virtual environment includes the following steps: S7. Use the condaprompt command prompt window to create a virtual environment and name it; S8. Unzip the downloaded yolov8 source code and open it in pycharm. Set the interpreter under the project:ultralytics-main tab in settings to the virtual environment created in S1. S9. Configure conda in the pycharm terminal, change the shell path under the tools tab in settings to the location of condaprompt, and restart after the configuration is completed; S10. Use the conda activate command in the pycharm terminal to activate the virtual environment, so that the "(base)" character at the beginning of the command line is replaced with the name of the virtual environment created in S7. S11. Use the pip install command to install the relevant packages in requirements.txt and other required ultralytics resource packages and yolo resource packages; S12. Download the pre-trained weights. Find the yolovn8 pre-trained weights under the Detection tab in the readme file of the yolov8 source code download interface. After downloading the file, put it in the venv folder under the docs root directory under the ultralytics-main tab. Finally, further improve the loss function in yolov8.

4. The vehicle-mounted gesture recognition method according to claim 3, characterized in that: The yolov8 algorithm uses the Task-AlignedAssigner positive and negative sample allocation strategy in TOOD, and dynamically adjusts the allocation ratio of positive and negative samples during training through Task-Aligned Assigner; selects positive samples based on the scores of classification and regression loss values ​​as weighted scores, and the calculation formula is: t=s α +u β s is the predicted score corresponding to the labeled category; u is the IoU of the predicted box and the GT Box, and the product of the two is used to measure the degree of alignment Task-Alignment; α and β are weight hyperparameters; t is used to simultaneously control the optimization of the classification score and IoU to achieve Task-Alignment and guide the network to dynamically focus on high-quality anchors.

5. The vehicle-mounted gesture recognition method according to claim 4, characterized in that: The loss calculation is divided into classification loss and regression loss; the classification loss VFL LOSS function of yolov8 is: Among them, q is the IoU between the predicted box bbox and the real box gt; p is the score, that is, the probability; The regression loss CIOU loss function of yolov8 is: Among them, IoU is the intersection over union ratio, b and bgt represent the center points of the two rectangular boxes, ρ represents the Euclidean distance between the two rectangular boxes, c represents the diagonal distance of the closed area of ​​the two rectangular boxes, v is used to measure the consistency of the relative proportions of the two rectangular boxes, and α is the weight coefficient; The regression loss DFL function of yolov8 is: DFL(S i ,S i+1 )=-((y i+1 -y)log(S i )+(y-y i )log(S i+1 )) Among them, y i+1 is the predicted value, y is the mapped value, and y i is the near-forecast value.

6. The vehicle-mounted gesture recognition method according to claim 1, characterized in that: To create your own dataset in S3, you need to prepare the human gesture images that need to be recognized in advance, preset the information expressed by the gestures in the images, set the relevant label files, and annotate the human gesture images through the open source data annotation tool Labelimg; the set label file format is saved as a txt file and marked with corresponding labels; the marked labels are the response information made when the human gestures are recognized, and then the labeled images are stored in the Apple folder under the ultralytics-main folder, and the .yaml files are stored in the root directory of the Apple dataset.

7. The vehicle-mounted gesture recognition method according to claim 1, characterized in that: To train your own dataset in S4, you need to set the training dataset path and the pre-trained weight file that needs to be loaded by the specific YOLO model used in advance, and set the required number of epochs; The training results are saved in the runs folder.

8. The vehicle-mounted gesture recognition method according to claim 1, characterized in that: The criteria for judging the test effect in S5 are: running the trained model, the model successfully identifies the category according to the label in the annotation file, and gives a probability value, and the probability value meets the required requirements, which means that the model is built.

9. The vehicle-mounted gesture recognition method according to claim 1, characterized in that: In S6, the model is ported to the onboard processor with Android operating system, the trained model is deployed to the Android system, the trained yolov8 model is converted into an ONNX model, and the network structure is simplified using onnx-simplifier, and TNN is used for deployment on the Android side.

Citation Information

Cited By

  • Safety helmet wearing intelligent monitoring method based on YOLOv8-CBAM

    CN119625631A