Action comparison method based on dynamic compression and constrained search

Through the motion comparison method of dynamic compression and constrained search, combined with human posture recognition and constrained path DTW algorithm, the low efficiency and high cost problems of traditional motion comparison are solved, and efficient and accurate motion evaluation is achieved.

CN116824698BActive Publication Date: 2025-09-26FUJIAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310766101.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-27
Publication Date
2025-09-26
Estimated Expiration
2043-06-27

AI Technical Summary

Technical Problem

Traditional motion comparison methods have disadvantages such as strong subjectivity, low efficiency, high cost, and difficult maintenance. Although the motion comparison method based on computer vision is highly objective, has small errors, and high efficiency, it has large computational complexity and poor real-time performance when processing large-scale data.

Method used

An action comparison method based on dynamic compression and constrained search is adopted. Joint features are obtained through human posture recognition. Double-threshold dynamic data compression technology is used to extract short sequences of action video features. The joint sequence similarity is calculated through the constrained path DTW algorithm and quantified into joint scores.

Benefits of technology

It achieves efficient and accurate motion comparison and evaluation, reduces the amount of calculation, improves the efficiency of video motion comparison, and avoids the subjectivity and equipment cost issues of traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116824698B_ABST
    Figure CN116824698B_ABST
Patent Text Reader

Abstract

The present invention discloses an action comparison method based on dynamic compression and constrained search, comprising: step 1): using a human posture recognition model to obtain the coordinates of human joint points in standard action and test action videos, and converting the coordinates into joint angles; step 2): using an optimized data compression method to obtain short sequences of joint angles of the standard action and the test action; step 3): using a constrained path DTW algorithm to calculate the similarity of the joint sequences of the standard action and the test action, and quantify the similarity into scores for each joint. The present invention combines human posture recognition to generate joint features, action sequence data compression technology, and action joint similarity comparison technology to construct a set of efficient and accurate video action comparison and scoring methods, which are suitable for further promotion and application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of action evaluation, and in particular to an action comparison method based on dynamic compression and constrained search. Background Art

[0002] In sports and fitness, correct form and effective training are ensured through movement comparison and analysis. Traditional and modern movement comparison are two commonly used techniques, both of which analyze human movement to improve athletic performance and fitness results. Traditional movement comparison relies on human visual observation and analysis, typically performed by experienced professionals to identify and correct athletes' poor form and movements. However, this method has drawbacks such as high subjectivity, low efficiency, and incomplete training feedback.

[0003] Modern motion comparison typically uses computer vision, sensors, and other equipment to capture and analyze human motion data, compare this data with standard motion data, and accurately quantify the student's performance so that any irregular movements can be corrected promptly. However, motion comparison using sensor equipment has drawbacks such as high cost and difficult maintenance. Computer vision-based motion comparison offers advantages such as strong objectivity, low error, and high efficiency. Compared to motion comparison methods based on sensors and other equipment, computer vision-based motion comparison has the advantage of requiring fewer devices.

[0004] To this end, the present invention combines human posture recognition to generate joint feature technology, action sequence data compression technology and action joint similarity comparison technology to construct a set of efficient and accurate video action comparison and scoring methods. Summary of the Invention

[0005] To solve the above problems, the present invention provides an action comparison method based on dynamic compression and constrained search to achieve efficient and accurate comparison and evaluation of video actions.

[0006] In order to achieve the above technical objectives, the technical solution adopted by the present invention is:

[0007] An action comparison method based on dynamic compression and constrained search, comprising:

[0008] Step 1): Use the human posture recognition model to obtain the coordinates of the human joint points in the standard action and test action videos, and convert them into joint angles;

[0009] Step 2): Use optimized data compression method to obtain short sequences of joint angles of standard movements and test movements;

[0010] Step 3): The constrained path DTW algorithm is used to calculate the joint sequence similarity between the standard action and the test action, and quantified into a score for each joint.

[0011] As a possible implementation, further, the human posture recognition model selects the BlazePose module in MediaPipe.

[0012] As a possible implementation, further, in step 1), the joint angle data is read once for each frame and arranged in sequence.

