Search

CN-121982768-A - Method, device, equipment and medium for detecting and analyzing horizontal and parallel bar training actions

CN121982768ACN 121982768 ACN121982768 ACN 121982768ACN-121982768-A

Abstract

The invention provides a method, a device, equipment and a medium for detecting and analyzing a horizontal bar training action, wherein the method comprises the steps of collecting horizontal bar or horizontal bar training videos according to a set mode, obtaining detection results, achieving start and end judgment of each stage, respectively carrying out frame size normalization and division part subsequences according to each divided stage, carrying out moving average smoothing on each subsequence, obtaining standardized test feature sequences of each stage and each part, carrying out time sequence alignment by adopting a DTW or FastDTW time sequence alignment algorithm at each stage and each part according to a preloaded standard sequence and the test feature sequences, generating visual contents, generating a diagnosis report of the set contents, realizing automatic evaluation training, and effectively improving training efficiency and training quality.

Inventors

  • MA GUANGJIAN
  • ZHANG DENGPAN
  • ZHANG ZHUMING

Assignees

  • 恒鸿达(福建)体育科技有限公司

Dates

Publication Date
20260505
Application Date
20251230

Claims (10)

  1. 1. A method for detecting and analyzing a horizontal bar and parallel bar training action is characterized by comprising the following steps: Step 1, acquiring horizontal bar or parallel bar training videos by adopting a set camera according to a set mode, and loading corresponding preset JSON parameter files according to the selected motion category; Step 2, detecting a human body boundary frame by using a YOLOv s model pre-trimmed by a horizontal-parallel bar scene, outputting normalized coordinates and confidence degrees of 17 key points in the human body boundary frame by using a HRNet-W32 model pre-trimmed by a horizontal-parallel bar action, and further filtering an invalid detection result by combining a preset ROI region and a minimum human body frame area threshold; Step 3, predefining a reference judgment line of relative frame proportion according to the motion category, selecting a hip center or a trunk center as a core judgment key point, and realizing the starting and ending judgment of each stage by continuously 3 frames according to the position relation between the core judgment key point and the judgment line and meeting the triggering condition; Step 4, respectively carrying out frame size normalization and division of the sub-sequences of the parts according to each divided stage, and carrying out moving average smoothing on each sub-sequence to obtain a standardized test characteristic sequence of each stage and each part; Step 5, according to the preloaded standard sequence and the test characteristic sequence, performing time sequence alignment by adopting a DTW or FastDTW time sequence alignment algorithm at each stage and each position respectively, fusing the Euclidean distance of the key point coordinates and the joint angle difference as local distances, constructing an accumulated distance matrix, normalizing the path length, and converting the normalized distance into similarity through index mapping; And 6, generating visual contents, namely synchronously playing back the test action and the split screen of the standard action, identifying the defect part and the corresponding stage according to a preset threshold value, positioning a specific defect frame, and generating a diagnosis report of the set contents.
  2. 2. The method for detecting and analyzing the horizontal bar and parallel bar training actions according to claim 1, wherein the step 1 is specifically as follows: The method comprises the steps of collecting horizontal bar or parallel bar training videos by adopting cameras with frame rate of more than or equal to 30fps and resolution of more than or equal to 1920 multiplied by 1080 according to shooting distance of 3-5m, motion of 70% -80% of pictures, horizontal deviation of lens center and bar center of less than or equal to + -5 cm, illumination of more than or equal to 300lux and standard of pure color background, and loading corresponding preset JSON parameter files according to selected motion categories, wherein the preset JSON parameter files comprise reference judgment line relative proportion coordinates, part weights, stage weights, fusion coefficients alpha, beta and smoothing coefficients gamma.
  3. 3. The method for detecting and analyzing the horizontal bar and parallel bar training actions according to claim 1, wherein the step 2 is specifically as follows: Detecting a human body boundary frame by using a YOLOv s model which is pre-trimmed by a horizontal and parallel bar scene, and only reserving a single target with the largest area and the confidence coefficient more than or equal to 0.5, wherein the confidence coefficient threshold value is 0.5 and the IOU threshold value is 0.45; Outputting normalized coordinates and confidence coefficients of 17 key points in the human body boundary frame by using a HRNet-W32 model which is pre-trimmed through a horizontal and parallel lever action, and performing linear interpolation complementation on the key points with the opposite confidence coefficient less than 0.2 or missing continuous 5 frames; and further filtering invalid detection results by combining the preset ROI area and the minimum human body frame area threshold.
  4. 4. The method for detecting and analyzing the horizontal bar and parallel bar training actions according to claim 1, wherein the step 3 is specifically: The method comprises the steps of predefining a reference judgment line of relative frame proportion according to motion types, selecting a hip center or a trunk center as a core judgment key point, realizing starting and ending judgment of each stage by using the position relation of the core judgment key point and the judgment line to continuously realize 3 frames to meet triggering conditions, and carrying out abnormal re-judgment on the condition that the duration of the stage is less than 5 frames or the continuous 5 frames of the core key point are lost.
  5. 5. The method for detecting and analyzing the horizontal bar and parallel bar training actions according to claim 1, wherein the step 4 is specifically: And respectively carrying out frame size normalization according to each divided stage, dividing into five sub-sequences of a left arm, a right arm, a left leg, a right leg and a trunk according to an anatomical structure, carrying out moving average smoothing on each sub-sequence, calculating a left/right elbow angle, a left/right knee angle and a trunk inclination angle to form a coordinate and angle fusion feature vector, and obtaining a standardized test feature sequence of each stage and each part.
  6. 6. The method for detecting and analyzing the horizontal bar and parallel bar training actions according to claim 1, wherein the step 5 is specifically: According to the preloaded standard sequence and the test characteristic sequence, performing time sequence alignment by adopting a DTW or FastDTW time sequence alignment algorithm at each stage and each part respectively; calculating a local distance by fusing a Euclidean distance of key point coordinates and joint angle differences, wherein the Euclidean distance of the coordinates is the Euclidean distance average value of normalized coordinates of all key points of the part, the joint angle difference is the absolute difference average value of all joint angles of the part, and the fused local distance formula is as follows: ; d pos (t, u) is the Euclidean distance of coordinates, d ang (t, u) is the angle difference distance, and the local distance d (t, u) between the t frame of the test characteristic sequence and the u frame of the standard sequence is defined, wherein alpha and beta are the set fusion coefficients, and alpha and beta are more than or equal to 0; Constructing an accumulated distance matrix, calculating the accumulated distance according to a recurrence formula, and normalizing the path length to obtain a normalized distance By an exponential mapping formula Obtaining the similarity of the parts, wherein gamma is a smoothing coefficient, and gamma is more than 0, and calculating the similarity of each stage according to the preset weight of the parts, wherein the formula is as follows: ; For the kth action stage, the similarity of each part is s k,p , the weight of the corresponding part is w p , Refers to the smallest value in the similarity of all parts; the full motion final score is: 。
  7. 7. The method for detecting and analyzing the horizontal bar and parallel bar training actions according to claim 1, wherein the step 6 is specifically: Generating an action evaluation and visualization result based on the full action final score, the similarity result of each action stage, the similarity of each body part and the action stage division information obtained in the step 3, wherein the visualization result comprises split-screen synchronous playback of a test action video and a standard action video, and marking the start and stop positions of each action stage on a time axis; the method comprises the steps of classifying test actions according to action phase similarity values, classifying the action quality into at least three classes, judging that the action quality of a phase is qualified or good when the phase similarity is larger than or equal to a first threshold value, judging that the action of the phase has slight deviation when the phase similarity is between the first threshold value and a second threshold value, judging that the phase has obvious defects when the phase similarity is lower than the second threshold value, and further combining part similarity results to identify corresponding body parts and action phases for the action phases judged to have the slight deviation or the obvious defects, and then generating a structured action diagnosis report.
  8. 8. A horizontal bar and parallel bar training action detecting and analyzing device is characterized by comprising: The video acquisition module adopts a set camera to acquire horizontal bar or parallel bar training videos according to a set mode; The gesture detection module is used for detecting a human body boundary frame by using a YOLOv s model which is pre-trimmed by a horizontal and parallel bar scene, outputting normalized coordinates and confidence degrees of 17 key points by using a HRNet-W32 model which is pre-trimmed by a horizontal and parallel bar action in the human body boundary frame, and further filtering invalid detection results by combining a preset ROI region and a minimum human body frame area threshold; The motion segmentation module predefines a reference judgment line of relative frame proportion according to the motion category, selects a hip center or a trunk center as a core judgment key point, and realizes the start and end judgment of each stage by meeting a trigger condition through continuous 3 frames of the position relation between the core judgment key point and the judgment line; The preprocessing module is used for respectively carrying out frame size normalization and division of the sub-sequences of the parts according to each divided stage, carrying out moving average smoothing on each sub-sequence and obtaining a standardized test characteristic sequence of each stage and each part; The scoring module is used for carrying out time sequence alignment by adopting a DTW or FastDTW time sequence alignment algorithm in each stage and each position according to the preloaded standard sequence and the test characteristic sequence, fusing the Euclidean distance of the key point coordinates and the joint angle difference as local distances, constructing an accumulated distance matrix, normalizing the path length, and converting the normalized distance into similarity through index mapping; the visual module is used for generating visual contents, including split-screen synchronous playback of test actions and standard actions, identifying defect parts and corresponding stages according to preset thresholds, positioning specific defect frames and generating a diagnosis report of set contents.
  9. 9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 7 when the program is executed by the processor.
  10. 10. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any one of claims 1 to 7.

