A Visual Detection-Based Method for Evaluating the Key Points of Marching Training
By combining multi-camera deployment with YOLOv4 and OpenPose algorithms, automated evaluation of the key points of marching training movements was achieved, solving the problem of low efficiency in manual detection and improving the accuracy and efficiency of evaluation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-09
- Publication Date
- 2026-04-03
AI Technical Summary
Current methods for detecting the key points of marching training movements rely on manual visual observation, which is inefficient and inaccurate, making it difficult to achieve efficient and accurate evaluation.
By employing multi-camera deployment and calibration, the YOLOv4 target detection model, and the OpenPose algorithm, combined with human key point extraction and posture calculation, an automated assessment of the key points of marching training movements is achieved.
It improves the detection efficiency and accuracy of marching training, can analyze and evaluate in real time whether the training movements meet the standards, and simplifies the operation process.
Smart Images

Figure CN116311498B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of deep learning and computer vision, and in particular to a method for evaluating the key points of marching training movements based on visual detection. Background Technology
[0002] The goose-step is a marching method used by troops, and goose-step training is one of the most rigorous and arduous training exercises. It is an effective way to improve the discipline and organizational awareness of the troops, and it helps to temper their will and cultivate a spirit of hard work, perseverance, and indomitable will.
[0003] The training of marching includes a set of strict movement rules: (1) When kicking out in the marching step, the leg of the swinging leg should be straightened with force, the ball of the foot should be 25 cm off the ground and parallel to the ground; (2) The toes of the swinging leg should be slightly downward and 75 cm away from the toes of the supporting leg; (3) When the swinging leg steps out and lands, the body's center of gravity should lean forward, the ball of the foot should be slightly forceful and fully on the ground; (4) When marching in the marching step, the upper body should be upright, slightly leaning forward, the fists should be clenched, the fingers should be contracted and the thumb should be extended to the second joint of the index finger; (5) When the arms swing forward, the palms should be down, the elbows should be bent, the forearms should be horizontal, and the lower edge of the wrist should be about 10 cm away from the body from the lowest button of the shirt; (6) When swinging the arms backward, the wrists should be about 30 cm away from the trouser seams; (7) The marching speed should be about 109-115 steps per minute; (8) When standing still, the left foot should take a big half step forward and push off the ground with force, the ball of the foot should touch the ground, the muscles of both legs should be kept tense and forceful, and the right foot should be quickly brought together with the left foot.
[0004] Currently, university students, high school students, and even primary and junior high school students need to undergo military training. In order to better and more effectively complete and assess students' military training results and activities such as military training and group performances, this invention proposes a visual detection-based method for evaluating the key points of marching training movements.
[0005] Currently, the detection of movement techniques in marching training relies on manual visual observation by coaches, which is time-consuming, labor-intensive, and inefficient. By integrating technologies such as computer vision, machine learning, and statistical data analysis, intelligent detection and measurement of the posture of various body parts during marching training can be achieved, providing an efficient, accurate, and scientific basis for evaluating the key points of marching movements.
[0006] The core of the method for evaluating the key points of marching training movements is the real-time detection of key points in various parts of the human body. With the rapid development of deep learning technology, many deep learning-based methods for human key point detection have been proposed. These methods learn key point information of the human skeleton from two-dimensional images and mark the corresponding positions on the images. Currently, there has been considerable research in this area both domestically and internationally. Among them, the Openpose algorithm developed by Carnegie Mellon University has good robustness and accuracy and has been widely used in abnormal behavior detection, motion synthesis, and health diagnosis. However, there are few reports on its application in evaluating the key points of marching training movements. Compared to existing application systems, evaluating the key points of marching training movements requires not only considering the correlation between key points in the same frame but also the changes in key points between adjacent frames, such as detecting whether the leg bends during a kick. Furthermore, it is necessary to calculate various quantitative indicators of the movement based on the key points and then analyze and evaluate them. Summary of the Invention
[0007] The purpose of this invention is to address the shortcomings of existing technologies by providing a visual detection-based method for evaluating the key points of marching training movements.
[0008] The technical solution adopted by this invention to solve its technical problem includes the following steps:
[0009] Step S1: Multi-camera deployment and calibration.
[0010] Step S2: Human body region extraction and camera switching.
[0011] Step S3: Extraction of key points of the human body.
[0012] Step S4: Calculate the posture of each part of the human body.
[0013] Step S5: Human movement and posture scoring.
[0014] The beneficial effects of this invention are as follows:
[0015] This invention analyzes images or videos of the human body marching to extract posture data from key body parts, such as the shoulders, elbows, knees, and ankles. This data is used to determine whether the individual movements during marching training meet the standards, thereby improving training efficiency. The system is characterized by its ease of operation, accurate evaluation, and excellent performance. Attached Figure Description
[0016] Figure 1 A diagram illustrating camera deployment.
[0017] Figure 2 This is a schematic diagram of the main steps of the present invention. Detailed Implementation
[0018] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0019] like Figure 1 and 2 As shown, a method for evaluating the key points of marching training movements based on visual detection includes the following steps:
[0020] Step S1: Multi-camera deployment and calibration.
[0021] Step S2: Human body region extraction and camera switching.
[0022] Step S3: Extraction of key points of the human body.
[0023] Step S4: Calculate the posture of each part of the human body.
[0024] Step S5: Human movement and posture scoring.
[0025] Step S1 includes:
[0026] Based on the detection range during marching training, multiple cameras need to be positioned along the sides of the marching route, and one camera needs to be positioned directly above it. The relationship between the effective field of view W of the cameras, the length L of the training area, and the number of cameras N1 positioned along the sides is shown in the following formula:
[0027] N1 = [L / W]
[0028] [] represents the integer operation.
[0029] Since the system also needs to evaluate the trainee's frontal movement standards, an additional camera should be deployed in front. Therefore, the total number of cameras N required for the entire system is:
[0030] N = N1 + 1
[0031] In terms of camera calibration, this system adopts the "Zhang Zhengyou checkerboard calibration method". This method uses image stitching to connect the small checkerboard grids identified by each camera into a large checkerboard grid. Each camera can be calibrated using the large checkerboard grid, which provides a unified one-time calibration for each camera. This reduces calibration errors and eliminates the need for recalibration during camera switching, simplifying the operation steps.
[0032] Step S2 includes:
[0033] Human body region extraction is achieved using the mature YOLOv4 object detection model. The advantage of the YOLOv4 algorithm is that it uses a regression method to solve object detection in images or videos, thus ensuring that its recognition rate remains at a high level.
[0034] The YOLOv4 object detection model used in this system extracts the human body region with the best confidence during object detection. To ensure the integrity of the human body cropping region, the system expands the bounding box of the human body. If the extraction is unsuccessful, the system will output "No target region detected" in the output box in the lower right corner of the system. If the extraction is successful, the data will be saved.
[0035] The automatic switching between cameras also uses the YOLOv4 model. If the identified human body area reaches the left side of the image area, the system switches to the left camera; if the identified human body area reaches the right side of the image area, the system switches to the right camera.
[0036] Step S3 includes:
[0037] This system uses the mature human pose recognition algorithm—OpenPose—for keypoint extraction. It extracts regions of interest (ROIs) from the current frame image at its original size, and then extracts human keypoints from these ROIs upon successful extraction. If keypoint extraction fails, the system outputs "Keypoint extraction failed." If extraction is successful, the keypoint coordinates are restored to their original positions for keypoint extraction in the next frame. It detects 25 human keypoints: 1. Nose, 2. Neck, 3. Right shoulder, 4. Right elbow, 5. Right wrist, 6. Left shoulder, 7. Left elbow, 8. Left wrist, 9. Hip, 10. Right hip joint, 11. Right knee, 12. Right ankle, 13. Left hip joint, 14. Left knee, 15. Left ankle, 16. Right eye, 17. Left eye, 18. Right ear, 19. Left ear, 20. Left big toe, 21. Left little toe, 22. Left heel, 23. Right big toe, 24. Right little toe, 25. Right heel.
[0038] Step S4 includes:
[0039] The key points will be divided into two halves: upper and lower body. The key points for the upper body include: 1. nose, 2. neck, 3. right shoulder, 4. right elbow, 5. right wrist, 6. left shoulder, 7. left elbow, 8. left wrist, 16. right eye, 17. left eye, 18. right ear, and 19. left ear. The key points for the lower body include: 9. hip, 10. right hip joint, 11. right knee, 12. right ankle, 13. left hip joint, 14. left knee, 15. left ankle, 20. left big toe, 21. left little toe, 22. left heel, 23. right big toe, 24. right little toe, and 25. right heel.
[0040] Location information of each key point (X) k Y k ), where k is the number of the 25 key points, X k The x-coordinate (Y) of the key point numbered k in the plane is represented by the following formula: kThis represents the ordinate of the key point numbered k in the plane.
[0041] Furthermore, the assessment of key points in the lower body is implemented as follows:
[0042] First, each leg is designated as the supporting leg and the swinging leg, respectively. The supporting leg is determined based on the hip joint and heel, and the corresponding leg is designated as the swinging leg. Then, the posture information, such as whether the supporting leg is bent, whether the instep of the swinging leg is parallel, whether the swinging leg is bent, and the height of the instep of the swinging leg relative to the ground, is detected. Finally, based on the detected posture information, key points of the lower body are calculated and evaluated.
[0043] ① Use key points 10, 12, 13, and 15 to determine whether the supporting leg is perpendicular to the ground.
[0044] Calculating the support leg requires data from the following four key points (X) 10 Y 10 ),(X 12 Y 12 ),(X 13 Y 13 ),(X 15 Y 15 The formula is as follows:
[0045] H left =X 13 -X 15 (1)
[0046] H right =X 10 -X 12 (2)
[0047] Where H left and H right These represent the vertical heights of the left and right legs projected in the image, respectively.
[0048] The absolute values of the vertical heights of the left and right legs projected into the image are compared, i.e., |H is compared. left With |H right The value of | is given by the following formula:
[0049]
[0050] ② Calculate the angle between your left foot and the ground to determine whether your left foot is horizontal to the ground.
[0051] For the left foot, three key point data points (X) are needed. 20 Y 20 ),(X 21 Y 21 ),(X 22 Y 22), calculate the vertical difference ΔY0 between keypoints 20 and 22 in the image, and the vertical difference ΔY1 between keypoints 21 and 22 in the image, as shown in the formula:
[0052] ΔY0=Y 22 -Y 20 (4)
[0053] ΔY1=Y 22 -Y 21 (5)
[0054] If |ΔY0| < |ΔY1|, then the information of key point number 20 is selected for calculation. The final calculated angle_leftfoot of the left foot in the image is as follows:
[0055]
[0056] If |ΔY0|>|ΔY1|, then the information of key point 21 is selected for calculation, and the calculation formula is as follows:
[0057]
[0058] ③ Calculate the angle between your right foot and the ground to determine whether your right foot is horizontal to the ground.
[0059] For the right foot, obtain the corresponding three key point data (X). 25 Y 25 ),(X 24 Y 24 ),(X 23 Y 23 After that, calculate the vertical difference ΔY2 between keypoints 23 and 25 in the image, and the vertical difference ΔY3 between keypoints 24 and 25 in the image, as shown in the formula:
[0060] ΔY2=Y 25 -Y 23 (8)
[0061] ΔY3=Y 25 -Y 24 (9)
[0062] If |ΔY2| < |ΔY3|, then the information of key point 23 is selected for calculation. The final calculated angle angle_rightfoot is shown below:
[0063]
[0064] If |ΔY2|>|ΔY3|, then select key point 24 to participate in the calculation. The calculation formula is as follows:
[0065]
[0066] ④ Calculate the angle between the left thigh and the ground to determine whether the angle between the swinging left leg and the supporting right leg meets the standard.
[0067] For the left thigh, obtain the corresponding two key point data (X). 13 Y 13 ),(X 14 Y 14 The calculation is performed by taking the horizontal and vertical differences between keypoints 13 and 14 in the image, and finally calculating the angle angle_leftthigh, as shown in the following formula:
[0068]
[0069] ⑤ Calculate the angle between the right thigh and the ground to determine whether the angle between the swinging right leg and the supporting left leg meets the standard.
[0070] For the right thigh, obtain the corresponding two key point data (X). 10 Y 10 ),(X 11 Y 11 The calculation is performed by determining the horizontal and vertical differences between keypoints 10 and 11 in the image, and finally calculating the angle_rightthigh. The formula is as follows:
[0071]
[0072] ⑥ Calculate the angle between the left lower leg and the ground to determine whether the left swinging leg is straight.
[0073] For the left lower leg, obtain the corresponding two key point data (X). 14 Y 14 ),(X 15 Y 15 The calculation is performed by taking the horizontal and vertical differences between keypoints 14 and 15 in the image, and finally calculating the angle_leftshin. The formula is as follows:
[0074]
[0075] ⑦ Calculate the angle between the right lower leg and the ground to determine whether the right swinging leg is straight.
[0076] For the right lower leg, obtain the data of the two corresponding key points (X). 11 Y 11 ),(X 12 Y 12The calculation is performed by taking the horizontal and vertical differences between keypoints 11 and 12 in the image, and finally calculating the angle_rightshin. The formula is as follows:
[0077]
[0078] Furthermore, the assessment of key points in the upper body is implemented as follows:
[0079] It detects and calculates the posture angles of the head, neck, shoulders, arms, upper body, and hands, and identifies whether they meet the requirements of head upright, shoulders level, and upper body straight.
[0080] (1) Calculate the angle between the neck and the ground to determine whether the head and neck are tilted.
[0081] For the neck, the corresponding two keypoint data (X1, Y1) and (X2, Y2) are obtained for calculation. The horizontal and vertical differences between keypoint 1 and keypoint 2 in the image are calculated respectively. Finally, the angle_neck is calculated, as shown in the following formula:
[0082]
[0083] (2) Calculate the angle between the chest and the ground to determine whether the upper body is tilted.
[0084] For the chest area, we obtain the corresponding two keypoint data points (X2, Y2) and (X9, Y9) for calculation. We calculate the horizontal and vertical differences between keypoint 1 and keypoint 9 in the image, respectively, and finally calculate the angle_chest. The formula is as follows:
[0085]
[0086] (3) Calculate the angle between the left upper arm and the ground to determine whether the left arm is horizontal to the ground.
[0087] For the upper left arm, we obtain the corresponding two keypoint data (X6, Y6) and (X7, Y7) for calculation. We calculate the horizontal and vertical differences between keypoints 6 and 7 in the image, and finally calculate the angle angle_leftelbow, as shown in the following formula:
[0088]
[0089] (4) Calculate the angle between the right upper arm and the ground to determine whether the right arm is horizontal to the ground.
[0090] For the upper right arm, we obtain the corresponding two keypoint data (X3, Y3) and (X4, Y4) for calculation. We calculate the horizontal and vertical differences between keypoints 3 and 4 in the image, respectively, and finally calculate the angle angle_rightelbow, as shown in the following formula:
[0091]
[0092] (5) Calculate the angle between the left forearm and the ground to determine whether the left swing arm is horizontal to the ground.
[0093] For the left forearm, we obtain the corresponding two keypoint data (X7, Y7) and (X8, Y8) for calculation. We calculate the horizontal and vertical differences between keypoints 7 and 8 in the image, respectively, and finally calculate the angle angle_leftarm. The formula is as follows:
[0094]
[0095] (6) Calculate the angle between the right forearm and the ground to determine whether the right arm is horizontal to the ground.
[0096] For the right forearm, we obtain the corresponding two keypoint data (X4, Y4) and (X5, Y5) for calculation. We calculate the horizontal and vertical differences between keypoints 4 and 5 in the image, respectively, and finally calculate the angle_rightarm. The formula is as follows:
[0097]
[0098] Furthermore, the foot height and stride of the swing leg are calculated as follows:
[0099] To extract key points from the left and right ankles, first set a series of parameters: `detect_step` indicates whether the position is being searched for (e.g., marching position or stride position); `HDist` records the horizontal distance between the left and right ankles when in the marching position, used for stride detection; `maxVDist` finds the maximum vertical distance between the left and right ankles, used to determine if it's a front kick position; and `maxHDist` represents the maximum horizontal distance between the left and right ankles, used to determine if it's in a stride detection position.
[0100] The system begins detecting and counting the steps. When the vertical distance between the left and right ankles is at its maximum, the maximum value is saved and set as the step height. The horizontal distance between the left and right ankles at this time is also saved as the stride length. If the current distance between the left and right ankles is equal to the maximum distance, the position with the smallest foot angle is saved. The position with the smallest foot angle is saved, and the step image is saved. The horizontal distance between the left and right ankles at this time is also saved as the stride length. The instructor can use these two sets of data to determine whether the height of each step in the soldier's step is the same and whether the stride length is the same, allowing the instructor to more carefully correct the soldier's step training.
[0101] Step S5 includes:
[0102] Scoring is based on the queue action scoring criteria and the detected pose relationships. The scoring criteria are shown in the table below.
[0103] Scoring Criteria Deduction of points Head and neck tilt -A1 points upper body tilt -A2 points Left forearm not horizontal with the ground -A3 points Right forearm not horizontal with the ground -A4 points The supporting leg is not perpendicular to the ground. -A5 points The angle between the swinging leg and the supporting leg is too large. -A6 points The angle between the swinging leg and the supporting leg is too small. -A7 points Left foot not parallel to the ground -A8 points Right foot not parallel to the ground -A9 points The supporting leg is not perpendicular to the ground. -A10 points Step height too large -A11 points Step height too small -A12 points Too large a stride -A13 points Stride too small -A14 points
[0104] If the total deduction exceeds the set threshold, the score is considered unqualified.
[0105] For example: A1-A14 are all worth 1 point, with a full score of 100 points. 95-100 points is excellent, 90-95 points is good, and below 90 points is unqualified.
[0106] A vision-based system for evaluating the key points of marching training movements is characterized by including a multi-camera deployment and calibration module, a human body region extraction and camera switching module, a human body key point extraction module, a human body posture calculation module, and a human body movement posture scoring module.
[0107] The multi-camera deployment and calibration module specifically involves arranging multiple cameras on the sides of the marching route and one camera directly above it, based on the detection range during marching training. The relationship between the effective field of view W of the cameras, the length L of the training ground, and the number N1 of cameras arranged on the sides is shown in the following formula:
[0108] N1 = [L / W]
[0109] Where [] represents the integer operation;
[0110] Since it is necessary to assess the trainees' frontal movement standards, an additional camera needs to be deployed in front. Therefore, the total number of cameras N required for the entire system is:
[0111] N = N1 + 1
[0112] For camera calibration, the "Zhang Zhengyou checkerboard calibration method" is adopted.
[0113] The human body region extraction and camera switching module uses the mature YOLOv4 target detection model to extract the human body region. During target detection, it extracts the human body region with the best confidence. The automatic switching between cameras also uses the YOLOv4 model. If the identified human body region reaches the left side of the image region, the system switches to the left camera; if the identified human body region reaches the right side of the image region, the system switches to the right camera.
[0114] The human key point extraction module uses the mature human pose recognition algorithm—OpenPose—to extract key points. It extracts the region of interest from the current frame image of the original size. If the extraction is successful, it extracts human key points from the region of interest. If the extraction of key points fails, it outputs "Key point extraction failed" in the system output box. If the extraction is successful, it restores the coordinates of the key points to their original positions so that key point extraction can be performed on the next frame image.
[0115] The aforementioned human body posture calculation module divides key points into upper and lower body key points. The upper body key points include: 1. nose, 2. neck, 3. right shoulder, 4. right elbow, 5. right wrist, 6. left shoulder, 7. left elbow, 8. left wrist, 16. right eye, 17. left eye, 18. right ear, and 19. left ear. The lower body key points include: 9. hip, 10. right hip joint, 11. right knee, 12. right ankle, 13. left hip joint, 14. left knee, 15. left ankle, 20. left big toe, 21. left little toe, 22. left heel, 23. right big toe, 24. right little toe, and 25. right heel.
[0116] Location information of each key point (X) k Y k ), where k is the number of the 25 key points, X k The x-coordinate (Y) of the key point numbered k in the plane is represented by the following formula: k This represents the ordinate of the key point numbered k in the plane.
Claims
1. A method for evaluating the key points of marching training movements based on visual detection, characterized in that... Includes the following steps: Step S1: Multi-camera deployment and calibration; Step S2: Human body region extraction and camera switching; Step S3: Extraction of key points in the human body; Step S4: Calculate the posture of each part of the human body; Step S5: Human movement and posture scoring; Step S4 is specifically implemented as follows: The key points are divided into upper and lower body sections. The key points for the upper body include:
1. nose, 2. neck, 3. right shoulder, 4. right elbow, 5. right wrist, 6. left shoulder, 7. left elbow, 8. left wrist, 16. right eye, 17. left eye, 18. right ear, and 19. left ear. The key points for the lower body include:
9. hip, 10. right hip joint, 11. right knee, 12. right ankle, 13. left hip joint, 14. left knee, 15. left ankle, 20. left big toe, 21. left little toe, 22. left heel, 23. right big toe, 24. right little toe, and 25. right heel. Let the location information of each key point (X) be... k Y k ), where k is the number of the 25 key points, X k The x-coordinate (Y) of the key point numbered k in the plane is represented by the following formula: k This represents the ordinate of the key point numbered k in the plane; The assessment of key points in the lower body is implemented as follows: First, designate each leg as the supporting leg and the swinging leg respectively; determine the supporting leg based on the hip joint and heel, and designate the corresponding other leg as the swinging leg; Then, the following information is detected: whether the supporting leg is bent, whether the instep of the swinging leg is parallel, whether the swinging leg is bent, and the positional information of the height of the instep of the swinging leg relative to the ground. Finally, based on the detected pose information, the key points of the lower body are calculated and evaluated; The specific implementation of the assessment of key points in the lower body is as follows: ① Use key points 10, 12, 13, and 15 to determine whether the supporting leg is perpendicular to the ground; Calculating the support leg requires data from the following four key points (X) 10 Y 10 ),(X 12 Y 12 ),(X 13 Y 13 ),(X 15 Y 15 The formula is as follows: H left =X 13 -X 15 (1) H right =X 10 -X 12 (2) Where H left and H right These represent the vertical heights of the left and right legs projected in the image, respectively. The absolute values of the vertical heights of the left and right legs projected into the image are compared, i.e., |H is compared. left |and|H right The value of | is given by the following formula: ② Calculate the angle between the left foot and the ground to determine whether the left foot is horizontal to the ground; For the left foot, three key point data points (X) are needed. 20 Y 20 ),(X 21 Y 21 ),(X 22 Y 22 ), calculate the vertical difference ΔY0 between keypoints 20 and 22 in the image, and the vertical difference ΔY1 between keypoints 21 and 22 in the image, as shown in the formula: ΔY0=Y 22 -AND 20 (4) ΔY1=Y 22 -AND 21 (5) If |ΔY0| < |ΔY1|, then the information of key point number 20 is selected for calculation. The final calculated angle_leftfoot of the left foot in the image is as follows: If |ΔY0|>|ΔY1|, then the information of key point 21 is selected for calculation, and the calculation formula is as follows: ③ Calculate the angle between the right foot and the ground to determine whether the right foot is horizontal to the ground; For the right foot, obtain the corresponding three key point data (X). 25 Y 25 ),(X 24 Y 24 ),(X 23 Y 23 After that, calculate the vertical difference ΔY2 between keypoints 23 and 25 in the image, and the vertical difference ΔY3 between keypoints 24 and 25 in the image, as shown in the formula: ΔY2=Y 25 -Y 23 (8) ΔY3=Y 25 -AND 24 (9) If |ΔY2| < |ΔY3|, then the information of key point 23 is selected for calculation. The final calculated angle angle_rightfoot is shown below: If |ΔY2|>|ΔY3|, then select key point 24 for calculation, and the calculation formula is as follows: ④ Calculate the angle between the left thigh and the ground to determine whether the angle between the swinging left leg and the supporting right leg meets the standard; For the left thigh, obtain the corresponding two key point data (X). 13 Y 13 ),(X 14 Y 14 The calculation is performed by taking the horizontal and vertical differences between keypoints 13 and 14 in the image, and finally calculating the angle angle_leftthigh, as shown in the following formula: ⑤ Calculate the angle between the right thigh and the ground to determine whether the angle between the swinging right leg and the supporting left leg meets the standard; For the right thigh, obtain the corresponding two key point data (X). 10 Y 10 ),(X 11 Y 11 The calculation is performed by determining the horizontal and vertical differences between keypoints 10 and 11 in the image, and finally calculating the angle_rightthigh. The formula is as follows: ⑥ Calculate the angle between the left lower leg and the ground to determine whether the left swinging leg is straight; For the left lower leg, obtain the corresponding two key point data (X). 14 Y 14 ),(X 15 Y 15 The calculation is performed by taking the horizontal and vertical differences between keypoints 14 and 15 in the image, and finally calculating the angle_leftshin. The formula is as follows: ⑦ Calculate the angle between the right lower leg and the ground to determine whether the right swinging leg is straight; For the right lower leg, obtain the data of the two corresponding key points (X). 11 Y 11 ),(X 12 Y 12 The calculation is performed by taking the horizontal and vertical differences between keypoints 11 and 12 in the image, and finally calculating the angle_rightshin. The formula is as follows:
2. The method for evaluating the key points of marching training movements based on visual detection according to claim 1, characterized in that... Step S1 is specifically implemented as follows: Based on the detection range during marching training, multiple cameras are positioned along the sides of the marching route, and one camera is positioned directly above it. The relationship between the effective field of view W of the cameras, the length L of the training area, and the number of cameras N1 positioned along the sides is shown in the following formula: N1 = [L / W] Where [] represents the integer operation; Since it is necessary to assess the trainees' frontal movement standards, an additional camera needs to be deployed in front. Therefore, the total number of cameras N required for the entire system is: N = N1 + 1 For camera calibration, the "Zhang Zhengyou checkerboard calibration method" is adopted.
3. The method for evaluating the key points of marching training movements based on visual detection according to claim 1, characterized in that... Step S2 is specifically implemented as follows: The mature YOLOv4 object detection model is used to extract human body regions. During object detection, the human body region with the best confidence is extracted. The automatic switching between cameras also uses the YOLOv4 model. If the identified human body region reaches the left side of the image region, the system switches to the left camera; if the identified human body region reaches the right side of the image region, the system switches to the right camera.
4. The method for evaluating the key points of marching training movements based on visual detection according to claim 3, characterized in that... Step S3 is specifically implemented as follows: The mature human pose recognition algorithm, OpenPose, is used for key point extraction. The region of interest is extracted from the current frame image at its original size. If the extraction is successful, human key points are extracted from the region of interest. If the key point extraction fails, the system outputs "Key point extraction failed". If the extraction is successful, the key point coordinates are restored to their original positions for key point extraction in the next frame image. The test examines 25 key points on the human body:
1. Nose, 2. Neck, 3. Right shoulder, 4. Right elbow, 5. Right wrist, 6. Left shoulder, 7. Left elbow, 8. Left wrist, 9. Hips, 10. Right hip joint, 11. Right knee, 12. Right ankle, 13. Left hip joint, 14. Left knee, 15. Left ankle, 16. Right eye, 17. Left eye, 18. Right ear, 19. Left ear, 20. Left big toe, 21. Left little toe, 22. Left heel, 23. Right big toe, 24. Right little toe, 25. Right heel.
5. The method for evaluating the key points of marching training movements based on visual detection according to claim 1, characterized in that... For key points of the upper body, the system detects and calculates the posture angles of the head, neck, shoulders, arms, upper body, and hands to identify whether they meet the requirements of an upright head, level shoulders, and straight upper body. The specific implementation is as follows: (1) Calculate the angle between the neck and the ground to determine whether the head and neck are tilted; For the neck, the corresponding two keypoint data (X1, Y1) and (X2, Y2) are obtained for calculation. The horizontal and vertical differences between keypoint 1 and keypoint 2 in the image are calculated respectively. Finally, the angle_neck is calculated, as shown in the following formula: (2) Calculate the angle between the chest and the ground to determine whether the upper body is tilted; For the chest area, we obtain the corresponding two keypoint data points (X2, Y2) and (X9, Y9) for calculation. We calculate the horizontal and vertical differences between keypoint 1 and keypoint 9 in the image, respectively, and finally calculate the angle_chest. The formula is as follows: (3) Calculate the angle between the left upper arm and the ground to determine whether the left arm is horizontal to the ground; For the upper left arm, the corresponding two keypoint data (X6, Y6) and (X7, Y7) are obtained for calculation. The horizontal and vertical differences between keypoints 6 and 7 in the image are calculated respectively. Finally, the angle angle_leftelbow is calculated, as shown in the following formula: (4) Calculate the angle between the right upper arm and the ground to determine whether the right arm is horizontal to the ground; For the upper right arm, the corresponding two keypoint data (X3, Y3) and (X4, Y4) are obtained for calculation. The horizontal and vertical differences between keypoints 3 and 4 in the image are calculated respectively. Finally, the angle angle_rightelbow is calculated, as shown in the following formula: (5) Calculate the angle between the left forearm and the ground to determine whether the left swing arm is horizontal to the ground; For the left forearm, the corresponding two keypoint data (X7, Y7) and (X8, Y8) are obtained for calculation. The horizontal and vertical differences between keypoints 7 and 8 in the image are calculated respectively. Finally, the angle angle_leftarm is calculated, as shown in the following formula: (6) Calculate the angle between the right forearm and the ground to determine whether the right arm is horizontal to the ground; For the right forearm, the corresponding two keypoint data (X4, Y4) and (X5, Y5) are obtained for calculation. The horizontal and vertical differences between keypoints 4 and 5 in the image are calculated respectively. Finally, the angle angle_rightarm is calculated, as shown in the following formula:
6. The method for evaluating the key points of marching training movements based on visual detection according to claim 5, characterized in that... The calculation of the foot height and stride length of the swing leg is achieved as follows: To extract key points of the left and right ankles, first set a series of parameters: detect_step indicates that the position of the marching step or stride position is being searched; HDist indicates that the horizontal distance between the left and right ankles is recorded when the position of the marching step is being searched, which is used for stride detection; maxVDist indicates that the maximum vertical distance between the left and right ankles is being searched, which is used to determine whether it is a front kick position; maxHDist indicates the maximum horizontal distance between the left and right ankles, which is used to determine whether it is in the stride detection position. The system begins detecting and counting the steps. When the vertical distance between the left and right ankles is at its maximum, the maximum value is saved and set as the step height. The horizontal distance between the left and right ankles at this time is also saved as the stride length. If the current distance between the left and right ankles is equal to the maximum distance, the position with the smallest foot angle is saved. The position with the smallest foot angle is saved, and the step image is saved. The horizontal distance between the left and right ankles at this time is also saved as the stride length. The instructor can use these two sets of data to determine whether the height of each step in the soldier's step is the same and whether the stride length is the same, allowing the instructor to more carefully correct the soldier's step training.
Citation Information
Patent Citations
Intelligent motion guidance method and system based on visual AI
CN111883229A