[0013] As a possible implementation, further, the optimized data compression method in step 2) specifically includes the following steps:

[0014] Step 2.1): Create an empty list S to store data compression ={};

[0015] Step 2.2): Read each joint angle data in the sequence in order. now When it is the joint angle data S1 of the first frame, store S1 in the list S compression ={s1};

[0016] Step 2.3): Read the next frame of joint angle data and store it in S now , get S compression The last value s in the list clast , and calculate s θ =|s clast -s now |;

[0017] Step 2.4): When s θ >θ1, then s now Save to list S compression And clear the static data counter k to zero, then backtrack and continue to execute step 2.3);

[0018] When S θ When ≤θ1, determine whether k is 0;

[0019] When k=0, s static =s now , set k = k + 1, and then backtrack to continue with step 2.3);

[0020] When k≠0, determine whether k%L is 0. When k%L=0, determine whether |s now -s static | is less than θ2, when |s now -s static |<θ2, then s now Store in list S compression and set k=k+1, then backtrack and continue to execute step 2.3); when |s now -s staticWhen |>θ2, set k=k+1 and backtrack to step 2.3);

[0021] When k%L≠0, set k=k+1 and backtrack to continue with step 2.3);

[0022] Among them, s now Indicates the currently read data, θ1 is the dynamic change threshold of the preset angle feature; θ2 is the static change threshold of the preset angle feature; s static Indicates the first data of the static trend; the static data counter is initialized to k=0, and L represents the static trend counting threshold;

[0023] Step 2.5): After all joint angle data are processed, the corresponding joint angle short sequence is obtained.

[0024] As a preferred implementation, preferably, in step 1), the joint point data obtained by the human posture recognition model is subjected to mean filtering and normalization processing.

[0025] As a possible implementation, the DTW algorithm for the constrained path is further specifically as follows: constraining the search range of the existing dynamic time warping path; wherein the constraint formula of the path search range is as follows:

[0026]

[0027] Among them, a i is the data position of the standard action sequence, b i is the data location of the test action sequence, w is the constraint area, and m is a i The total number of data, n is b i The total number of data.

[0028] As a possible implementation, further, the joint score calculation formula in step 3) is as follows:

[0029] a_S=100-L min (i,j) / m*A max *s

[0030] Among them, a_S is the score of the joint, L min (i, j) is the constraint-based dynamic regularization shortest path cumulative distance between the standard template sequence and the test sequence, m is the number of frames in the standard action template sequence, A max is the maximum angle of joint change, and s is the penalty coefficient.

[0031] Based on the above, the present invention also provides a computer-readable storage medium, which stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the above-mentioned action comparison method based on dynamic compression and constraint search.

[0032] By adopting the above technical solution, the present invention has the following beneficial effects compared with the prior art:

[0033] 1) Targeting the massive feature sequences in action videos, a dual-threshold dynamic data compression technique is implemented, tailored to the specific action sequences. This technique extracts short feature sequences from action videos using a threshold for angular feature difference for dynamic trend action sequences and a threshold for equal frame count and angular feature difference for static trend action sequences. This technique can extract a small number of representative short feature sequences that align with the patterns of action variation, reducing computational effort and improving the efficiency of video action comparison.

[0034] 2) To address the problems of nonlinear alignment of the time axis of action sequences and long comparison time of the dynamic time warping algorithm, the present invention uses dynamic time warping of the constrained search path to find the best matching path between the short sequence of standard actions and the short sequence of test actions, calculates the gap value of the two action feature sequences, and converts the gap value into the score of each joint of the test action through the penalty coefficient formula, thereby realizing the action comparison and evaluation well.

[0035] 3) Traditional motion comparison and evaluation suffer from shortcomings such as high subjectivity, low efficiency, and one-sided training feedback; sensor-based motion comparison also suffers from high cost and difficult maintenance. This paper combines human posture recognition and joint feature generation technology, motion sequence data compression technology, and motion joint similarity comparison technology to construct an efficient and accurate video motion comparison and scoring method. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0037] Figure 1 It is a schematic diagram of a brief implementation process of the present invention;

