Body-building action recognition, counting and quality evaluation method based on machine vision

By using a machine vision-based method for fitness motion recognition and quality assessment, the problems of high cost, poor environmental adaptability, and inaccurate counting in existing technologies are solved. This method achieves real-time accurate recognition and multi-dimensional assessment without the need for additional equipment, and is suitable for scenarios such as home fitness, gym group classes, and rehabilitation training.

CN121904845APending Publication Date: 2026-04-21HEBEI UNIV OF ENG
View PDF 0 Cites 2 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-19
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing fitness movement analysis technologies suffer from high costs, interference with the naturalness of movement, poor environmental adaptability, inaccurate counting, limited evaluation dimensions, and insufficient adaptability to multiple scenarios. They cannot meet users' needs for real-time accurate recognition, scientific quality assessment, and multi-scenario adaptability without additional hardware burden.

Method used

By employing a machine vision-based approach, through video data acquisition and image preprocessing, human pose estimation and key point detection, temporal feature optimization and motion recognition, motion counting and quality assessment, combined with biomechanical constraints, we can achieve accurate recognition, stable counting and multi-dimensional quality assessment of fitness movements, and output visual feedback and personalized suggestions.

Benefits of technology

It improves the stability and counting accuracy of fitness movement recognition, realizes multi-dimensional movement quality assessment and real-time training guidance, and can provide scientific training guidance without wearing devices. It is suitable for diverse scenarios such as home fitness, gym group classes and rehabilitation training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121904845A_ABST
    Figure CN121904845A_ABST
Patent Text Reader

Abstract

The invention relates to the field of computer vision, artificial intelligence and intelligent fitness, and particularly discloses a fitness action recognition, counting and quality evaluation method based on machine vision, which comprises the following steps of: extracting video frames and standardizing the video frames, realizing background suppression and human body region enhancement through a semantic segmentation or inter-frame difference method, and outputting a standardized image sequence; detecting key joint points by adopting a pre-training model, and outputting a stable skeleton sequence and candidate action stage data through time sequence consistency filtering; reconstructing a feature tensor, fusing spatio-temporal features through double-branch attention collaboration, and outputting action categories and time sequence compensation parameters in a classified manner; a dynamic threshold method accumulates the number of actions, action qualification is judged in combination with biomechanical constraints, the confidence coefficient is optimized, and a structured result is output; bone rendering, error highlighting, voice generation and personalized training suggestions. According to the method, wearable equipment is not needed, the problems of instable identification, miscounting and the like in a complex scene are solved, and real-time accurate analysis is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer vision, artificial intelligence and smart fitness technology, specifically a method for recognizing, counting and evaluating fitness movements based on machine vision. Background Technology

[0002] Fitness motion analysis technology is a core supporting technology for scenarios such as smart fitness, rehabilitation training, and large-scale gym management. Its core value lies in helping users to standardize their movements and accurately count training volume through precise perception and analysis of human movement status, providing data support for scientific fitness. At the same time, it assists coaches in efficiently completing multi-user training guidance, improving training effects and management efficiency. It is a key cross-disciplinary technology connecting artificial intelligence, computer vision, and the fitness field, and is of great significance to promoting the intelligent and standardized development of the fitness industry.

[0003] Existing fitness motion analysis technologies are mainly divided into two core implementation methods: relying on wearable sensors to collect human motion data and obtaining motion parameters through hardware devices to achieve motion analysis; and analyzing only video images and using fixed thresholds or simple temporal rules to complete motion recognition and counting.

[0004] Wearable sensor solutions: Although they have high data accuracy, they require additional hardware, which not only increases the cost of use but also interferes with the naturalness of the user's movements, limiting their applicability in various scenarios. Video image analysis solutions have limited adaptability to complex movements and individual differences, specifically exhibiting the following problems: Poor environmental adaptability: The stability of human key point detection is insufficient under complex backgrounds, lighting changes, or camera angle changes; Low counting accuracy: Posture jitter and occlusion can easily lead to inaccurate segmentation of movement stages, resulting in miscounting and missed counts; Single evaluation dimension: Most systems only focus on movement category and repetition count, lacking a comprehensive evaluation of quality factors such as joint angle, movement trajectory, and movement rhythm, making it difficult to provide users with effective training guidance; Insufficient scene coverage: It is difficult to stably identify individual movements in different body types, different training distances, and multi-user group class scenarios, making it impossible to achieve unified and accurate analysis and evaluation.

