Pull-up test counting and completion quality evaluation method based on visual inspection

Through visual detection and K-NN classifier, it solves the problem of inaccurate counting in the traditional pull-up test, realizes vision-based action counting and quality assessment, and provides a non-contact, accurate and simple testing method to ensure action assessment. objectivity and consistency.

CN118609201APending Publication Date: 2024-09-06SHENYANG UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410630125.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-21
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

The traditional pull-up test counting method cannot accurately detect the subject's whole body movements, and cannot quantify and refine the quality of the movements.

Method used

Using a method based on visual detection, a camera is used to obtain video data, and MediaPipe's BlazePose model is used for human body key point detection and posture feature extraction. It is combined with a K-NN classifier to count and score actions to achieve accurate judgment and quality assessment of actions.

Benefits of technology

It achieves non-contact, accurate pull-up action judgment and real-time counting, reduces test complexity and operational difficulty, has efficient and refined evaluation capabilities, and ensures the objectivity and consistency of evaluation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118609201A
    Figure CN118609201A
Patent Text Reader

Abstract

The invention discloses a pull-up test counting and completion quality evaluation method based on visual inspection. Firstly, 33 posture key points of the whole human body are obtained based on a BlazePose model of Google, a K-nearest neighbor algorithm is used for classification according to posture key point conversion, whether the current action reaches the pull-up counting standard or not is judged according to the confidence value of the current posture, and counting is conducted. A complete pull-up action is divided into four stages, scores of all frames of actions in the current stage are collected and averaged, weights of the stages are added to obtain a score of the complete pull-up action, and finally, the score is normalized and converted into the pull-up action completion degree to evaluate the completion quality of each action. Compared with a traditional counting method, non-contact testing can be achieved, operation is easy, counting results can be fed back in real time, pull-up actions can be evaluated in a refined mode, comprehensive evaluation can be conducted on pull-up, and a tester can know the defects and conduct improvement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer vision and machine learning, and in particular to a pull-up test counting and completion quality evaluation method based on visual detection. Background Art

[0002] Pull-ups refer to hanging exercises that rely on one's own strength to overcome one's own body weight and work upward. They mainly test the development level of upper limb muscle strength, as well as arm strength and waist and abdominal strength. In the process of completing a complete pull-up, many back skeletal muscles and upper limb skeletal muscles need to participate in the work. It is a multi-joint compound action exercise and a good way to exercise the upper limbs. It is the most effective way to develop the strength and endurance of the back skeletal muscles, with the most muscles involved and the most complex movement patterns. It is the most basic way to exercise the back and is one of the important reference standards and items for measuring male physique. Therefore, training pull-ups is an effective way to improve the physical fitness of the people.

[0003] The traditional pull-up test counting method uses sensors to count. This method cannot detect the subject's whole body movements, but can only detect specific parts. It is impossible to detect whether the subject has performed a qualified pull-up action. Moreover, it is impossible to quantify and finely evaluate the quality of the subject's pull-up action.

[0004] Therefore, the prior art still needs to be improved and enhanced. Summary of the invention

[0005] In view of the above-mentioned shortcomings of the prior art, the purpose of the present invention is to provide a pull-up test counting and completion quality evaluation method based on visual detection, aiming to solve the problem that the prior art has poor detection technology for standard human body movements during pull-ups, resulting in inaccurate counting and inability to quantify the completion quality of each pull-up.

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

[0007] In a first aspect, a method for counting and completing quality of pull-up tests based on visual inspection comprises:

[0008] S10, data collection: using a camera to obtain video data of the subject performing a pull-up action;

[0009] S11. Human key point detection: Use the BlazePose model in MediaPipe to detect human key points on the collected images;

[0010] S12, human posture feature extraction: extracting feature data of key points of the human body in the video frame and converting it into an embedding vector;

[0011] S13, K-NN classifier training: Prepare a pull-up image training set sample, run the BlazePose model on each sample image to obtain the posture key points and convert them into embedded vectors and input them into the K-NN classifier for training to obtain the pull-up dataset. The training set image samples should include:

[0012] Image sample data of both hands hanging on the horizontal bar, i.e., straight-arm hanging state;