[0038] Figure 2 It is the skeleton graph extracted by human posture recognition;

[0039] Figure 3It is the joint point map recognized by BlazePose;

[0040] Figure 4 This is a diagram of the coach doing the Ba Duan Jin exercise with the left shoulder and left wrist angle changes;

[0041] Figure 5 It is the action data graph obtained by three data compression methods;

[0042] Figure 6 This is a comparison chart before and after data filtering and normalization;

[0043] Figure 7 It is the Euclidean distance and dynamic time warping sequence matching graph;

[0044] Figure 8 is the shortest path graph of the dynamic time warping of two sequences;

[0045] Figure 9 It is a dynamic time warping graph based on constraint paths;

[0046] Figure 10 It is a diagram of the Ba Duan Jin movement sequence of different volunteers;

[0047] Figure 11 It is the data trajectory diagram of the left shoulder-left wrist in three sets of video sequences;

[0048] Figure 12 This is a bar chart of joint scores obtained by two volunteers with different training experiences. DETAILED DESCRIPTION

[0049] The present invention will be described in further detail below with reference to the accompanying drawings and examples. It is particularly noted that the following examples are intended only to illustrate the present invention and are not intended to limit the scope of the present invention. Similarly, the following examples are only some embodiments of the present invention and are not intended to be exhaustive. All other embodiments obtained by those of ordinary skill in the art without creative effort are intended to fall within the scope of protection of the present invention.

[0050] Refer to the attached Figure 1 As shown, this embodiment provides an action comparison method based on dynamic compression and constrained search, including:

[0051] 1) Human pose estimation

[0052] Human pose estimation, also known as human key point detection, aims to locate human joints (such as elbows and wrists) based on input data such as images and videos. Obtaining human pose information through videos or images is the mainstream method of human pose estimation technology. This technology has been widely used in scenarios such as human-computer interaction, autonomous driving, smart sports and fitness, and ball sports guidance. The skeleton effect extracted by human pose recognition is as follows: Figure 2 shown.

[0053] In this embodiment, a human posture recognition model is used to obtain the coordinates of human joint points in standard action and test action videos, and the joint angle data is read once for each frame and arranged in sequence.

[0054] In this embodiment, the human posture recognition model uses the BlazePose module in MediaPipe to perform human posture recognition in action videos, extracting the position and posture information of key joints (such as Figure 3 These key joints represent the motion of human joints. MediaPipe is a cross-platform, scalable machine learning pipeline for building applications, including a suite of tools for image and video processing. BlazePose is a pose estimation module within MediaPipe that detects and tracks human poses.

[0055] The time series data of motion videos collected by the human posture recognition model can be affected by environmental factors such as light, which can cause jitter and distortion at joints. When a person self-occludes or moves their limbs too quickly, the model may misalign individual or partial joints.

[0056] To address possible problems in the data collected by the human posture recognition model, this embodiment further performs noise reduction and smoothing processing on the collected data through mean filtering, and performs data normalization processing.

[0057] The basic principle of mean filtering is to calculate the mean of all elements in a region around a point in the data sequence, using that point as the center. This mean value is then used to replace the central value, thereby eliminating noise points in the data sequence. Normalization converts the data into decimals in the range (0, 1), making subsequent data comparison and processing easier.

[0058] Figure 6 This is a comparison chart before and after data filtering and normalization. The experimental results show that mean filtering and normalization can not only ensure higher sensitivity but also have a good smoothing effect.

[0059] 2) Action sequence compression and data processing

[0060] The joint angle feature sequences of action videos are massive. Directly using two original data sequences to measure the similarity of actions will not only waste computing resources, but the accuracy of the action comparison results will also decrease with the increase of data dimension. Figure 4 This is complete motion frame data from a video of a coach performing some of the Eight-Section Brocade exercises, captured by the human posture recognition model. A one-minute video contains over 1,700 frames of image data, a significant amount that would severely impact the comparison algorithm. Therefore, before comparing the similarity between the two action sequences, we first simplify the time series data using some method.

[0061] There are two main traditional methods:

[0062] The core idea of ​​the first method is to discard minor changes in the sequence and extract the main features that represent these changes. This method, suitable for action video data mining, uses frame difference analysis. It saves frame data with certain feature changes between the previous and next frames, discarding frames with minor changes. Its pseudo code is shown in Table 1 below:

[0063] Table 1

[0064]

[0065]

[0066] Figure 5 (a) is the first method: extract the frame data stored by the angle difference θ=15 from the original data. Figure 5 (a) It can be seen that the static action feature data is discarded and only the changing action data is extracted. Actions include static actions and dynamic actions. This method of discarding static data is not applicable.

[0067] The core idea of ​​the second method is equal sampling. For action videos, this method uses an equal number of frames to extract and store data. Its pseudo code is shown in Table 2 below:

[0068] Table 2

[0069]

[0070]

[0071] Figure 5 (b) is the second method: extracting the data stored in the frame by the original data interval L=10 frames. Figure 5 (b) It can be seen that when the stored action angle A changes to angle B, only 3 frames of data are saved. For faster actions, dynamic data may even be missed or under-stored.

[0072] In view of the shortcomings of the above two traditional sequence compression methods, this embodiment uses an optimized data compression method to obtain short sequences of joint angles for standard movements and test movements. The optimized data compression method specifically includes the following steps:

[0073] Step 2.1): Create a new empty list: S compression ={}Prepare for storing the required data;

[0074] Step 2.2): Read each joint angle data in the sequence in order. now When the joint angle data of the first frame is now =s1), store S1 in the list S compression ={s1};

[0075] Step 2.3): Read the next frame of joint angle data and store it in S now , get S compression The last value s in the list clast , and calculate s θ =|s clast -s now |;

[0076] Step 2.4): When s θ >θ1, then s now Save to list S compression And clear the static data counter k to zero, then backtrack and continue to execute step 2.3);

[0077] When S θ When ≤θ1, determine whether k is 0;

[0078] When k=0, s static =s now , and at the same time set the static data counter k=k+1, then backtrack and continue to execute step 2.3);

[0079] When k≠0, determine whether k%L is 0. When k%L=0, determine whether |s now -s static | is less than θ2, when |s now -s static |<θ2, then s now Store in list S compression and set k=k+1, then backtrack and continue to execute step 2.3); when |s now -s static When |>θ2, set k=k+1 and backtrack to step 2.3);

[0080] When k%L≠0, set k=k+1 and backtrack to continue with step 2.3);

[0081] Step 2.5): After all joint angle data are processed, the corresponding joint angle short sequence is obtained.

[0082] In the above text now Indicates the currently read data; θ1 is the dynamic change threshold of the preset angle feature; θ2 is the static change threshold of the preset angle feature; s static Indicates the first data of the static trend; the static data counter is initialized to k=0, and L represents the static trend counting threshold.

[0083] The present invention proposes a dual-threshold dynamic data compression method suitable for action sequences, specifically storing data on dynamic action trends using an angle difference threshold selection method, and storing data on static action trends using an equal frame number and threshold selection method. Figure 5 (c) is the motion data obtained using the optimized data compression method proposed by the present invention, where: θ1 = 15, θ2 = 5, L = 10. Figure 5 (c) shows the stored action angle C changing to angle D, saving 10 frames of data. This data compression method effectively stores both static and dynamic action data, making the extracted action sequence more consistent with the action characteristics and significantly reducing the amount of data.

[0084] 3) Dynamic Time Warping

[0085] When it comes to measuring time series similarity, the two main methods are Euclidean distance and Dynamic Time Warping distance. Euclidean distance calculates similarity by summing the distances of points at the same moment, and is only applicable when the time axis corresponds one-to-one. Dynamic Time Warping can extend and shorten the sequence on the time axis, and then compare the similarity between two time series, with good robustness. Dynamic Time Warping (DTW) was originally applied in the field of speech recognition to determine whether two speech segments contain the same word, solving the problem of varying lengths of sound signals.