[0005] Existing conventional methods suffer from drawbacks such as high cost, interference with the naturalness of movement, poor environmental adaptability, inaccurate counting, limited evaluation dimensions, and insufficient adaptation to multiple scenarios. As a result, they cannot meet users' core needs of "no additional hardware burden, real-time accurate recognition, scientific quality assessment, and multi-scenario adaptation." They cannot correct movement deviations and counting errors in real time during training, nor can they achieve the transformation from "post-training evaluation" to "real-time guidance during training." Furthermore, they cannot support the management needs of large-scale application scenarios such as group classes in gyms.

[0006] Therefore, in order to address the pain points of existing technologies, there is an urgent need to propose a technical solution that relies solely on machine vision, without requiring additional wearable equipment, and can simultaneously achieve accurate recognition, stable counting, and multi-dimensional quality assessment of fitness movements, filling the gaps in real-time performance, stability, comprehensiveness, and multi-scenario adaptability of existing technologies. Summary of the Invention

[0007] To address the aforementioned problems in the prior art, this invention provides a machine vision-based method for fitness movement recognition, counting, and quality assessment. This method solves the problems of traditional methods, such as reliance on wearable devices, unstable recognition, miscounting, and lack of quality assessment, thereby improving the relevance of training guidance.

[0008] To achieve the above objectives, this invention proposes a machine vision-based method for fitness movement recognition, counting, and quality assessment, comprising the following steps: S1. Video data acquisition and image preprocessing: Extract video frames from the input video stream and perform standardization processing to achieve background suppression and human body region enhancement, and output a standardized image sequence with human body movements as the main body. S2. Human pose estimation and key point detection: Human key joints are detected in standardized image sequences. The joint position sequence is processed by temporal consistency filtering to output a stable skeleton sequence and preliminary candidate action stage data. S3, Temporal Feature Optimization and Action Recognition: The skeleton sequence is reconstructed into a feature tensor, and the spatiotemporal features are optimized and fused through a dual-branch attention collaboration mechanism. The input to the classifier outputs the action category recognition result and temporal feature compensation parameters. S4. Motion Counting and Quality Assessment: Based on the division of motion stages, the dynamic threshold method is used to accumulate the number of complete motions; combined with biomechanical constraints, the qualification of motion cycles is judged, the identification confidence is optimized, and a structured analysis result set is output. S5. Interactive Feedback and Result Output: Performs skeletal rendering and highlights erroneous joints on the original video stream, generating and outputting voice prompts, text suggestions, and personalized training suggestions.

[0009] Preferably, in S1, the specific steps for video data acquisition and image preprocessing are as follows: S11, Video frame extraction: Extract video frames from the input video stream at a preset frequency or an adaptive frequency based on motion detection. S12, Resolution Normalization: Scaling all extracted video frames to a fixed resolution; S13. Illumination Correction: The image is compensated for illumination using a histogram equalization algorithm. S14. Background suppression and human body region enhancement: Use a lightweight semantic segmentation network to extract the human body foreground mask and perform contrast enhancement or edge enhancement operations on the foreground human body region; or use the inter-frame difference method to quickly obtain the motion region in a fixed camera position scene.

[0010] Preferably, in S14, a morphological noise removal strategy can be introduced before background suppression and human body region enhancement. The specific steps are as follows: S141. Erosion Operation: Set a structuring element B, where B is a 3×3 or 5×5 rectangular kernel. Perform an erosion operation on the binarized or edge image to erode isolated bright spots in the image with a scale smaller than the structuring element B. The expression is: ; S142. Dilation Operation: Performs dilation processing on the eroded image to restore the geometric scale of the true target. The expression is: ; In the formula, A is the image to be processed, and B is the structuring element. Here are the image pixel coordinates, and ⊖ represents the erosion operator. This is the expansion operator. For structuring element B, use image pixel coordinates The set after translation around the center.

[0011] Preferably, in S2, the specific steps for human pose estimation and keypoint detection are as follows: S21. Skeleton coarse detection: Using the pre-trained deep learning pose estimation model HRNet, each frame of the image output by S1 is processed to obtain the two-dimensional spatial coordinates of key human joints; the key human joints include the nose, neck, shoulder, elbow, wrist, hip, knee, and ankle. S22. Temporal Consistency Filtering: A Kalman filter is used to smooth the position sequence of a single key point in a continuous time frame T, eliminating outliers that deviate significantly from the temporal pattern in terms of velocity and acceleration. S23, Output dimension is the total number of frames N The skeletal sequence, and candidate action stage data preliminarily divided based on joint motion trends.