[0013] Image sample data of both hands pulled upwards;

[0014] Image sample data when the mandible passes the horizontal bar;

[0015] Image sample data of hands lowered to restore straight-arm hanging state;

[0016] S14, current action classification counting and scoring: according to the position of the horizontal bar and the position of the subject's hands, set the counting start, capture the subject's body posture in real time, extract features of the body posture of each frame, input the features into the trained K-NN classifier for classification judgment and action scoring, and realize counting and scoring.

[0017] S15. Counting result and scoring display: display the counting and scoring results on a designed interface.

[0018] Furthermore, before using the K-NN classifier to classify the action, a data set of pull-up actions is first prepared. The data set divides a complete pull-up into four stages, and each sample is labeled and scored.

[0019] Further, setting the counting start according to the position of the horizontal bar and the position of the subject's hands includes:

[0020] Before counting the number of pull-ups, the position of the horizontal bar and the position of the subject's hands are first detected. The position of the horizontal bar is first detected and judged using the Hough straight line segment detection method and the method of limiting the general position of the horizontal bar during the test. After the horizontal bar is detected, the subject's hands are detected. When it is detected that the subject's hands are on the horizontal bar, the pull-up test counting begins.

[0021] Furthermore, the real-time capture of the subject's body posture, feature extraction of each frame of the body posture, and inputting the features into a trained K-NN classifier for classification judgment include:

[0022] In the process of real-time capture, the human posture of each frame is extracted and the features are input into the trained K-NN classifier for classification. According to the classification results, it is judged whether the current action is a pull-up action. The human posture in the video frame is first filtered twice, namely, the maximum distance filtering and the average distance filtering. For the maximum distance filtering, let P be the human posture sample extracted from the current frame, D be the data set containing all known posture samples, and each sample is denoted as d i ∈D, maximum distance D max (P,d i )for:

[0023]

[0024] p j and d ij P and d are i At the coordinate of the jth joint, ||.|| represents the Euclidean distance between two points. The first N samples with the smallest distance to P are selected (N is set to 30 in this invention) to form a set S max :

[0025]

[0026] Average distance filtering: In S max Calculate the average distance D between P and each sample avg (P,S max ):

[0027]

[0028] Select the first N samples with the smallest average distance (N is set to 10 in this invention) to form a set S avg ; The purpose of average distance filtering is to find some samples with the closest average distance to the target posture.

[0029] Furthermore, the real-time capturing of the subject's body posture, extracting features of the body posture of each frame, and inputting the features into a trained K-NN classifier for classification judgment further includes:

[0030] Then the classification results are smoothed using the moving exponential average method, that is, for S avg The classification results in , apply moving exponential average smoothing (EMA), the smoothing factor α is (0<α<1), the smoothed classification probability vector P smooth for:

[0031] P smooth (t) = αP smooth (t-1)+(1-α)P(t)

[0032] Among them, P(t) is the classification probability vector of the current time step t. Based on the 10 smoothed samples, find out which type of action has the largest number of times among these 10 samples, and classify the current action into this category.

[0033] Furthermore, the real-time capturing of the subject's body posture, extracting features of the body posture of each frame, and inputting the features into a trained K-NN classifier for classification judgment further includes:

[0034] If the current action is a pull-up action, the confidence value of the current posture is used to determine whether the current action meets the pull-up counting standard. If the confidence value exceeds the set upper confidence threshold and then falls below the set lower confidence threshold, it is determined that the subject has performed a complete pull-up. If the current action is classified as a pull-up action, the confidence value of being classified as a pull-up action is calculated. Let C up and C down is the upper confidence threshold and the lower confidence threshold (and C down <C up ), through the smoothed probability vector P smooth , determine the current action confidence Conf t , if the action is classified as a pull-up and its confidence satisfies:

[0035] C down <Conf t (t)≤C up

[0036] If the confidence level Conf t At a certain moment t′ exceeds C for the first time up , and then at a certain time t″ it drops to C down Next, it is determined that a complete pull-up movement is completed, and the counter is incremented by one.

[0037] Furthermore, the scoring according to the current pull-up action includes:

[0038] After identifying the current action as a pull-up action, determine which stage the pull-up action belongs to, and compare it with the corresponding standard action in the data set to determine whether the current action is a standard action. If it is a standard action, one point is scored, otherwise it is zero. Subsequently, all video frames of the pull-up action in this stage are accumulated and averaged to obtain a score for one stage. Then, different weights are given to the four stages and the scores are accumulated to obtain the score of the entire pull-up action. Finally, the score is converted to obtain the degree of completion of the entire pull-up action.

[0039] Furthermore, the human body key points include at least one of the following: key points corresponding to the subject's arms, key points corresponding to the subject's face, and key points corresponding to the subject's legs.

[0040] The technical solution adopted by the present invention has the following beneficial effects:

[0041] (1) Non-contact testing: This method realizes the recognition of key points of the human body based on computer vision, which can accurately judge the pull-up action without any contact measurement of the test subject. This can reduce the interference and discomfort to the test subject during the test.

[0042] (2) Easy to operate: This method does not require any additional measuring devices or sensors. It can perform pull-up tests by simply acquiring human body images through a camera. This can greatly reduce the complexity and difficulty of the test, making the test easier to perform.

[0043] (3) Efficient, accurate, real-time and refined evaluation: This method classifies the key points of the human body based on the K nearest neighbor algorithm, which can quickly and accurately evaluate the pull-up action of the test subject. At the same time, this method can also display the pull-up test results in real time. And by dividing the pull-up action into stages and using the Procrustes distance to match the posture of the video frames of each stage, a refined evaluation of the action quality can be achieved. This method can capture the detailed differences in the execution process of the action, not just the final result, which helps the subject understand which specific stage they need to improve.

[0044] (4) Objectivity and consistency: By using the posture matching algorithm of Procrustes analysis, the scoring process can be highly automated, reducing the errors caused by human subjective judgment and ensuring the consistency and fairness of the quality evaluation of pull-up completion. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 The pull-up action test counting and scoring steps provided by the present invention;

[0046] Figure 2 A pull-up action counting flow chart provided by the present invention;

[0047] Figure 3 The pull-up action scoring steps provided by the present invention;

[0048] Figure 4 A scoring flow chart of the pull-up action provided by the present invention;

[0049] Figure 5 A schematic diagram of the pull-up test counting and completion quality evaluation system provided by the present invention; DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0051] It should be noted that when a component is referred to as being "fixed to" or "disposed on" another component, it can be directly on the other component or indirectly on the other component. When a component is referred to as being "connected to" another component, it can be directly connected to the other component or indirectly connected to the other component.

[0052] It should also be noted that the same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right" and the like indicate directions or positional relationships based on the directions or positional relationships shown in the drawings, it is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction. Therefore, the terms describing the positional relationship in the drawings are only used for illustrative purposes and cannot be understood as limitations on this patent. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.

[0053] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0054] In the embodiment of the present invention, please refer to Figure 5 During the pull-up test, the counting and completion quality evaluation device can be composed of two parts: hardware and software. The hardware part is described as a camera and a computer, and the camera model is a Hikvision DS-E14a camera. The software part is a pull-up test counting and completion quality evaluation system, and the pull-up test counting and completion quality evaluation system uses the test method provided by the present invention, which is divided into a pull-up test counting part and a pull-up action completion quality evaluation part, and performs counting test and completion quality evaluation respectively; the entire pull-up test counting and completion quality evaluation process is to first use a camera to shoot the pull-up action video in real time and display the video on the computer, and the video will be opened in the pull-up test counting and completion quality evaluation system interface for counting detection and pull-up action completion quality evaluation.

[0055] In this example, see Figure 1 and Figure 2 A pull-up test counting method based on visual inspection and a completion quality evaluation method, the specific steps are as follows:

[0056] S10. Data collection: Use a camera to obtain video data of the subject performing pull-ups, ensuring that the collected data includes the complete pull-up process for subsequent processing and analysis.

[0057] S11. Human key point detection: Use MediaPipe to identify key points of the collected image data; MediaPipe provides a human posture estimation model that can accurately detect and track key points of the human body in the image, such as shoulders, elbows, wrists, face, legs, etc.