[0086] Two compared action video feature sequences typically have similar shapes, but these shapes are not perfectly aligned on the timeline. Therefore, before performing similarity analysis, the sequences need to be warped on the timeline to achieve better alignment. Therefore, this paper compares the similarity between two action sequences based on the dynamic time warping method. Figure 7 The left picture is the Euclidean distance matching diagram of two sequences. Figure 7 The right figure is the dynamic time warping matching diagram of the two sequences.

[0087] The principle of the existing dynamic regularization algorithm is as follows:

[0088] The basic idea of ​​dynamic regularization is to find the regularization path corresponding to the minimum cumulative distance when two aligned sequences are matched. n It refers to the correspondence on the time axis when two aligned sequences are optimally matched.

[0089] For example, for two time series A and B, they are formulas (1) and (2), respectively, with lengths of m and n, and the time points and eigenvalues ​​in the series correspond to each other:

[0090] A=(a1,a2,a3...a i ...a m ) (1)

[0091] B=(b1,b2,b3...b j ...b n ) (2)

[0092] The steps of the dynamic warping algorithm are:

[0093] 1) Calculate the distance matrix between each point in the two sequences. The distance between the i-th coordinate in sequence A and the j-th coordinate in sequence B is R(i, j), as shown in formula (3).

[0094] R(i,j)=|a i -b j | (3)

[0095] 2) Find a path from the lower left corner to the lower right corner of the matrix so that the sum of the distances on the path is the smallest. This path is the dynamic regularization path. The form of the regularization path can be expressed as:

[0096] W=(w1,w2,...,w l ...,w k ) (4)

[0097] Restrictions and rules for dynamic path regularization:

[0098] 1) Boundary conditions: w1 = (1, 1) and w k =(m,n). The matching path must start from the lower left corner (1,1) and end at the upper right corner (m,n).

[0099] 2) Continuity: If w l-1 =(i',j'), the next matching point w on the path l =(i,j) needs to satisfy (i-i')<=1 and (j-j')<=1.

[0100] 3) Monotonicity: If w l-1 =(i',j'), the next matching point w on the path l=(i,j) needs to satisfy 0<=(i-i') and 0<=(j-j').

[0101] Combined with the continuity and monotonicity constraints, each matching point has only three possible paths. For example, if the path passes through matching point (i, j), the next matching point can only be (i+1, j), (i, j+1), or (i+1, j+1).

[0102] The cumulative distance of the dynamic regular shortest path can be expressed as:

[0103] L min (i,j)=R(i,j)+min{L min (i-1,j-1),L min (i-1,j),L min (i,j-1)} (5)

[0104] The shortest distance path between two action sequences is searched through dynamic time warping, such as Figure 8 shown.

[0105] Since dynamic time warping has a high time consumption, it is restricted in applications with large-scale data and real-time requirements.

[0106] In this embodiment, the constrained path DTW algorithm is used to calculate the joint sequence similarity of the standard action and the test action, and quantified as a score for each joint. By constraining the search range of the dynamic regularization path to reduce the calculation of the distance matrix, the calculation efficiency is improved, and to a certain extent, excessive bending of the matching path is avoided. Among them, the constraint formula of the path search range is as follows:

[0107]

[0108] Among them, a i is the data position of the standard action sequence, b i is the data position of the test action sequence, w is the constraint area (an empirical value that can be obtained through experimental testing), and m is a i The total number of data, n is b i The total number of data.

[0109] Figure 9 This is a graph showing the search path constraints for dynamic regularization. The area enclosed by the grid in the figure is the search area for dynamic regularization (for Ba Duan Jin video comparison, w = 50). Figure 8 and Figure 9 It can be seen that Figure 9 The search area is smaller, which reduces the calculation of the distance matrix and improves the computational efficiency.

[0110] To demonstrate the effectiveness of the DTW algorithm with path constraints, experiments were conducted to compare the time required to compare the original and compressed sequences of the left shoulder-wrist joint angles of a coach and a test volunteer performing some movements of Ba Duan Jin (Ba Duan Jin) before and after the DTW algorithm's search path was constrained. Table 3 below shows that the algorithm with path constraints achieves faster recognition efficiency than the classic DTW algorithm, demonstrating that action sequence compression significantly reduces computational time for action comparison.