[0012] Preferably, in S3, the core of temporal feature optimization and action recognition is a multi-level temporal feature fusion module, and the specific steps are as follows: S31. Input Feature Reconstruction: Convert the skeleton sequence output from S2 into a feature tensor. Where C is the number of feature channels, T is the number of time frames, and J is the number of key points, and the value of J is consistent with the value of the structuring element B; S32. The feature tensor is processed through a dual-branch attention collaboration mechanism to obtain the key point channel attention weight matrix and the temporal attention map; S33. Feature Weighting and Fusion: The keypoint channel attention weight matrix and the temporal attention map are applied to the input feature tensor X. Features at different time scales are fused using a layer-by-layer alignment strategy. The fusion expression is as follows: ; In the formula, For the refined feature tensor after fusion, This is the attention weight matrix for the key points and channels. This is a temporal attention map, where m represents the feature identifiers at different time scales, and M represents the total number of scales for multi-level temporal features. To perform multi-scale extraction by aligning features at different time scales after weighting. Let be the fusion weight at the m-th scale, and ; S34. Recognition and Output: Input the fused refined features into the classifier and output the action category recognition result and the time sequence feature compensation parameters.

[0013] Preferably, in S32, the dual-branch attention collaboration mechanism includes a keypoint channel attention branch and a temporal space attention branch; the specific steps for processing the feature tensor through the dual-branch attention collaboration mechanism include: Joint channel attention branch: Feature vectors are extracted through local and global pooling, and the inter-channel dependencies are modeled through lightweight one-dimensional convolution and a sigmoid activation function to generate local and global joint channel attention weights. Finally, the local and global attention are fused using a local and global attention fusion formula to obtain the joint channel attention weight matrix. ; Temporal attention branch: Simultaneous average pooling and max pooling are performed in the temporal dimension to aggregate temporal attention maps representing action rhythm and key phases; or this branch can be replaced by a temporal convolutional network (TCN).

[0014] Preferably, the formula for fusing local and global attention is: ; in, This is the attention weight matrix for the key points and channels. The weights are learnable or pre-defined, and satisfy the following conditions: , For global keypoint channel attention weights, For local keypoint channel attention weights; Global and local keypoint channel attention weights are generated using lightweight one-dimensional convolution and a sigmoid activation function, expressed as follows: ; ; in, For the Sigmoid function, Encode short-term action context, The global action semantics are encoded as follows: ; ; In the formula, LAP represents local average pooling, GAP represents global average pooling, and s represents the local time window length. For short-term time step index, .

[0015] Preferably, in S4, the specific implementation of action counting is as follows: based on the action stage identified in S3, a dynamic threshold method is used to continuously monitor the vertical position of the joint or the knee angle. When the value exceeds the threshold dynamically calculated from recent historical data, it is determined that a state transition has occurred, and a complete action is accumulated.

[0016] Preferably, in S4, the specific steps for motion quality assessment are as follows: S41. Introduce biomechanical constraint functions for each motion cycle. The "qualification" determination is performed using the following formula: ; In the formula, For the first The pass / fail judgment results for each action cycle The movement cycle index represents a single, complete fitness movement. For the first Key joint angle values ​​for each movement cycle The minimum standard threshold for joint angles of the action category. The maximum standard threshold for joint angles of the action category. For the first Deviation in the movement trajectory of key joints in each movement cycle The threshold for motion trajectory deviation for each action category. For the first The motion rhythm value of each motion cycle The standard rhythm range corresponding to the action category, Action category; S42. Confidence Optimization: The recognition confidence is adjusted using a stability-weighted adjustment formula, which is: ; In the formula, Action category The adjusted identification confidence level, with a value ranging from 0 to 1, The original identification confidence level. and This is the confidence adjustment coefficient for the corresponding action category, and , For the first The joint stability weight for each action cycle, with a value ranging from 0 to 1; S43. Output a structured fitness movement analysis result set that includes movement category, number of repetitions, adjusted movement confidence, quality level, and specific error type labels.

[0017] Preferably, in S5, the specific steps for interactive feedback and result output are as follows: S51, Visual Rendering: Real-time overlay rendering of skeletal joints and connecting lines on the original video stream; S52. Error Highlighting: By using visual enhancement to highlight the relevant error points of non-compliant actions, the expression is as follows: ; in, Highlight errors. It is the original frame. It is a highlight mask for incorrect joints. It is the transparency coefficient; S53. Feedback Generation: Generate and broadcast voice prompts or display text suggestions, call the knowledge retrieval function to retrieve and output personalized training suggestions from the preset rule base. The knowledge retrieval function is: ; In the formula, For personalized fitness training recommendations, This is a knowledge retrieval function. The user's training status.