[0058] S12. Human posture feature extraction: Based on the known pull-up action features, the human posture features in each key frame are extracted; then the feature data of the key points of the human body in these video frames are extracted, including the position coordinates of the hands, arms, shoulders and the data of converting the key points into embedded vectors, etc. These feature data can be used to compare with the known pull-up action data in the data set to determine whether an action meets the pull-up standard.

[0059] S13, K-NN classifier training: Prepare a pull-up image training set sample, run the BlazePose model on each sample image to obtain the posture key points and convert them into embedded vectors and input them into the K-NN classifier for training to obtain the pull-up dataset. The training set image samples should include:

[0060] Image sample data of both hands hanging on the horizontal bar, i.e., straight-arm hanging state;

[0061] Image sample data of both hands pulled upwards;

[0062] Image sample data when the mandible passes the horizontal bar;

[0063] Image sample data of hands lowered to restore straight-arm hanging state;

[0064] Specifically, the sample images are taken from multiple angles and from different individuals to ensure the diversity of the data set. All sample images are processed, including posture detection, image cropping, etc., and images with unsuccessful posture detection are removed to ensure that all image data are valid. Then, samples with incorrect predictions are manually deleted, and all posture key points in the sample images with detected posture key points are converted into embedded vectors. The difference between the two postures is measured based on the Euclidean distance between the two embedded vectors, and the K-NN classifier is used for classification. The final pull-up training data set is obtained.

[0065] S14. Pull-up action counting: according to the position of the horizontal bar and the position of the subject's hands, set the counting start point, capture the subject's body posture in real time, extract features of the body posture of each frame, input the features into the trained K-NN classifier for classification and judgment, and realize counting.

[0066] Among them, when setting the counting start, the position of the horizontal bar and the position of the subject's hands are detected before the pull-up counting. The position of the horizontal bar is first detected using the Hough straight line segment detection method and the method of limiting the general position of the horizontal bar during the test (that is, the horizontal bar is generally located in the upper 1 / 3 of the image, and the horizontal bar is horizontal and its length generally occupies more than half of the width of the entire image). After the horizontal bar is detected, the subject's hands are detected. Only when it is detected that the subject's hands are on the horizontal bar will the pull-up test count begin. The key points needed for the detection of the position of both hands are provided by the MediaPipe human posture model, which can be used directly for position detection.

[0067] In addition, during the real-time capture process, the human body posture of each frame is feature extracted and the features are input into the trained K-NN classifier for classification. According to the classification result, it is then determined whether the current action is a pull-up action. If the current action is a pull-up action, the confidence value of the current posture is used to determine whether the current action meets the pull-up counting standard. If the confidence value exceeds the set upper confidence threshold and then falls below the set lower confidence threshold, it is considered that the subject has performed a complete pull-up, and the counter adds one to the result of the pull-up test count.

[0068] Specifically, the K-NN classifier is used to perform real-time action classification and counting on the video. The human posture in the video frame is first filtered twice, namely, maximum distance filtering and average distance filtering. Maximum distance filtering: Let P be the human posture sample extracted from the current frame, D be the data set containing all known posture samples, and each sample is denoted by d i ∈D, maximum distance D max (P,d i )for:

[0069]

[0070] p j and d ij P and d are i At the coordinate of the jth joint, ||.|| represents the Euclidean distance between two points. The first N samples with the smallest distance to P are selected (N is set to 30 in this invention) to form a set S max :

[0071]

[0072] The purpose of maximum distance filtering is to remove samples that are very similar to the target pose but have individual joints oriented differently, because they actually represent different pose categories.

[0073] Average distance filtering: In S max Calculate the average distance D between P and each sample avg (P,S max ):

[0074]

[0075] Select the first N samples with the smallest average distance (N is set to 10 in this invention) to form a set S avg The purpose of average distance filtering is to find some samples with the closest average distance to the target posture, so as to determine the posture category to which the target posture belongs.