[0111] Table 3 Comparison of DTW algorithm search time before and after path constraints

[0112]

[0113] The score calculation formula for the above joints is as follows:

[0114] a_S=100-L min (i,j) / m*A max *s

[0115] Among them, a_S is the score of the joint, L min (i, j) is the constraint-based dynamic regularization shortest path cumulative distance between the standard template sequence and the test sequence, m is the number of frames in the standard action template sequence, A max is the maximum angle of joint change, and s is the penalty coefficient (the penalty coefficient s is set according to the criticality of the action and is an empirical value).

[0116] Application Examples

[0117] In order to verify the feasibility of the method of the present invention, the following action video comparison experiment was designed: (1) Experimental action content: The first form of Ba Duan Jin, the "Two Hands Lifting the Sky to Regulate the Three Burners" action. (2) Experimental subjects: Comparison of scores between volunteers who have undergone action training (test action) and professional coaches (standard template action), and comparison of scores between untrained volunteers (test action) and professional coaches (standard action). (3) Experimental evaluation content: This paper selects eight joints for scoring. (v1: left shoulder-left wrist, v2: left shoulder-left elbow, v3: right shoulder-right wrist, v4: right shoulder-right elbow, v5: left hip-left ankle, v6: left hip-left knee, v7: right hip-right ankle, v8: right hip-right knee). (4) Experimental process: Two comparison videos are input, namely the test action video and the standard action video. First, the human body joint coordinates of the two comparison action videos are obtained through the human posture recognition network and converted into joint angles. Then, the feature short sequences of the eight joints of the two comparison action videos are obtained through the action sequence compression method and data processing proposed in this paper. The joint feature sequences of the standard action and the test action are input into the DTW algorithm after path constraint to calculate the dynamic regularization shortest path distance of the sequence, and finally quantified into the score of each joint (such as Figure 1shown).

[0118] Instructions for converting human joint point coordinates into joint angles: Take the angle of the left shoulder-left wrist joint as an example, using the left shoulder coordinates (x 11 ,y 11 ), left wrist coordinates (x 15 ,y 15 ), set the coordinates of any point directly below the left shoulder to (x m ,y n ), where x m =x 11 ,y n =y 11 +20, and finally use formula (7) to get the left shoulder angle θ 11_11 .

[0119]

[0120] The calculation of joint score is shown in formula (8), where a_S is the joint score (arthrosis_Score), L min (i, j) is the constraint-based dynamic regularization shortest path cumulative distance between the standard template sequence and the test sequence, m is the number of frames in the standard template sequence, A max is the maximum angle of joint change, and s is the penalty coefficient.

[0121] a_S=100-L min (i,j) / m*A max *s (8)

[0122] Figure 10 (a) is the movement sequence of a professional Ba Duan Jin coach, which is set as the standard template sequence. Figure 10 (b) is the movement sequence of a volunteer who has undergone Ba Duan Jin training. The movements are relatively standardized and have a high similarity, and is used as test sequence 1. Figure 10 (c) is the movement sequence of a volunteer who has not received Ba Duan Jin training. The movement standardization is poor and is set as test sequence 2.

[0123] Visualize the joint angle motion trajectory of the left shoulder and left wrist of the human body in the three sequences, such as Figure 11 As shown in the figure, the curves for the standard template and test sequence 1 have similar trends, and the left shoulder-left wrist joint motion is highly similar. The curves for the standard template and test sequence 2 have similar trends, but some motion amplitudes are not fully aligned, resulting in poor overall similarity. The curve changes are consistent with actual results, further verifying the effectiveness of this data mining algorithm.

[0124] After experiments, the algorithm proposed by the present invention was used to obtain the scoring results of each joint. Figure 12 shown. Figure 12 The following is a bar chart showing the joint scores for volunteers who had and had not trained in Ba Duan Jin, using this scoring algorithm. As can be seen, the volunteers who had trained in Ba Duan Jin achieved high joint scores in test sequence 1, and their movement standardization was relatively similar to the coaching template. In test sequence 2, the volunteers who had not trained in Ba Duan Jin showed less standardized hand movements and more standardized leg movements. Joint scores for V2 and V4 were lower, while scores for V5-V8 were higher, indicating that the algorithm's scoring results are consistent with actual conditions.