[0018] Therefore, this invention proposes a machine vision-based method for fitness movement recognition, counting, and quality assessment, with the following beneficial effects: (1) Improve the stability and counting accuracy of fitness movement recognition. By modeling the human posture temporal skeleton features, the influence of instantaneous noise, occlusion and posture jitter on single frame images can be avoided. The counting is achieved by combining the action stage division and state transition judgment, which effectively solves the problems of miscounting, omission and unstable recognition in complex scenes.

[0019] (2) To achieve objective quantitative evaluation and practical feedback on the quality of fitness movements, analyze the standardization of movements from multiple dimensions such as joint angle and movement trajectory, and output the results in the form of visual highlighting, voice prompts and personalized suggestions to help users correct their movements in real time. They can obtain scientific training guidance without wearing equipment and improve fitness results.

[0020] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0021] Figure 1 This is a schematic diagram of the overall process of a machine vision-based fitness movement recognition, counting, and quality assessment method according to the present invention. Figure 2 This is a schematic diagram of human pose estimation and key point temporal consistency optimization in a machine vision-based fitness movement recognition, counting and quality assessment method of the present invention. Figure 3 This is a schematic diagram of a multi-level temporal feature fusion and bi-branch attention structure for a machine vision-based fitness movement recognition, counting, and quality assessment method according to the present invention. Figure 4 This is a schematic diagram of the action stage division and action counting of a machine vision-based fitness action recognition, counting and quality assessment method according to the present invention. Detailed Implementation

[0022] To make the technical solutions, advantages, and objectives of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below. The described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without creative effort are within the protection scope of this application.

[0023] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.

[0024] like Figures 1-4 As shown, the present invention provides a machine vision-based method for fitness movement recognition, counting, and quality assessment, comprising: S1. Video data acquisition and image preprocessing: Extract video frames from the input video stream and perform standardization processing to achieve background suppression and human body region enhancement, and output a standardized image sequence with human body movements as the main body. The specific steps for video data acquisition and image preprocessing are as follows: S11, Video frame extraction: Extract video frames from the input video stream at a preset frequency or an adaptive frequency based on motion detection. S12, Resolution Normalization: Scaling all extracted video frames to a fixed resolution; S13. Illumination Correction: The image is compensated for illumination using a histogram equalization algorithm. S14. Background suppression and human body region enhancement: Use a lightweight semantic segmentation network to extract the human body foreground mask and perform contrast enhancement or edge enhancement operations on the foreground human body region; or use the inter-frame difference method to quickly obtain the motion region in a fixed camera position scene.

[0025] In S14, a morphological noise removal strategy can be introduced before background suppression and human region enhancement. The specific steps are as follows: S141. Erosion Operation: Set a structuring element B, where B is a 3×3 or 5×5 rectangular kernel. Perform an erosion operation on the binarized or edge image to erode isolated bright spots in the image with a scale smaller than the structuring element B. The expression is: ; S142. Dilation Operation: Performs dilation processing on the eroded image to restore the geometric scale of the true target. The expression is: ; In the formula, A is the image to be processed, and B is the structuring element. Here are the image pixel coordinates, and ⊖ represents the erosion operator. This is the expansion operator. For structuring element B, use image pixel coordinates The set after translation around the center.

[0026] S2. Human pose estimation and key point detection: Human key joints are detected in standardized image sequences. The joint position sequence is processed by temporal consistency filtering to output a stable skeleton sequence and preliminary candidate action stage data. The specific steps of human pose estimation and key point detection are as follows: S21, Coarse Skeleton Detection: Using the pre-trained deep learning pose estimation model HRNet, each frame of the image output by S1 is processed to obtain the two-dimensional spatial coordinates of key human joints; key human joints include nose, neck, shoulder, elbow, wrist, hip, knee, and ankle. S22. Temporal Consistency Filtering: A Kalman filter is used to smooth the position sequence of a single key point in a continuous time frame T, eliminating outliers that deviate significantly from the temporal pattern in terms of velocity and acceleration. S23, Output dimension is the total number of frames N The skeletal sequence, and candidate action stage data preliminarily divided based on joint motion trends.