[0076] Then, in order to improve the robustness of the pull-up count, that is, to balance any noise from posture prediction or classification to make the classification result more stable and continuous, the classification result is smoothed by moving exponential average, that is, for S avg The classification results in , apply moving exponential average smoothing (EMA), the smoothing factor α is (0<α<1), the smoothed classification probability vector P smooth for:

[0077] P smooth (t) = αP smooth (t-1)+(1-α)P(t)

[0078] Among them, P(t) is the classification probability vector of the current time step t. According to the 10 smoothed samples, find out which type of action has the most times in these 10 samples, and classify the current action into this category. If the current action is classified as a pull-up action, calculate its confidence value for being classified as a pull-up action. Let C up and C down is the upper confidence threshold and the lower confidence threshold (and C down <C up), through the smoothed probability vector P smooth , determine the current action confidence Conf t , if the action is classified as a pull-up and its confidence satisfies:

[0079] C down <Conf t (t)≤C up

[0080] If the confidence level Conf t At a certain moment t′ exceeds C for the first time up , and then at a certain time t″ it drops to C down Next, it is determined that a complete pull-up action is completed, and the counter is incremented by one. t Fluctuations around the threshold (e.g., when the user pauses between the "up" and "down" states) lead to phantom counts, where the threshold used to detect when a state is exited is actually slightly lower than the threshold used to detect state exits, i.e., the lower confidence threshold C set. down .

[0081] S15, counting result display: according to the value of the counter, the counting result of the pull-up is displayed on the designed interface to display the test result. The interface design is designed using Python language and pyqt5, and the Python version is version 3.8.

[0082] In this example, see Figure 2 , Figure 3 and Figure 4 A pull-up completion quality evaluation method based on visual inspection of pull-up test counting and completion quality evaluation method, the specific steps are as follows:

[0083] S20, input video frames: input the pull-up video captured from the camera frame by frame for subsequent processing.

[0084] S21, video frame pull-up action stage division: identify the subject's action in the current video frame. This step refers to steps S11, S12 and S13. If it is detected that the current action belongs to the pull-up action, it is divided into stages. The specific steps are as follows:

[0085] For the current video frame I t The human body posture is estimated for the subjects in the experiment, and the key point coordinate set P is extracted. t ={p t,1 ,p t,2 ,...,p t,n}, where n is the number of key points, each p t,i =(x t,i ,yt,i ) represents the two-dimensional coordinates of the i-th key point in frame t. And converted into an embedding vector E t , and then calculate the current embedding vector and each sample S={S1,S2,...,S M The Euclidean distance between two embedding vectors D t,j for: Where m is the dimension of the embedding vector, E t,i and S j,i are the embedding vector of the current frame and the value of the jth sample in the i-th dimension. Then the maximum distance filtering is performed, that is, E is calculated. t The minimum value set among the maximum distances of all samples in S, select distance E t The most recent N1 (N1 is 30 in this invention) samples are used as the candidate set:

[0086]

[0087] Then perform average distance filtering, that is, for C max , calculate E t The average distance from each sample, select the first N2 (N2 is 10 in this invention) samples with the smallest average distance to form a set:

[0088]

[0089] Then to C avg Perform moving exponential averaging on the samples to obtain the smoothed category probability distribution P smooth , then according to P smooth , select the category with the most occurrences as the category of the current action, and if it is identified as a pull-up, start dividing the pull-up action stages. Combined with S13, it can be seen that the entire pull-up action is divided into four stages, namely, the stage of both hands hanging on the horizontal bar with straight arms, the stage of both hands pulling up, the stage of the chin passing the horizontal bar, and the stage of lowering both hands to restore to the straight arm hanging stage.

[0090] The specific description of the action phase division is: when the current action is identified as a pull-up, calculate its confidence Conf t , confidence score Conf t Reflects the pose P in the current frame t The similarity with the pull-up action samples in the training set. Set the threshold set

[0091] θ={θ hang ,θ pull_start ,θ over ,θ lower_start ,θ min_delta}

[0092] θ hang is the threshold value when the straight arm is hanging, θ pull_start is the pull-up start threshold, θ over is the mandibular crossing bar threshold, θ lower_start is the threshold for both hands to start lowering, θ min_delta is the minimum confidence change threshold. Now we start to divide the stages.

[0093] ①Hands on the horizontal bar with straight arms hanging: When Conf t <θ hang , in the straight arm hanging stage.

[0094] ②Pull both hands up: When Conf t First time exceeding θ pull_start And if it continues to increase, it is in the upward pull-up stage.

[0095] ③ Jaw passing horizontal bar stage: When Conf t reaches a local maximum and the maximum value is greater than θ over , and the confidence difference with the previous frame is greater than θ min_delta , it is in the stage of jaw passing the horizontal bar.

[0096] ④ Lower both hands to the straight arm hanging stage: When Conf t It starts to decrease continuously and falls below θ lower_start , then it is in the stage of lowering both hands.

[0097] S22. Video frame pull-up action scoring: After the pull-up action is divided into stages, the key point set P of the subject in the current frame is t The action samples of this stage in the dataset are compared and the Procrustes distance posture matching algorithm is used to evaluate the similarity. If the similarity between the action of the current frame and the standard action is less than 1, the action of the frame is considered standard and scored as 1; otherwise, it is scored as 0.

[0098] S23. Average score of pull-up action in each video frame of each stage: For all frames in this stage, their scores are accumulated and averaged, and the final average score is used as the final action score of this stage. The formula is: score t is the action score for each frame, and F is the number of frames.

[0099] S24, weighted summary of four-stage scores: The scores of the four stages are weighted and then added together to get a score for the pull-up action. Specifically, the scores of the four stages are S1, S2, S3, and S4, and the weights are w1, w2, w3, and w4, and w1+w2+w3+w4=1, then the final score is:

[0100] TotalScore=w1·S1+w2·S2+w3·S3+w4·S4

[0101] S25. Evaluation of the completion quality of the pull-up action: In order to know the completion quality of each pull-up more directly, the pull-up completion degree is used to evaluate the completion quality of each pull-up action. The calculation logic of the completion degree is that when the subject's chin passes the horizontal bar and the movements in other stages are standard, the completion degree is 100%. If the chin does not pass the horizontal bar, the Procrustes distance is used to evaluate the closeness of the current frame movement to the standard movement and score it, and the score of the chin passing the horizontal bar stage is obtained. The scores of the other three stages are combined to obtain the completion degree of this pull-up action. The specific implementation of the pull-up action completion degree is as follows: first define a confidence function C(D). When the Procrustes distance D between the current frame movement and the standard movement is close to 0 (that is, the movement is very close to the standard movement), the confidence function C(D) is close to 1; on the contrary, when D is much larger than the set maximum acceptable difference threshold D of the movement. threshold When the confidence function C(D) is close to 0, the confidence threshold C(D) function is as follows:

[0102]

[0103] Then, the score of the mandibular over-the-horizontal-bar stage is adjusted according to the confidence function to obtain the score S3′ of this stage. The calculation formula of S3′ is as follows:

[0104] S3′=S3×C(D)

[0105] The final total score is: TotalScore = w1·S1+w2·S2+w3·S3′+w4·S4

[0106] Finally, we get the completion rate of each pull-up movement, Compl_Perc:

[0107]

[0108] TotalScore max The theoretical full score is 1 point.

[0109] Finally, the completion results of each pull-up action are displayed on the designed interface. The interface design is designed using Python language and pyqt5, and the Python version is version 3.8.

[0110] The invention discloses a method for counting and completing quality evaluation of a pull-up test based on visual detection. The method is divided into two parts, namely, first counting the pull-ups and then evaluating the completion quality of each pull-up action. That is, based on the BlazePose model of Google, 33 posture key points of the human body are inferred, and the posture key points are converted into embedded vectors, and all embedded vectors can be distance-measured, and finally the K-nearest neighbor (K-NN) algorithm is used as a classifier to classify the current action of the subject, and a data set of pull-up actions is first produced before classification. Then, according to the distance between the current unclassified pull-up action and each sample in the data set, the distance is filtered twice and the first 10 samples with the closest distance to the sample are selected, and then the category with the most occurrences in these 10 samples is counted, and the category with the most occurrences is selected as the category of the new sample. After the current action is classified as a pull-up action, it is judged whether the current action has reached the standard of pull-up counting according to the confidence value of the current posture, and then counting is performed. As for the completion quality evaluation part, after the current action is recognized, the pull-up action stages are first divided, that is, a complete pull-up action is divided into four stages, and then the current frame pull-up action is scored, the action scores of all frames in the current stage are summarized and averaged to obtain the score of the pull-up action in the current stage, and then different weights are added to the four stages to obtain a score for a complete pull-up action. Finally, the normalized score is converted into the completion degree of the pull-up action to evaluate the completion quality of each action. Compared with the traditional method of using sensors to count pull-ups, the advantages of the present invention are non-contact testing, simple operation, real-time feedback of counting results and refined evaluation of pull-up actions. The pull-up completion quality evaluation method can comprehensively evaluate pull-ups, so that the tester can understand at which stage his performance is insufficient and make improvements.

[0111] In this embodiment, the following effects can be achieved by counting and completing quality evaluation through the above method:

[0112] (1) Non-contact testing: This method realizes the recognition of key points of the human body based on computer vision, which can accurately judge the pull-up action without any contact measurement of the test subject. This can reduce the interference and discomfort to the test subject during the test.

[0113] (2) Easy to operate: This method does not require any additional measuring devices or sensors. It can perform pull-up tests by simply acquiring human body images through a camera. This can greatly reduce the complexity and difficulty of the test, making the test easier to perform.

[0114] (3) Efficient, accurate, real-time and refined evaluation: This method classifies the key points of the human body based on the K nearest neighbor algorithm, which can quickly and accurately evaluate the pull-up action of the test subject. At the same time, this method can also display the pull-up test results in real time. And by dividing the pull-up action into stages and using the Procrustes distance to match the posture of the video frames of each stage, a refined evaluation of the action quality can be achieved. This method can capture the detailed differences in the execution process of the action, not just the final result, which helps the subject understand which specific stage they need to improve.

[0115] (4) Objectivity and consistency: By using the posture matching algorithm of Procrustes analysis, the scoring process can be highly automated, reducing the errors caused by human subjective judgment and ensuring the consistency and fairness of the quality evaluation of pull-up completion.

[0116] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the schemes disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the claims.

Claims

1. A method for counting and completing quality evaluation of pull-up tests based on visual inspection, characterized in that: include: S10, data collection: using a camera to obtain video data of the subject performing a pull-up action; S11. Human key point detection: Use the BlazePose model in MediaPipe to detect human key points on the collected images; S12, human posture feature extraction: extracting feature data of key points of the human body in the video frame and converting it into an embedding vector; S13, K-NN classifier training: Prepare a pull-up image training set sample, run the BlazePose model on each sample image to obtain the posture key points and convert them into embedded vectors and input them into the K-NN classifier for training to obtain the pull-up dataset. The training set image samples should include: Image sample data of both hands hanging on the horizontal bar, i.e., straight-arm hanging state; Image sample data of both hands pulled upwards; Image sample data when the mandible passes the horizontal bar; Image sample data of hands lowered to restore straight-arm hanging state; S14, current action classification counting and scoring: according to the position of the horizontal bar and the position of the subject's hands, set the counting start, capture the subject's body posture in real time, extract features of the body posture of each frame, input the features into the trained K-NN classifier for classification judgment and action scoring, and realize counting and scoring; S15. Counting result and scoring display: display the counting and scoring results on a designed interface.

2. The method for counting and completing quality evaluation of pull-up tests based on visual detection as claimed in claim 1, characterized in that: The human body key points involved include at least one of the following: key points corresponding to the subject's arms, key points corresponding to the subject's legs, and key points corresponding to the subject's shoulders.

3. The method for counting and completing quality evaluation of pull-up test based on visual detection as claimed in claim 1, characterized in that: Before using the K-NN classifier to classify the movements, a pull-up action dataset is prepared. This dataset divides a complete pull-up into four stages and labels and scores each sample.

4. The method for counting and completing quality evaluation of pull-up tests based on visual detection as claimed in claim 1, characterized in that: The step of setting the counting start according to the horizontal bar position and the position of the subject's hands includes: Before counting the number of pull-ups, the position of the horizontal bar and the position of the subject's hands are first detected. The position of the horizontal bar is first detected and judged using the Hough straight line segment detection method and the method of limiting the general position of the horizontal bar during the test. After the horizontal bar is detected, the subject's hands are detected. When it is detected that the subject's hands are on the horizontal bar, the pull-up test counting begins.

5. The method for counting and completing quality evaluation of pull-up test based on visual detection as claimed in claim 1, characterized in that: The real-time capture of the subject's human posture, feature extraction of each frame of the human posture, and inputting the features into a trained K-NN classifier for classification judgment include: In the process of real-time capture, the human posture of each frame is extracted and the features are input into the trained K-NN classifier for classification. According to the classification results, it is judged whether the current action is a pull-up action. The human posture in the video frame is first filtered twice, namely, the maximum distance filtering and the average distance filtering. For the maximum distance filtering, let P be the human posture sample extracted from the current frame, D be the data set containing all known posture samples, and each sample is denoted as d i ∈D, maximum distance D max (P,d i )for: p j and d ij P and d are i At the coordinate of the jth joint, ||.|| represents the Euclidean distance between two points. The first N samples with the smallest distance to P are selected (N is set to 30 in this invention) to form a set S max : Average distance filtering: In S max Calculate the average distance D between P and each sample avg (P,S max ): Select the first N samples with the smallest average distance (N is set to 10 in this invention) to form a set S avg ; The purpose of average distance filtering is to find some samples with the closest average distance to the target posture.

6. The method for counting and completing quality evaluation of pull-up tests based on visual detection as claimed in claim 1, characterized in that: The real-time capture of the subject's human posture, feature extraction of each frame of the human posture, and inputting the features into the trained K-NN classifier for classification judgment also include: Then the classification results are smoothed using the moving exponential average method, that is, for S avg The classification results in , apply moving exponential average smoothing (EMA), the smoothing factor α is (0<α<1), the smoothed classification probability vector P smooth for: P smooth (t)=αP smooth (t-1)+(1-α)P(t) Among them, P(t) is the classification probability vector of the current time step t. According to the 10 smoothed samples, find out which type of action has the largest number of times in these 10 samples, and classify the current action into this category.

7. The method for counting and completing quality evaluation of pull-up tests based on visual detection as claimed in claim 1, characterized in that: The real-time capture of the subject's human posture, feature extraction of each frame of the human posture, and inputting the features into the trained K-NN classifier for classification judgment also include: If the current action is a pull-up action, the confidence value of the current posture is used to determine whether the current action meets the pull-up counting standard. If the confidence value exceeds the set upper confidence threshold and then falls below the set lower confidence threshold, it is determined that the subject has performed a complete pull-up. If the current action is classified as a pull-up action, the confidence value of being classified as a pull-up action is calculated. Let C up and C down is the upper confidence threshold and the lower confidence threshold (and C down <C up ), through the smoothed probability vector P smooth , determine the current action confidence Conf t , if the action is classified as a pull-up and its confidence satisfies: C down <Conf t (t)≤C up If the confidence level Conf t At a certain moment t′ exceeds C for the first time up , and then at a certain time t″ it drops to C down Next, it is determined that a complete pull-up movement is completed, and the counter is incremented by one.

8. The method for counting and completing quality evaluation of pull-up test based on visual detection as claimed in claim 1, characterized in that: The scoring according to the current pull-up action includes: After identifying the current action as a pull-up action, determine which stage the pull-up action belongs to, and compare it with the corresponding standard action in the data set to determine whether the current action is a standard action. If it is a standard action, one point is scored, otherwise it is zero. Then, the pull-up action videos of this stage are accumulated and averaged to get the score of one stage. Then, different weights are given to the four stages and the scores are accumulated to get the score of the entire pull-up action. Finally, the scores are converted to get the completion degree of the entire pull-up action.

Citation Information

Cited By

  • Pull-up process action decomposition and key frame extraction method and computer equipment

    CN119068555A

  • Pull-up leveraging climbing detection method based on visual detection

    CN122116476A