[0125] In summary, the action content of the action comparison experiment is Ba Duan Jin. First, the human body posture recognition algorithm is used to obtain the coordinates of the human joint points in the action video and convert them into joint angles; secondly, the optimized data compression method is used to obtain the short sequences of joint angles of the standard action and the test action; finally, the DTW algorithm with a constrained path is used to calculate the similarity of the joint sequences of the standard action and the test action and quantify them into scores for each joint. The experiment shows that the evaluation results of the action comparison method provided by the present invention are consistent with the actual situation. The tester can clearly see the shortcomings of his own actions from the evaluation results, so as to make corrections and improvements in time. It has certain application value in sports, fitness training and other aspects.

[0126] In addition, the functional units in various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0127] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the various embodiments of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0128] The above descriptions are only some embodiments of the present invention and do not limit the scope of protection of the present invention. Any equivalent device or equivalent process transformation made by using the contents of the description and drawings of the present invention, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. An action comparison method based on dynamic compression and constrained search, characterized in that: include: Step 1): Use the human posture recognition model to obtain the coordinates of the human joint points in the standard action and test action videos, and convert them into joint angles; Step 2): Use an optimized data compression method to obtain short sequences of joint angles for standard and test movements; wherein the optimized data compression method specifically includes the following steps: Step 2.1): Create a new empty list to store data ; Step 2.2): Read each joint angle data in the sequence in order. S now The joint angle data of the first frame S 1 o'clock, S 1 Save to list ; Step 2.3): Read the next frame of joint angle data and store it S now , get The last value in the list , and calculate ; Step 2.4): When When Save to list and set the static data counter k Clear to zero, then backtrack and continue to step 2.3); when S θ ≤ θ 1 o'clock, judge k Is it 0? when k=0 When = , and at the same time , then backtrack and continue to step 2.3); when k≠0 When judging Is it 0? When judging Is it less than θ 2. When When Save to list In, and order , then backtrack and continue to execute step 2.3); when > θ 2 o'clock, then , and backtrack to step 2.3); when ≠0, then let , and backtrack to step 2.3); in, Indicates the data currently read. is the dynamic change threshold of the preset angle feature; is the static change threshold of the preset angle feature; Indicates the first data of the static trend; the static data counter is initialized , Indicates the static trend count threshold; Step 2.5): After all joint angle data are processed, the corresponding joint angle short sequence is obtained; Step 3): Use the DTW algorithm with constrained paths to calculate the joint sequence similarity between the standard action and the test action, and quantify it into a score for each joint; The constrained path DTW algorithm specifically constrains the search range of the existing dynamic time warping path. The constraint formula of the path search range is as follows: in, a i is the data location of the standard action sequence, b j is the data location of the test action sequence, w is the constraint area, m for a i The total number of data, n for b j The total number of data.

2. The action comparison method based on dynamic compression and constrained search according to claim 1, characterized in that: The human posture recognition model uses the BlazePose module in MediaPipe.

3. The motion comparison method based on dynamic compression and constrained search according to claim 1, characterized in that: In step 1), the joint angle data is read once per frame and arranged in sequence.

4. The motion comparison method based on dynamic compression and constrained search according to claim 1, characterized in that: In step 1), the joint point data obtained by the human posture recognition model is subjected to mean filtering and normalization processing.

5. The motion comparison method based on dynamic compression and constrained search according to claim 1, characterized in that: The score calculation formula for the joint in step 3) is as follows: in, is the score of the joint, is the cumulative distance of the constraint-based dynamic regularized shortest path between the standard template sequence and the test sequence, m is the number of frames of the standard action template sequence, is the maximum angle of the joint change, is the penalty coefficient.

6. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the action comparison method based on dynamic compression and constraint search as described in one of claims 1 to 5.

Citation Information

Patent Citations

  • Human motion synthesis method based on motion diagram

    CN104504731A

  • Human motion rhythm comparison system and method based on attitude estimation

    CN113255450A