[0027] S3, Temporal Feature Optimization and Action Recognition: The skeleton sequence is reconstructed into a feature tensor, and the spatiotemporal features are optimized and fused through a dual-branch attention collaboration mechanism. The input to the classifier outputs the action category recognition result and temporal feature compensation parameters. The core of temporal feature optimization and action recognition is the multi-level temporal feature fusion module, and the specific steps are as follows: S31. Input Feature Reconstruction: Convert the skeleton sequence output from S2 into a feature tensor. Where C is the number of feature channels, T is the number of time frames, and J is the number of key points, and the value of J is consistent with the value of the structuring element B; S32. The feature tensor is processed through a dual-branch attention collaboration mechanism to obtain the key point channel attention weight matrix and the temporal attention map; S33. Feature Weighting and Fusion: The keypoint channel attention weight matrix and the temporal attention map are applied to the input feature tensor X. Features at different time scales are fused using a layer-by-layer alignment strategy. The fusion expression is as follows: ; In the formula, For the refined feature tensor after fusion, This is the attention weight matrix for the key points and channels. This is a temporal attention map, where m represents the feature identifiers at different time scales, and M represents the total number of scales for multi-level temporal features. To perform multi-scale extraction by aligning features at different time scales after weighting. Let be the fusion weight at the m-th scale, and ; S34. Recognition and Output: Input the fused refined features into the classifier and output the action category recognition result and the time sequence feature compensation parameters.

[0028] In S32, the dual-branch attention collaboration mechanism includes a keypoint channel attention branch and a temporal space attention branch; the specific steps for processing the feature tensor through the dual-branch attention collaboration mechanism include: Joint channel attention branch: Feature vectors are extracted through local and global pooling, and the inter-channel dependencies are modeled through lightweight one-dimensional convolution and a sigmoid activation function to generate local and global joint channel attention weights. Finally, the local and global attention are fused using a local and global attention fusion formula to obtain the joint channel attention weight matrix. ; Temporal attention branch: Simultaneous average pooling and max pooling are performed in the temporal dimension to aggregate temporal attention maps representing action rhythm and key phases; or this branch can be replaced by a temporal convolutional network (TCN).

[0029] The formula for fusing local and global attention is: ; in, This is the attention weight matrix for the key points and channels. The weights are learnable or pre-defined, and satisfy the following conditions: , For global keypoint channel attention weights, For local keypoint channel attention weights; Global and local keypoint channel attention weights are generated using lightweight one-dimensional convolution and a sigmoid activation function, expressed as follows: ; ; in, For the Sigmoid function, Encode short-term action context, The global action semantics are encoded as follows: ; ; In the formula, LAP represents local average pooling, GAP represents global average pooling, and s represents the local time window length. For short-term time step index, .

[0030] S4. Motion Counting and Quality Assessment: Based on the division of motion stages, the dynamic threshold method is used to accumulate the number of complete motions; combined with biomechanical constraints, the qualification of motion cycles is judged, the identification confidence is optimized, and a structured analysis result set is output. The specific implementation of motion counting is as follows: based on the motion stage identified by S3, a dynamic threshold method is used to continuously monitor the vertical position of the joint or the knee angle. When the value exceeds the threshold dynamically calculated from recent historical data, it is determined that a state transition has occurred and a complete motion is accumulated.

[0031] The specific steps for motion quality assessment are as follows: S41. Introduce biomechanical constraint functions for each motion cycle. The "qualification" determination is performed using the following formula: ; In the formula, For the first The pass / fail judgment results for each action cycle The movement cycle index represents a single, complete fitness movement. For the first Key joint angle values ​​for each movement cycle The minimum standard threshold for joint angles of the action category. The maximum standard threshold for joint angles of the action category. For the first Deviation in the movement trajectory of key joints in each movement cycle The threshold for motion trajectory deviation for each action category. For the first The motion rhythm value of each motion cycle The standard rhythm range corresponding to the action category, Action category; S42. Confidence Optimization: The recognition confidence is adjusted using a stability-weighted adjustment formula, which is: ; In the formula, Action category The adjusted identification confidence level, with a value ranging from 0 to 1, The original identification confidence level. and This is the confidence adjustment coefficient for the corresponding action category, and , For the first The joint stability weight for each action cycle, with a value ranging from 0 to 1; S43. Output a structured fitness movement analysis result set that includes movement category, number of repetitions, adjusted movement confidence, quality level, and specific error type labels.

