A method and system for automatically evaluating the safety of strength training postures
By receiving videos, extracting frame image features and calling appropriate body part granularity level models, it automatically evaluates strength training movement postures. This solves the problems of inaccurate manual observation, inefficient model selection and video quality affecting recognition in existing technologies, and achieves more efficient and safer movement evaluation.
Patent Information
- Application Number
- CN202411101105.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2044-08-12
AI Technical Summary
In existing technologies, manual observation and evaluation of strength training postures are inaccurate, increasing the risk of sports injuries; there are many types of posture estimation models, and the selection efficiency is low; and poor video quality affects posture recognition results.
By receiving the video, extracting the frame image features, outputting the action category serial number, and calling the appropriate body part granularity level model based on the features and serial number, the coordinates of the key points of the human posture are output, the movement speed and joint angle are calculated, and it is determined whether it is within the safety threshold range.
It achieves automatic and accurate assessment of strength training posture, reduces human observation errors, and improves training safety and effectiveness; supports multi-task calling to improve model selection efficiency; and independently selects estimation granularity based on video quality to ensure the accuracy and reliability of the results.
Smart Images

Figure CN119097890B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of fitness technology, and in particular discloses a method and a system for automatically evaluating the safety of strength training posture movements. Background Art
[0002] In today's fitness culture, people are increasingly focused on shaping their ideal body and shape through exercise. Many people focus on strength training in their indoor gyms, using dumbbells, barbells, or fixed machines to perform muscle-specific exercises. Repeated training of these movements can effectively increase the strength and size of specific muscle groups.
[0003] However, due to the repetitive and fixed nature of the movements, improper posture or a lack of proper observation and guidance can increase the risk of sports injuries. For example, when performing a squat, an incorrect posture with the knees slightly over the toes may go unnoticed. Furthermore, fatigue or a lack of concentration can affect one's ability to detect movements accurately and continuously, making it impossible to correct errors promptly. In these cases, the safety and effectiveness of training are significantly reduced, increasing the risk of sports injuries.
[0004] Therefore, posture estimation models based on artificial intelligence algorithms can be used to assess the safety of movements. However, the wide variety of posture estimation models currently available makes model selection inefficient. Existing models focus on recognizing specific body parts, such as hands, torsos, and feet, requiring users to select different models for different body parts, increasing complexity. Furthermore, significant differences in accuracy, computational cost, and detail processing capabilities between different models further complicate the selection of the appropriate model.
[0005] Furthermore, the quality of action videos directly impacts gesture recognition results. In practical applications, limitations in shooting conditions, such as camera angle, distance, and lighting, as well as occlusions caused by the human body, often result in incomplete representation of the subject or insufficient video clarity. Under these suboptimal detection conditions, even fine-grained estimation methods struggle to provide accurate results, reducing their reliability.
[0006] Therefore, the prior art mainly has the following defects:
[0007] 1. Human observation and assessment of movement posture are inaccurate, increasing the risk of sports injuries
[0008] During manual observation and assessment of movement posture, human factors and subjective judgment can lead to inaccurate and incomplete assessments, increasing the risk of sports injuries. For example, a person might fail to notice a subtle error like the knee slightly over the toes during a squat, or, due to fatigue or lack of concentration, fail to consistently and accurately monitor joint angles, making it impossible to detect and correct errors in a timely manner. Therefore, manual observation and assessment can significantly reduce the safety and effectiveness of training and increase the risk of sports injuries.
[0009] 2. The pose estimation model is complex and diverse, and the model selection efficiency is low
[0010] Existing pose estimation models vary widely, each typically targeting only specific body parts. For example, some models specialize in hand pose estimation, while others are specialized for torso or foot pose recognition. This limitation forces users to select the appropriate model based on their specific needs, a complex and inefficient process. Furthermore, different models vary in accuracy, computational cost, and granularity, making it more difficult for users to quickly and correctly select the model most suitable for the task at hand, significantly reducing overall efficiency and application flexibility.
[0011] 3. The video is not clear and the recognition accuracy is low
[0012] In some limited shooting scenarios, the person filming the subject may not fully cover the subject, or the video itself may not be clear enough. This can result in unsatisfactory detection conditions, making fine-grained pose estimation inaccurate and inaccurate. In such cases, even with fine-grained pose estimation, the accuracy and reliability of the data obtained are difficult to guarantee, and significant computational resources are consumed.
[0013] In summary, it is particularly important to provide a method to automatically evaluate the safety of strength training movements. This can not only significantly improve the safety and effectiveness of training, but also greatly reduce the risk of sports injuries and provide fitness enthusiasts with more scientific training guidance. Summary of the Invention
[0014] The present invention provides a method and system for automatically evaluating the safety of strength training posture movements, aiming to address at least one of the above-mentioned deficiencies.
[0015] The present invention relates to a method for automatically evaluating the safety of strength training posture movements, comprising the following steps:
[0016] Receive a video from the user, extract frame image features, and output action category numbers;
[0017] Output the call model vector according to the frame image features and action category serial number;
[0018] According to the calling model vector, the corresponding body part granularity level model is called;
[0019] Output the coordinates of key points of human posture according to the granularity level model of body parts;
[0020] Calculate the movement speed and joint angle according to the coordinates of the key points of the human body posture and the sequence number of the action category;
[0021] Determine whether the movement speed or joint angle is within the safety threshold;
[0022] If the movement speed or joint angle is detected to be outside the safety threshold, a warning will be given.
[0023] Furthermore, the steps of receiving a video transmitted from a user terminal, extracting frame image features, and outputting an action category serial number include:
[0024] Extract a series of continuous frame images from the video at fixed time intervals;
[0025] Preprocess the extracted frame images to ensure the consistency and effectiveness of the input model;
[0026] A fixed sequence of frames is processed using a 3D convolutional layer, with the 3D convolution kernel sliding across the three dimensions of time, width, and height to simultaneously extract temporal and spatial features. The four-dimensional features processed by the 3D convolution module are flattened into a three-dimensional feature representation. A backbone network is built based on a dual-stream Transformer architecture, with two parallel Transformer encoding modules used in each layer to extract temporal and spatial features respectively. These two features are then fused by addition to obtain a more comprehensive feature representation. The four-dimensional features include the number of frames, width, height, and feature dimension, while the three-dimensional features include the temporal, spatial, and feature dimensions.
[0027] The fused three-dimensional feature vector is flattened into a one-dimensional feature vector and input into the fully connected layer. The fully connected layer maps the three-dimensional feature vector to the action category space, and the number of output nodes is equal to the number of action categories. The output is converted into a probability distribution through the softmax activation function. Based on the output probability distribution, the category with the highest probability is selected as the prediction result, and the sequence number of the action category with the highest probability is output.
[0028] Furthermore, the step of outputting the call model vector according to the frame image features and the action category sequence number includes:
[0029] The frame image features and the action category serial number output in the previous step are passed as input to the decision model; the action category serial number has a corresponding body part model to be called;
[0030] The decision model calls the body part model of the corresponding granularity level based on the frame image features and the action category number output in the previous step, and the video quality, and outputs the final model call result, which is represented by a vector.
[0031] Furthermore, before receiving a video from the user, extracting frame image features, and outputting the action category number, the data set is prepared, and the corresponding body part model is determined based on the action category number. The extracted video feature data is respectively input into the models of each granularity level of the corresponding body part in the model pool. Each model outputs the total number N of key point estimates and the average error ME. The average error ME is calculated using the following formula:
[0032]
[0033] Among them, ME represents the mean error, and the key point positions output by the model are (x1, y1), (x2, y2)... (x n ,y n ); The key point position of the original image is correctly marked (x1 ′ , y1 ′ )、(x2 ′ , y2 ′ )……(x n ′ ,y n ′ ); N represents the total number of key point estimates.
[0034] Furthermore, the decision model calls the body part model of the corresponding granularity level based on the frame image features and the action category number output in the previous step, and the video quality, and outputs the final model calling result. In the step where the result is represented by a vector, if the foot key point estimation model - granularity level 3 and the torso key point estimation model - granularity level 3 are called, the final output vector [3, 3, 0, 0] is obtained.
[0035] Furthermore, the step of outputting the coordinates of key points of human posture according to the body part granularity level model includes:
[0036] After obtaining the final output vector [3, 3, 0, 0], the output vector [3, 3, 0, 0] is passed to the posture estimation model pool, indicating that the foot key point estimation model - granularity level 3 and the torso key point estimation model - granularity level 3 will be called to obtain the two-dimensional coordinates of the human body posture key points in each frame of the video.
[0037] Furthermore, the joint angle includes the elbow joint angle. In the step of calculating the motion speed and joint angle according to the coordinates of the key points of the human body posture and the action category number, the elbow joint angle is calculated by the following formula:
[0038]
[0039] Among them, ∠ABC represents the elbow joint angle, represents the vector from the elbow to the shoulder, represents the vector from elbow to wrist;
[0040]
[0041]
[0042] Among them, the coordinates of the three points ∠ABC are A(x1, y1), B(x2, y2), and C(x3, y3).
[0043] Furthermore, in the step of calculating the motion speed and joint angle according to the coordinates of the key points of the human body posture and the action category serial number, the motion speed is calculated by the following formula:
[0044]
[0045] Among them, v represents the motion speed, s represents the coordinates (x1, y1) of the key point A in the previous frame to the key point A in the current frame ′ Coordinates(x1 ′ , y1 ′ ), t represents the interval time between each frame of image, and n represents the number of image frames.
[0046] Furthermore, after the step of determining whether the motion speed or joint angle is within the safety threshold range, the following steps are further included:
[0047] If the movement speed and joint angle are found to be within the safety threshold, the process ends.
[0048] The present invention also provides a system for automatically evaluating the safety of strength training posture movements, which is applied to the above-mentioned method for automatically evaluating the safety of strength training posture movements. The system for automatically evaluating the safety of strength training posture movements comprises:
[0049] The first output module is used to receive a video from the user end, extract frame image features, and output action category serial numbers;
[0050] The second output module is used to output the call model vector according to the frame image features and the action category sequence number;
[0051] A calling module, used for calling the corresponding body part granularity level model according to the calling model vector;
[0052] The third output module is used to output the coordinates of key points of human posture according to the granularity level model of body parts;
[0053] The calculation module is used to calculate the movement speed and joint angle according to the coordinates of the key points of the human body posture and the sequence number of the action category;
[0054] A judgment module is used to determine whether the movement speed or joint angle is within the safety threshold range;
[0055] The recognition module is used to give a prompt warning if it recognizes that the movement speed or joint angle is not within the safety threshold range.
[0056] The beneficial effects achieved by the present invention are:
[0057] The present invention provides a method and system for automatically evaluating the safety of strength training movement postures. The method receives a video transmitted from a user terminal, extracts frame image features, and outputs an action category serial number; outputs a call model vector based on the frame image features and the action category serial number; calls the corresponding body part granularity level model based on the call model vector; outputs the coordinates of the key points of the human body posture based on the body part granularity level model; calculates the movement speed and joint angle based on the coordinates of the key points of the human body posture and the action category serial number; determines whether the movement speed or joint angle is within a safety threshold range; and gives a prompt warning if it is identified that the movement speed or joint angle is not within the safety threshold range. The method and system for automatically evaluating the safety of strength training movement postures provided by the present invention have the following beneficial effects:
[0058] 1. Automatically evaluate the accuracy of movement posture without human observation
[0059] Technology for automatically assessing the safety of strength training movements can reduce the subjectivity and inaccuracies inherent in human observation, thereby improving the safety and effectiveness of exercise training. By capturing movement with a camera and combining it with a posture estimation model, it can automatically detect motion information such as joint angles and speed during exercise, accurately capturing even subtle but critical posture deviations, such as knee position during a squat. This method not only reduces human observation errors caused by fatigue or inattention, but also provides immediate feedback to participants, enabling them to adjust their movements and avoid injuries.
[0060] 2. Support multi-task calling to improve model selection efficiency
[0061] The decision model can call multiple body part recognition tasks, significantly improving model selection efficiency. By integrating pose estimation models for different body parts and taking into account factors such as accuracy, computational cost, and granularity, a flexible task selection mechanism is designed. The decision model can quickly select and concurrently call multiple pose estimation tasks or individual tasks for different body parts from the pose estimation model pool. Users can now perform pose recognition for multiple body parts without manually selecting a specific model. The decision model's task selection mechanism not only improves model selection efficiency but also meets diverse application needs.
[0062] 3. Choose the estimated granularity based on the video quality
[0063] Based on the input video quality, the decision model autonomously selects the appropriate estimation granularity. For high-quality videos, the model uses a finer granularity for refined pose estimation, ensuring accuracy and detail. For lower-quality videos, the model selects a coarser granularity to balance computational resource consumption with the reliability of the estimation results. This ability to dynamically adjust granularity enables the model to perform well across a wide range of video quality, providing optimal estimation results. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 A schematic flow chart of the method for automatically evaluating the safety of strength training posture movements provided by the present invention;
[0065] Figure 2 Schematic diagram of calculation of elbow joint angle when the present invention is applied to push-ups. DETAILED DESCRIPTION
[0066] In order to better understand the above technical solution, the above technical solution will be described in detail below with reference to the accompanying drawings and specific implementation methods.
[0067] like Figure 1 and Figure 2 As shown, the first embodiment of the present invention provides a method for automatically evaluating the safety of strength training postures, comprising the following steps:
[0068] Step S100: Receive a video from the user terminal, extract frame image features, and output action category serial numbers.
[0069] First, input the video into the action category model. The action category model extracts video features and outputs the action category number. For example, output "1" indicates that the action category is push-ups, output "2" indicates that the action category is plank support, and so on.
[0070] Step S200: Output the call model vector according to the frame image features and the action category sequence number.
[0071] The frame image features and the action category number output in the previous step are passed as input to the decision model. There are currently four keypoint estimation models for different body parts: hand keypoint estimation model, foot keypoint estimation model, face keypoint estimation model, and torso keypoint estimation model.
[0072] Video quality affects the number of key points that each body part model can accurately identify. By consulting relevant literature and data, we categorize the recognition granularity of each body part model into several levels based on the granularity level. Lower levels indicate coarser granularity and fewer key points that can be accurately identified (level 0 indicates that the video does not contain this body part), as shown in Table 1.
[0073]
[0074]
[0075] Table 1
[0076] As shown in Table 1, each body part model has a dataset with different granularity levels, including 3 foot key point estimation models, 4 torso key point estimation models, 5 hand key point estimation models, and 6 face key point estimation models.
[0077] Collect a large number of image datasets with human posture annotations. These datasets contain human body images in different postures and angles. Different body part models correspond to different dataset annotation parts.
[0078] Taking the torso keypoint estimation model as an example, the four granularity level datasets for the torso keypoint estimation model are datasets with 4, 8, 12, and 17 keypoints annotated on the feet, respectively. Using HRNet (High Resolution Network), the currently most advanced CNN-based top-down human pose estimation algorithm, as the backbone network, each keypoint estimation model is constructed by replacing different prediction heads, thereby establishing a model pool. Taking the torso keypoint estimation model with a granularity of 4 as an example, the features extracted by the HRNet backbone network are input into the corresponding prediction head, which then outputs the coordinates of the corresponding 17 keypoints.
[0079] The model was trained using the collected annotated data, with each dataset divided into training, validation, and test sets in an 8:1:1 ratio. During training, the model parameters were continuously optimized to accurately predict the locations of key points on the human body. The model was evaluated using the validation set to adjust parameters and prevent overfitting and underfitting. After training, the model was finally evaluated using the test set to ensure good performance on unseen data.
[0080] The same process is repeated for other body part models, ultimately resulting in 18 granularity-level models corresponding to each body part model (3 models for foot keypoint estimation, 4 models for torso keypoint estimation, 5 models for hand keypoint estimation, and 6 models for face keypoint estimation). All of these models are simply concatenated and integrated to form a pose estimation model pool.
[0081] The model is vectorized using one-hot encoding, that is, each model is represented by a vector whose length is equal to the total number of models. Each position in the vector corresponds to a model (the first position represents the foot key point estimation model, the second position represents the torso key point estimation model, the third position represents the hand key point estimation model, and the fourth position represents the face key point estimation model). The number represents the granularity level of the model at the corresponding position, for example:
[0082] (1) Foot key point estimation model - the vector form of granularity level 1 is expressed as [1, 0, 0, 0];
[0083] (2) The vector form of the trunk key point estimation model - granularity level 2 is expressed as [0, 2, 0, 0];
[0084] (3) The hand key point estimation model - the vector form of granularity level 3 is expressed as [0, 0, 3, 0];
[0085] (4) Facial key point estimation model - the vector form of granularity level 4 is expressed as [0, 0, 0, 4];
[0086] (5) The vector form of the hand key point estimation model - granularity level 5 and the face key point estimation model - granularity level 6 is called at the same time and expressed as [0, 0, 5, 6];
[0087] Follow the above rules and so on.
[0088] As can be seen, each sequence number has a corresponding body part keypoint estimation model. For example, the plank with sequence number "2" calls the foot keypoint estimation model and the torso keypoint estimation model. After the decision model obtains this information based on the action category sequence number, it determines which granularity level of the body part model to call based on the video quality and outputs the final model call result, which is represented as a vector. For example, if the foot keypoint estimation model with granularity level 3 and the torso keypoint estimation model with granularity level 3 are called, the final output vector is [3, 3, 0, 0].
[0089] Step S300: Call the corresponding body part granularity level model according to the called model vector.
[0090] After obtaining the final output vector [3, 3, 0, 0], the vector is passed to the posture estimation model pool, indicating that the foot key point estimation model - granularity level 3 and the torso key point estimation model - granularity level 3 are to be called.
[0091] Step S400: Output the coordinates of key points of human posture according to the body part granularity level model.
[0092] According to the granularity level model of body parts, the two-dimensional coordinates of the key points of human posture in each frame of the video can be obtained.
[0093] Step S500: Calculate the motion speed and joint angle according to the coordinates of the key points of the human body posture and the action category sequence number.
[0094] According to the action category number, we can know what action the human body is doing. Each action focuses on different parts of the body. Therefore, to determine whether the action is performed accurately, we need to obtain the joint angle and movement speed of the part of the body that is concerned. The required joint angle and movement speed can be calculated by calculating the coordinates of the posture key points.
[0095] Step S600: Determine whether the movement speed or joint angle is within a safety threshold range.
[0096] By consulting relevant sports literature and materials, a safety threshold range is set for the joint angle and movement speed that need to be detected for each action. When the joint angle or movement speed is not within the safety threshold range, it is considered that there is a risk of injury at this time, and a warning is issued.
[0097] Step S700: If it is identified that the movement speed or joint angle is not within the safety threshold range, a prompt warning is given.
[0098] When it is recognized that the calculated movement speed or joint angle is not within the pre-judgment safety threshold range, a prompt warning is given.
[0099] Further, see Figure 1 and Figure 2 The method for automatically evaluating the safety of strength training postures proposed in this embodiment includes step S100:
[0100] Step S110 : extracting a series of continuous frame images from the video at fixed time intervals.
[0101] Step S120: pre-process the extracted frame image to ensure the consistency and validity of the input model.
[0102] The extracted frame images are preprocessed including resizing, normalization, cropping, etc. to meet the input requirements of the input model.
[0103] Step S130: Use a 3D convolution layer to process a fixed frame sequence, and use the 3D convolution kernel to slide in the three dimensions of time, width and height to simultaneously extract temporal and spatial features; flatten the four-dimensional features processed by the 3D convolution module into a three-dimensional feature representation; build a backbone network based on the dual-stream Transformer architecture, and use two parallel Transformer encoding modules in each layer to extract temporal and spatial features respectively, and fuse the two types of features by adding them to obtain a more comprehensive feature representation; the four-dimensional features include the number of frames, width, height and feature dimension, and the three-dimensional features include temporal, spatial and feature dimensions.
[0104] The Transformer model architecture, proposed by Google in their 2017 paper "Attention is All You Need," replaces the RNN (Recurrent Neural Network) architecture commonly used in NLP tasks with a self-attention structure. Its biggest advantage over the RNN architecture is its parallel computing capabilities.
[0105] Step S140: Flatten the fused three-dimensional feature vector into a one-dimensional feature vector and input it into a fully connected layer. The fully connected layer maps the three-dimensional feature vector to the action category space, and the number of output nodes is equal to the number of action categories. The output is converted into a probability distribution through the softmax activation function. Based on the output probability distribution, the category with the highest probability is selected as the prediction result, and the sequence number of the action category with the highest probability is output.
[0106] Preferably, see Figure 1 and Figure 2 The method for automatically evaluating the safety of strength training postures proposed in this embodiment includes step S200:
[0107] Step S210: The frame image features and the action category serial number output in the previous step are passed as input to the decision model; the action category serial number has a corresponding body part model.
[0108] The frame image features and the action category number output in the previous step are passed as input to the decision model. Each number has a corresponding body part model. For example, the plank number "2" calls the foot keypoint estimation model and the torso keypoint estimation model.
[0109] Step S220: The decision model calls the body part model of the corresponding granularity level according to the frame image features and the action category number output in the previous step, based on the video quality, and outputs the final model calling result, which is represented by a vector.
[0110] After the decision model obtains the above information based on the action category number, the video quality determines which level of granularity of the body part model to call and outputs the final model call result. The result is represented by a vector. For example, if the foot key point estimation model - granularity level 3 and the torso key point estimation model - granularity level 3 are called, the final output vector is [3, 3, 0, 0].
[0111] Further, preferably, see Figure 1 and Figure 2 The method for automatically evaluating the safety of strength training postures proposed in this embodiment includes, before step S100:
[0112] Step S100A: Dataset preparation
[0113] The input data for the decision model is the video and its action category number. The output is the model pool selection result expressed as a vector. For example, if the hand model with granularity level 3 is called, the output is [0, 0, 3, 0]. If both the hand model with granularity level 5 and the face model with granularity level 6 are called, the output is [0, 0, 5, 6]. The input data and the corresponding output vectors are used as the dataset for subsequent training and validation of the decision model. The dataset is prepared as follows.
[0114] According to the action category number, the corresponding body part model is determined and called. The extracted video feature data is respectively passed to the models of each granularity level of the corresponding body part in the model pool. Each model outputs the total number N of key point estimates and the average error ME. The average error ME is calculated by the following formula:
[0115]
[0116] In formula (1), ME represents the mean error, and the key point positions output by the model are (x1, y1), (x2, y2)...(x n ,y n ); The key point position of the original image is correctly marked (x1 ′ , y1 ′ )、(x2 ′ , y2 ′ )……(x n ′ ,y n ′ ); N is the total number of keypoint estimates. The unit of mean error ME is mm.
[0117] The total number of pose estimation keypoints, N, reflects the granularity of the pose estimation model. Within the same body part model, a larger N indicates a higher level of granularity, meaning finer granularity, but also consumes more computational resources. The mean error, ME, reflects the accuracy of the model's position estimation of pose keypoints; a lower ME indicates a more accurate position estimation.
[0118] According to the research on the current human posture estimation model, the average error range allowed for models with different granularity levels is also different. After continuous reference to literature, calculation and verification, the average error range allowed for different granularity levels of each body part model is obtained, such as
[0119] As shown in Table 2.
[0120]
[0121] Table 2
[0122] The following explanation is given for Table 2:
[0123] (1) For each body part model, when there are multiple granularity level models that meet the corresponding set average error range, the model with the highest granularity level is selected by default;
[0124] (2) For each body part model, when the granularity level model exceeds the set average error range, the granularity level is defined as 0, indicating that the granularity level model is not selected;
[0125] According to the rules in Table 2, the data set (i.e., input data and its corresponding output vector) is collected. The steps are as follows.
[0126] Each video segment is fed into the selected body part model pool based on the action category number. Each body part model outputs a set of N and ME at different granularity levels. By querying Table 2, the corresponding vector form can be output (as shown in Table 3).
[0127] For example:
[0128]
[0129] Table 3
[0130] The final result output in Table 3 above is: [3, 1, 4, 0], so the output vector corresponding to this video is [3, 1, 4, 0].
[0131] After the above data preparation steps and operations, we can finally obtain several videos, their action category numbers, and the corresponding output vectors, which serve as the model dataset. The dataset is divided into training set, validation set, and test set in an 8:1:1 ratio.
[0132] Step S100B: Building a decision model
[0133] 1. Model Network Structure
[0134] The model inputs are action category numbers and video frame sequences, and the output is a model selection vector. First, image features are extracted from the video sequence. Using the network architecture of the action category model, a 3D-CNN architecture and a two-stream Transformer are used. However, after the frame sequence features are obtained through 3D-CNN processing, the action category numbers are concatenated into a feature vector. This concatenated feature vector is then input into the two-stream feature vector for processing. Finally, a fully connected layer maps the features into a 1×4 vector and outputs it as the model output.
[0135] 2. Model Training
[0136] Before training the model, define the loss function and optimizer. For regression tasks, choose the mean squared error (MSE) as the loss function and use the Adam optimizer to accelerate the training process. Input the training data into the model for training. Through multiple iterations, optimize the model parameters and gradually improve the model's performance.
[0137] 3. Model evaluation and tuning
[0138] During training, the validation set is used to evaluate model performance. Based on the validation set feedback, hyperparameter tuning is performed, such as adjusting the learning rate and batch size, to ensure the model learns effectively without overfitting. After model training is complete, the final model's performance is further evaluated on the test set to ensure that the model performs well on unseen data and avoid overfitting and underfitting.
[0139] 4. Model Deployment
[0140] After model training and evaluation are complete, the model weights and structure are saved for subsequent use. The trained model is deployed to the production environment so that it can be used to infer or predict new data, thereby efficiently and accurately calling the body part models in the pose estimation model pool.
[0141] Further, see Figure 1 and Figure 2 In the method for automatically evaluating the safety of strength training postures proposed in this embodiment, the joint angle includes the elbow joint angle. In step S500, the elbow joint angle is calculated using the following formula:
[0142]
[0143] In formula (2), ∠ABC represents the elbow joint angle, represents the vector from the elbow to the shoulder, represents the vector from elbow to wrist;
[0144]
[0145] In formulas (3) and (4), the coordinates of the three points ∠ABC are A(x1, y1), B(x2, y2), and C(x3, y3).
[0146] Preferably, see Figure 1 and Figure 2 In the method for automatically evaluating the safety of strength training postures proposed in this embodiment, in step S500, each action focuses on a different part, so the part to be calculated for the movement speed is also different. Figure 2 As shown, taking push-ups as an example, the movement speed focuses on the movement speed of points A, B, and C on the shoulders.
[0147] Taking the calculation of the moving speed of point A as an example, if the video is n frames per second, the interval time t between each frame is The coordinates of the key point A in the previous frame (x1, y1) to the key point A in the current frame ′ Coordinates(x1 ′ , y1 ′ ) is the distance s The movement speed is calculated by the following formula:
[0148]
[0149] In formula (5), v represents the motion speed, and s represents the distance from the coordinates (x1, y1) of the key point A in the previous frame to the key point A in the current frame. ′ Coordinates(x1 ′ , y1 ′ ), t represents the interval time between each frame of image, and n represents the number of image frames.
[0150] Further, see Figure 1 and Figure 2 The method for automatically evaluating the safety of strength training postures proposed in this embodiment further includes, after step S600:
[0151] Step S800: If it is recognized that the movement speed and joint angle are within the safety threshold range, then the process ends.
[0152] When it is determined that the calculated movement speed and joint angle are within the pre-qualified safety threshold, the entire process ends.
[0153] This embodiment also provides a system for automatically evaluating the safety of strength training movement postures, which is applied to the above-mentioned method for automatically evaluating the safety of strength training movement postures. The system for automatically evaluating the safety of strength training movement postures includes a first output module, a second output module, a calling module, a third output module, a calculation module, a judgment module and an identification module, wherein the first output module is used to receive a video transmitted by the user end, extract frame image features, and output an action category serial number; the second output module is used to output a calling model vector based on the frame image features and the action category serial number; the calling module is used to call the corresponding body part granularity level model based on the calling model vector; the third output module is used to output the coordinates of the key points of the human body posture based on the granularity level model; the calculation module is used to calculate the movement speed and joint angle based on the coordinates of the key points of the human body posture and the action category serial number; the judgment module is used to judge whether the movement speed or joint angle is within the safety threshold range; the identification module is used to give a prompt warning if it is identified that the movement speed or joint angle is not within the safety threshold range.
[0154] The method and system for automatically evaluating the safety of strength training posture movements provided by this embodiment receive a video transmitted from the user end, extract the frame image features, and output the action category number; output the call model vector based on the frame image features and the action category number; call the corresponding body part granularity level model based on the call model vector; output the coordinates of the key points of the human body posture based on the body part granularity level model; calculate the movement speed and joint angle based on the coordinates of the key points of the human body posture and the action category number; determine whether the movement speed or joint angle is within the safety threshold range; if it is identified that the movement speed or joint angle is not within the safety threshold range, a prompt warning is given. The method and system for automatically evaluating the safety of strength training posture movements provided by this embodiment have the following beneficial effects:
[0155] 1. Automatically evaluate the accuracy of movement posture without human observation
[0156] Technology for automatically assessing the safety of strength training movements can reduce the subjectivity and inaccuracies inherent in human observation, thereby improving the safety and effectiveness of exercise training. By capturing movement with a camera and combining it with a posture estimation model, it can automatically detect motion information such as joint angles and speed during exercise, accurately capturing even subtle but critical posture deviations, such as knee position during a squat. This method not only reduces human observation errors caused by fatigue or inattention, but also provides immediate feedback to participants, enabling them to adjust their movements and avoid injuries.
[0157] 2. Support multi-task calling to improve model selection efficiency
[0158] The decision model can call multiple body part recognition tasks, significantly improving model selection efficiency. By integrating pose estimation models for different body parts and taking into account factors such as accuracy, computational cost, and granularity, a flexible task selection mechanism is designed. The decision model can quickly select and concurrently call multiple pose estimation tasks or individual tasks for different body parts from the pose estimation model pool. Users can now perform pose recognition for multiple body parts without manually selecting a specific model. The decision model's task selection mechanism not only improves model selection efficiency but also meets diverse application needs.
[0159] 3. Choose the estimated granularity based on the video quality
[0160] Based on the input video quality, the decision model autonomously selects the appropriate estimation granularity. For high-quality videos, the model uses a finer granularity for refined pose estimation, ensuring accuracy and detail. For lower-quality videos, the model selects a coarser granularity to balance computational resource consumption with the reliability of the estimation results. This ability to dynamically adjust granularity enables the model to perform well across a wide range of video quality, providing optimal estimation results.
[0161] Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they are aware of the basic inventive concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the invention. Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the invention. Thus, the present invention is intended to include such changes and modifications as fall within the scope of the claims and their equivalents.
Claims
1. A method for automatically evaluating the safety of strength training postures, characterized in that: The following steps are involved: Receive a video from the user, extract frame image features, and output action category numbers; Outputting a call model vector according to the frame image features and the action category sequence number; Calling a corresponding body part granularity level model according to the called model vector, wherein the body part granularity level model is trained using data sets of different granularity levels; Outputting coordinates of key points of human posture according to the body part granularity level model; Calculating the movement speed and joint angle according to the coordinates of the key points of the human body posture and the sequence number of the action category; Determining whether the movement speed or the joint angle is within a safety threshold range; If it is identified that the movement speed or the joint angle is not within the safety threshold range, a prompt warning is given.
2. The method for automatically evaluating the safety of strength training postures according to claim 1, wherein: The steps of receiving a video inputted by a user terminal, extracting frame image features, and outputting action category serial numbers include: Extracting a series of continuous frame images from the video at fixed time intervals; Preprocessing the extracted frame image to ensure the consistency and validity of the input model; A fixed frame sequence is processed using a 3D convolution layer, with the 3D convolution kernel sliding across the three dimensions of time, width, and height to simultaneously extract temporal and spatial features. The four-dimensional features processed by the 3D convolution module are flattened into a three-dimensional feature representation. A backbone network is built based on a dual-stream Transformer architecture, with each layer using two parallel Transformer encoding modules to extract temporal and spatial features respectively, and the two features are fused by addition to obtain a more comprehensive feature representation. The four-dimensional features include the number of frames, width, height, and feature dimensions, while the three-dimensional features include the temporal, spatial, and feature dimensions. The fused three-dimensional feature vector is flattened into a one-dimensional feature vector and input into a fully connected layer. The fully connected layer maps the three-dimensional feature vector to the action category space, and the number of output nodes is equal to the number of action categories. The output is converted into a probability distribution through the softmax activation function. Based on the output probability distribution, the category with the highest probability is selected as the prediction result, and the sequence number of the action category with the highest probability is output.
3. The method for automatically evaluating the safety of strength training postures according to claim 2, wherein: The step of outputting a call model vector according to the frame image features and the action category sequence number comprises: The frame image features and the action category serial number output in the previous step are both passed as input to the decision model; the action category serial number has a corresponding body part model; The decision model calls the body part model of the corresponding granularity level based on the frame image features and the action category serial number output in the previous step, and the video quality, and outputs the final model calling result, which is represented by a vector.
4. The method for automatically evaluating the safety of strength training postures according to claim 3, wherein: Before the step of receiving a video from the user terminal, extracting frame image features, and outputting an action category number, a data set is prepared, and the corresponding body part model is determined to be called according to the action category number; the extracted video feature data is respectively input into the models of each granularity level of the corresponding body part in the model pool, and each model outputs the total number N of key point estimates and the average error ME. The average error ME is calculated by the following formula: Among them, ME represents the mean error, and the key point positions output by the model are (x1, y1), (x2, y2)... (x n ,y n ); The key point position of the original image is correctly marked (x1 ′ , y1 ′ )、(x2 ′ , y2 ′ )……(x n ′ ,y n ′ ); N represents the total number of key point estimates.
5. The method for automatically evaluating the safety of strength training postures according to claim 3, wherein: The decision model calls the body part model of the corresponding granularity level according to the frame image features and the action category number output in the previous step, and outputs the final model calling result based on the video quality. In the step where the result is represented by a vector, if the foot key point estimation model - granularity level 3 and the torso key point estimation model - granularity level 3 are called, the final output vector [3, 3, 0, 0] is obtained.
6. The method for automatically evaluating the safety of strength training postures according to claim 5, wherein: The step of outputting the coordinates of key points of human posture according to the body part granularity level model comprises: After obtaining the final output vector [3, 3, 0, 0], the output vector [3, 3, 0, 0] is passed to the posture estimation model pool, indicating that the foot key point estimation model - granularity level 3 and the torso key point estimation model - granularity level 3 will be called to obtain the two-dimensional coordinates of the human body posture key points in each frame of the video.
7. The method for automatically evaluating the safety of strength training postures according to claim 1, wherein: The joint angle includes the elbow joint angle. In the step of calculating the motion speed and the joint angle according to the human body posture key point coordinates and the action category serial number, the elbow joint angle is calculated by the following formula: Among them, ∠ABC represents the elbow joint angle, represents the vector from the elbow to the shoulder, represents the vector from elbow to wrist; Among them, the coordinates of the three points ∠ABC are A(x1, y1), B(x2, y2), and C(x3, y3).
8. The method for automatically evaluating the safety of strength training postures according to claim 7, wherein: In the step of calculating the motion speed and joint angle according to the coordinates of the key points of the human body posture and the action category serial number, the motion speed is calculated by the following formula: Among them, v represents the motion speed, s represents the coordinates (x1, y1) of the key point A in the previous frame to the key point A in the current frame ′ Coordinates(x1 ′ , y1 ′ ), t represents the interval time between each frame of image, and n represents the number of image frames.
9. The method for automatically evaluating the safety of strength training postures according to claim 8, wherein: After the step of determining whether the movement speed or the joint angle is within a safety threshold, the following steps are further included: If it is determined that the movement speed and the joint angle are within the safety threshold range, the process ends.
10. A system for automatically evaluating the safety of strength training posture movements, applied to the method for automatically evaluating the safety of strength training posture movements as claimed in any one of claims 1 to 9, characterized in that: The system for automatically evaluating the safety of strength training postures includes: The first output module is used to receive a video from the user end, extract frame image features, and output action category serial numbers; A second output module is used to output a call model vector according to the frame image features and the action category sequence number; A calling module, configured to call a corresponding body part granularity level model according to the calling model vector; A third output module is used to output the coordinates of key points of human posture according to the body part granularity level model; A calculation module, configured to calculate the motion speed and joint angle according to the coordinates of the key points of the human body posture and the sequence number of the action category; A judgment module, configured to judge whether the movement speed or the joint angle is within a safety threshold range; The recognition module is used to give a prompt warning if it is recognized that the movement speed or the joint angle is not within the safety threshold range.
Citation Information
Patent Citations
Intelligent gloves capable of measuring calorie consumption and monitoring hand posture identification as well as estimation method and system
CN105833508A
Motion motion consistency measurement method based on deep learning
CN114882580A