Description

Method, device, equipment and medium for detecting and analyzing horizontal and parallel bar training actions Technical Field The invention relates to the technical field of computer vision, in particular to a method, a device, equipment and a medium for detecting and analyzing a horizontal bar and parallel bar training action. Background In the current physical training system of military, a horizontal bar is a key course for measuring upper limb strength, core strength and physical coordination of officers and soldiers, but action teaching, training evaluation and assessment mainly depend on manual observation of instructors. Because the action rhythm is fast, the amplitude is big, the stage is many and require accurate, and manual judgment is not only consuming time, is extremely easily received experience, attention and visual angle difference's influence simultaneously, and the scoring result often has the problem that subjectivity is strong, standard is inconsistent and lack detail feedback. Along with the development of computer vision and human body posture estimation technology, although key points of human bones can be extracted from videos, the existing method is mainly focused on overall action recognition, can not automatically segment multi-stage and high-dynamic complex military operations such as single and parallel bars, and is difficult to realize time sequence alignment and fine granularity scoring of crossing individuals and crossing speeds. In addition, the current technology generally lacks independent analysis, defect positioning and interpretable feedback capability for different body parts, cannot point out specific problems such as insufficient arm support, body deviation or asymmetric leg swing, and cannot meet the requirements of rapid, objective and quantifiable evaluation for large-scale personnel, no wearable equipment and outdoor scenes in military training. Therefore, an automatic action segmentation, similarity scoring and defect feedback system based on computer vision is needed to solve the technical pain points of insufficient objectivity, incapacity of quantification, lack of detail diagnosis and the like of single and parallel bar action evaluation in military training. Disclosure of Invention The invention aims to solve the technical problem of providing a method, a device, equipment and a medium for detecting and analyzing the horizontal and parallel bar training actions, realizing automatic evaluation training and effectively improving training efficiency and training quality. In a first aspect, the present invention provides a method for detecting and analyzing a horizontal bar and parallel bar training motion, including the following steps: Step 1, acquiring horizontal bar or parallel bar training videos by adopting a set camera according to a set mode, and loading corresponding preset JSON parameter files according to the selected motion category; Step 2, detecting a human body boundary frame by using a YOLOv s model pre-trimmed by a horizontal-parallel bar scene, outputting normalized coordinates and confidence degrees of 17 key points in the human body boundary frame by using a HRNet-W32 model pre-trimmed by a horizontal-parallel bar action, and further filtering an invalid detection result by combining a preset ROI region and a minimum human body frame area threshold; Step 3, predefining a reference judgment line of relative frame proportion according to the motion category, selecting a hip center or a trunk center as a core judgment key point, and realizing the starting and ending judgment of each stage by continuously 3 frames according to the position relation between the core judgment key point and the judgment line and meeting the triggering condition; Step 4, respectively carrying out frame size normalization and division of the sub-sequences of the parts according to each divided stage, and carrying out moving average smoothing on each sub-sequence to obtain a standardized test characteristic sequence of each stage and each part; Step 5, according to the preloaded standard sequence and the test characteristic sequence, performing time sequence alignment by adopting a DTW or FastDTW time sequence alignment algorithm at each stage and each position respectively, fusing the Euclidean distance of the key point coordinates and the joint angle difference as local distances, constructing an accumulated distance matrix, normalizing the path length, and converting the normalized distance into similarity through index mapping; And 6, generating visual contents, namely synchronously playing back the test action and the split screen of the standard action, identifying the defect part and the corresponding stage according to a preset threshold value, positioning a specific defect frame, and generating a diagnosis report of the set contents. In a second aspect, the present invention provides a device for detecting and analyzing a horizontal bar and parallel bar train