[0032] S5. Interactive Feedback and Result Output: Performs skeletal rendering and highlights erroneous joints on the original video stream, generating and outputting voice prompts, text suggestions, and personalized training suggestions.

[0033] In S5, the specific steps for interactive feedback and result output are as follows: S51, Visual Rendering: Real-time overlay rendering of skeletal joints and connecting lines on the original video stream; S52. Error Highlighting: By using visual enhancement to highlight the relevant error points of non-compliant actions, the expression is as follows: ; in, Highlight errors. It is the original frame. It is a highlight mask for incorrect joints. It is the transparency coefficient; S53. Feedback Generation: Generate and broadcast voice prompts or display text suggestions, call the knowledge retrieval function to retrieve and output personalized training suggestions from the preset rule base. The knowledge retrieval function is: ; In the formula, For personalized fitness training recommendations, This is a knowledge retrieval function. The user's training status.

[0034] This invention takes a user performing squat training in a home setting as an example to explain in detail the specific implementation process of the technical solution: The user launches a smartphone fitness app equipped with the method of this invention, fixes the phone 1.5 meters in front of them, and starts squat training after turning on the video capture function.

[0035] The system extracts video frames at a preset frequency of 30 frames per second, normalizes the resolution to 1080P, performs illumination correction using histogram equalization (because the indoor lighting is slightly dim), extracts the human foreground mask through the MobileNetV3-Seg network, and simultaneously performs erosion-dilation operations with a 3×3 rectangular kernel to remove background noise, outputting a standardized human image sequence.

[0036] Subsequently, the HRNet model was used to detect the two-dimensional coordinates of eight key joints of the user, including the nose, neck, shoulder, elbow, wrist, hip, knee, and ankle. A Kalman filter was then used to smooth the knee joint position sequence across 20 consecutive frames, removing outliers caused by slight shaking. The output dimension is the training time of 20 seconds, totaling 600 frames. The skeletal sequence and candidate action phase data of "preparation-squat-stand".

[0037] In the temporal feature optimization stage, the skeleton sequence is reconstructed into a feature tensor containing coordinate, velocity, and knee angle information. The process employs a dual-branch attention collaboration mechanism: the keypoint channel attention branch extracts local and global action semantics, which are then fused to generate an attention weight matrix. The temporal attention branch aggregates keyframe information such as the squatting peak and the end of the standing up phase through average pooling and max pooling to generate a temporal attention map. The weighted fusion of these two maps is then input into the classifier to accurately identify the action category as "squat" and outputs temporal feature compensation parameters.

[0038] In the motion counting phase, the system dynamically monitors the knee joint angle based on the "squat-stand" stage. When the knee angle changes from the initial position... Down to (Dynamic threshold, calculated from historical data of the previous 3 actions) then rises back to When the above is achieved, a complete movement is considered finished, and the count is accumulated. During quality assessment, the knee angle is determined using a biomechanical constraint function: ( , ), trajectory deviation less than 5cm, rhythm stability taken If it is detected that the user's knee angle only drops to a certain level during a squat, it is marked as qualified; Furthermore, when an inward turning trend exists, the confidence-optimized formula is used. Take 0.7, Adjust the confidence level to 0.3 and label the error type as "insufficient knee angle + knee valgus".

[0039] During the interactive feedback phase, the system overlays and renders skeletal joints and connecting lines onto the video stream, highlights the knee joint position using a highlighting formula, and simultaneously broadcasts voice prompts such as "The knee is valgus and the bending range is insufficient. Please adjust it so that the thigh is parallel to the ground." It also calls a knowledge retrieval function to output personalized suggestions such as "It is recommended to reduce the training speed, focus on keeping the knee and toes aligned, and use resistance bands to strengthen leg muscles," thus achieving real-time guidance and correction during training.

[0040] Therefore, this invention provides a machine vision-based method for fitness movement recognition, counting, and quality assessment. Through a complete technical architecture encompassing video preprocessing, pose estimation and key point stabilization, temporal feature optimization recognition, dynamic threshold counting, and biomechanical constraint quality assessment, this method achieves real-time accurate recognition, stable counting, and multi-dimensional quantitative assessment of fitness movements in complex backgrounds and various scenarios without relying on wearable devices. It simultaneously outputs visual highlights, voice prompts, and personalized training suggestions, effectively adapting to diverse scenarios such as home fitness, gym group classes, and rehabilitation training. This provides users with scientific and efficient training guidance and offers technical support for the large-scale management of gyms.

[0041] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for recognizing, counting, and evaluating the quality of fitness movements based on machine vision, characterized in that, Includes the following steps: S1. Video data acquisition and image preprocessing: Extract video frames from the input video stream and perform standardization processing to achieve background suppression and human body region enhancement, and output a standardized image sequence with human body movements as the main body. S2. Human pose estimation and key point detection: Human key joints are detected in standardized image sequences. The joint position sequence is processed by temporal consistency filtering to output a stable skeleton sequence and preliminary candidate action stage data. S3, Temporal Feature Optimization and Action Recognition: The skeleton sequence is reconstructed into a feature tensor, and the spatiotemporal features are optimized and fused through a dual-branch attention collaboration mechanism. The input to the classifier outputs the action category recognition result and temporal feature compensation parameters. S4. Motion Counting and Quality Assessment: Based on the division of motion stages, the dynamic threshold method is used to accumulate the number of complete motions; combined with biomechanical constraints, the qualification of motion cycles is judged, the identification confidence is optimized, and a structured analysis result set is output. S5. Interactive Feedback and Result Output: Performs skeletal rendering and highlights erroneous joints on the original video stream, generating and outputting voice prompts, text suggestions, and personalized training suggestions.

2. The machine vision-based fitness movement recognition, counting, and quality assessment method according to claim 1, characterized in that, In S1, the specific steps for video data acquisition and image preprocessing are as follows: S11, Video frame extraction: Extract video frames from the input video stream at a preset frequency or an adaptive frequency based on motion detection. S12, Resolution Normalization: Scaling all extracted video frames to a fixed resolution; S13. Illumination Correction: The image is compensated for illumination using a histogram equalization algorithm. S14. Background suppression and human body region enhancement: Use a lightweight semantic segmentation network to extract the human body foreground mask and perform contrast enhancement or edge enhancement operations on the foreground human body region; or use the inter-frame difference method to quickly obtain the motion region in a fixed camera position scene.

3. The machine vision-based fitness movement recognition, counting, and quality assessment method according to claim 2, characterized in that, In S14, a morphological noise removal strategy can be introduced before background suppression and human region enhancement. The specific steps are as follows: S141. Erosion Operation: Set a structuring element B, where B is a 3×3 or 5×5 rectangular kernel. Perform an erosion operation on the binarized or edge image to erode isolated bright spots in the image with a scale smaller than the structuring element B. The expression is: ; S142. Dilation Operation: Performs dilation processing on the eroded image to restore the geometric scale of the true target. The expression is: ; In the formula, A is the image to be processed, and B is the structuring element. Here are the image pixel coordinates, and ⊖ represents the erosion operator. This is the expansion operator. For structuring element B, use image pixel coordinates The set after translation around the center.

4. The machine vision-based fitness movement recognition, counting, and quality assessment method according to claim 1, characterized in that, In S2, the specific steps for human pose estimation and keypoint detection are as follows: S21. Skeleton coarse detection: Using the pre-trained deep learning pose estimation model HRNet, each frame of the image output by S1 is processed to obtain the two-dimensional spatial coordinates of key human joints; the key human joints include the nose, neck, shoulder, elbow, wrist, hip, knee, and ankle. S22. Temporal Consistency Filtering: A Kalman filter is used to smooth the position sequence of a single key point in a continuous time frame T, eliminating outliers that deviate significantly from the temporal pattern in terms of velocity and acceleration. S23, Output dimension is the total number of frames N The skeletal sequence, and candidate action stage data preliminarily divided based on joint motion trends.

5. The machine vision-based fitness movement recognition, counting, and quality assessment method according to claim 4, characterized in that, In S3, the core of temporal feature optimization and action recognition is the multi-level temporal feature fusion module, and the specific steps are as follows: S31. Input Feature Reconstruction: Convert the skeleton sequence output from S2 into a feature tensor. Where C is the number of feature channels, T is the number of time frames, and J is the number of key points, and the value of J is consistent with the value of the structuring element B; S32. The feature tensor is processed through a dual-branch attention collaboration mechanism to obtain the key point channel attention weight matrix and the temporal attention map; S33. Feature Weighting and Fusion: The keypoint channel attention weight matrix and the temporal attention map are applied to the input feature tensor X. Features at different time scales are fused using a layer-by-layer alignment strategy. The fusion expression is as follows: ; In the formula, For the refined feature tensor after fusion, This is the attention weight matrix for the key points and channels. This is a temporal attention map, where m represents the feature identifiers at different time scales, and M represents the total number of scales for multi-level temporal features. To perform multi-scale extraction by aligning features at different time scales after weighting. Let be the fusion weight at the m-th scale, and ; S34. Recognition and Output: Input the fused refined features into the classifier and output the action category recognition result and the time sequence feature compensation parameters.

6. The machine vision-based fitness movement recognition, counting, and quality assessment method according to claim 5, characterized in that, In S32, the dual-branch attention coordination mechanism includes a key-point channel attention branch and a temporal-dimensional attention branch; The specific steps for processing the feature tensor using the dual-branch attention collaboration mechanism include: Joint channel attention branch: Feature vectors are extracted through local and global pooling, and the inter-channel dependencies are modeled through lightweight one-dimensional convolution and a sigmoid activation function to generate local and global joint channel attention weights. Finally, the local and global attention are fused using a local and global attention fusion formula to obtain the joint channel attention weight matrix. ; Temporal attention branch: Simultaneous average pooling and max pooling are performed in the temporal dimension to aggregate temporal attention maps representing action rhythm and key phases; or this branch can be replaced by a temporal convolutional network (TCN).

7. The machine vision-based fitness movement recognition, counting, and quality assessment method according to claim 6, characterized in that, The formula for fusing local and global attention is as follows: ; in, This is the attention weight matrix for the key points and channels. The weights are learnable or pre-defined, and satisfy the following conditions: , For global keypoint channel attention weights, For local keypoint channel attention weights; Global and local keypoint channel attention weights are generated using lightweight one-dimensional convolution and a sigmoid activation function, expressed as follows: ; ; in, For the Sigmoid function, Encode short-term action context, The global action semantics are encoded as follows: ; ; In the formula, LAP represents local average pooling, GAP represents global average pooling, and s represents the local time window length. For short-term time step index, .

8. The machine vision-based fitness movement recognition, counting, and quality assessment method according to claim 1, characterized in that, In S4, the specific implementation of action counting is as follows: based on the action stage identified in S3, a dynamic threshold method is used to continuously monitor the vertical position of the joint or the knee angle. When the value exceeds the threshold dynamically calculated from recent historical data, it is determined that a state transition has occurred and a complete action is accumulated.

9. The machine vision-based fitness movement recognition, counting, and quality assessment method according to claim 1, characterized in that, In S4, the specific steps for motion quality assessment are as follows: S41. Introduce biomechanical constraint functions for each motion cycle. The "qualification" determination is performed using the following formula: ; In the formula, For the first The pass / fail judgment results for each action cycle The movement cycle index represents a single, complete fitness movement. For the first Key joint angle values ​​for each movement cycle The minimum standard threshold for joint angles of the action category. The maximum standard threshold for joint angles of the action category. For the first Deviation in the movement trajectory of key joints in each movement cycle The threshold for motion trajectory deviation for each action category. For the first The motion rhythm value of each motion cycle The standard rhythm range corresponding to the action category, Action category; S42. Confidence Optimization: The recognition confidence is adjusted using a stability-weighted adjustment formula, which is: ; In the formula, Action category The adjusted identification confidence level, with a value ranging from 0 to 1, The original identification confidence level. and This is the confidence adjustment coefficient for the corresponding action category, and , For the first The joint stability weight for each action cycle, with a value ranging from 0 to 1; S43. Output a structured fitness movement analysis result set that includes movement category, number of repetitions, adjusted movement confidence, quality level, and specific error type labels.

10. The machine vision-based fitness movement recognition, counting, and quality assessment method according to claim 1, characterized in that, In S5, the specific steps for interactive feedback and result output are as follows: S51, Visual Rendering: Real-time overlay rendering of skeletal joints and connecting lines on the original video stream; S52. Error Highlighting: By using visual enhancement to highlight the relevant error points of non-compliant actions, the expression is as follows: ; in, Highlight errors. It is the original frame. It is a highlight mask for incorrect joints. It is the transparency coefficient; S53. Feedback Generation: Generate and broadcast voice prompts or display text suggestions, call the knowledge retrieval function to retrieve and output personalized training suggestions from the preset rule base. The knowledge retrieval function is: ; In the formula, For personalized fitness training recommendations, This is a knowledge retrieval function. The user's training status.

Citation Information

Cited By

  • Sports motion recognition and judgment method and system based on computer vision

    CN122090517A

  • Human body motion data recovery method and device based on tensor representation

    CN122115506A