A quadriceps key point detection and rehabilitation training evaluation method
By optimizing network parameters through dual-path feature extraction and fusion mechanisms and cross-frame feature transmission, the problem of inter-frame drift in unsupervised models during rehabilitation training was solved, achieving high-precision quadriceps key point detection and rehabilitation training evaluation, thus improving the accuracy and efficiency of rehabilitation effect evaluation.
Patent Information
- Application Number
- CN202611530767.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-30
- Publication Date
- 2026-11-03
AI Technical Summary
Existing unsupervised keypoint detection models suffer from frame drift and insufficient positioning accuracy in rehabilitation training, making it difficult to meet the needs of intelligent rehabilitation assessment systems. Furthermore, single feature extraction and aggregation methods are insufficient to capture the complex geometric features and motion correlations of quadriceps rehabilitation movements.
A dual-path feature extraction and fusion mechanism is adopted. Enhanced feature maps are generated by constructing dual-path sampling and gating fusion. Network parameters are optimized by combining cross-frame feature transmission and reconstruction error. The target image is reconstructed using the hybrid feature map and rehabilitation assessment is carried out by combining multi-dimensional kinematic parameters.
It achieves closed-loop optimization of the detection network under unsupervised conditions, improves the accuracy and stability of key point detection in rehabilitation training, provides objective evaluation of rehabilitation effects, and significantly improves the accuracy and efficiency of rehabilitation training monitoring.
Smart Images

Figure CN123033172A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method for detecting key points of the quadriceps femoris and assessing rehabilitation training. Background Technology
[0002] As the core muscle group of the lower limbs, the functional recovery of the quadriceps is a key goal of rehabilitation training after injuries such as knee joint injury and lower limb fracture. Accurate assessment of rehabilitation effects depends on the dynamic positioning and trajectory analysis of key points.
[0003] Currently, existing unsupervised key point detection models have serious shortcomings in rehabilitation training scenarios: due to the dynamic and continuous nature of rehabilitation movements, existing models lack targeted optimization, which makes key points prone to inter-frame drift during multi-frame detection, resulting in insufficient positioning accuracy.
[0004] Furthermore, single feature extraction and aggregation methods are insufficient to effectively capture the complex geometric features and kinematic relationships of quadriceps rehabilitation movements, thus affecting the accuracy of rehabilitation outcome assessment. This makes it difficult for existing unsupervised detection technologies to simultaneously meet the requirements of low cost, high accuracy, and stability in key point detection during rehabilitation training, severely restricting the practical application of intelligent rehabilitation assessment systems.
[0005] Therefore, existing technologies urgently need to be improved to address the aforementioned problems. Summary of the Invention
[0006] In view of the shortcomings of the prior art, this application provides a method for quadriceps muscle key point detection and rehabilitation training assessment, which aims to solve the technical problem that the lack of targeted optimization in the existing unsupervised key point detection model during rehabilitation training leads to inter-frame drift and insufficient positioning accuracy, thereby affecting the accuracy of rehabilitation assessment.
[0007] In a first aspect, a method for detecting key points of the quadriceps femoris muscle, the method comprising the following steps: S1: Obtain the source frame image and the target frame image, perform feature extraction and key point prediction respectively, and obtain their corresponding high-dimensional visual feature maps and key point heatmaps; S2: Construct dual paths based on their respective key point heatmaps, perform dual-path sampling and gating fusion on their respective high-dimensional visual feature maps, and generate their respective enhanced feature maps; S3: Using two key point heatmaps as masks, background region features are extracted from the source frame enhancement feature map, and key point region features are extracted from the target frame enhancement feature map. The two are then fused to generate a hybrid feature map. S4: Reconstruct the target image based on the hybrid feature map; S5: Calculate the difference between the reconstructed target image and the target frame image and update the network parameters used in the key point prediction process. Use the updated network parameters to perform key point detection on the source frame image and the target frame image, and output the key point coordinates of each image frame.
[0008] Furthermore, step S1 includes: S11: Channel augmentation is performed on the source frame image and the target frame image respectively through shallow convolutional layers in the feature extraction network, increasing the number of channels to a first preset dimension while maintaining their respective spatial dimensions, and generating a preliminary feature map. S12: By using the deep convolutional layers in the feature extraction network, the number of channels is increased to a second preset dimension while compressing the spatial dimension, and the preliminary feature map is fused by multi-channel convolution to form the high-dimensional visual feature map; the second preset dimension is greater than the first preset dimension. S13: Based on the high-dimensional visual feature map, predict the coordinates of key points through a differentiable key point prediction network, and convert the key point coordinates into a key point heatmap according to a preset Gaussian kernel.
[0009] Furthermore, step S2 includes: S21: Extract the center coordinates of key points and the local confidence energy from the key point heatmap; S22: Construct an anchoring path based on the center coordinates of the key points, and perform local constraint sampling on the respective high-dimensional visual feature maps on the anchoring path to obtain the anchoring path sampling features; S23: Construct a free path based on a preset reference point, and perform global sparse sampling on the respective high-dimensional visual feature maps on the free path to obtain free path sampling features; S24: Using the local confidence energy-driven gating factor, the anchored path sampling features and the free path sampling features are dynamically weighted and fused to generate aggregated features; S25: The aggregated features are mapped through a fully connected layer and then residually superimposed with their respective high-dimensional visual feature maps to generate their respective enhanced feature maps; the fully connected layer is used to transform the dimension of the aggregated features to match the dimension of the high-dimensional visual feature map.
[0010] Furthermore, step S3 includes: S31: Take the complement of the key point heatmap of the source frame image and the key point heatmap of the target frame image respectively, multiply them to generate a combined suppression mask, and multiply the combined suppression mask with the enhancement feature map of the source frame image to extract the background region features of the source frame image. S32: Use the key point heatmap of the target frame image as an extraction mask, multiply it with the enhanced feature map of the target frame image, and extract the key point region features of the target frame image; S33: Add the background region features and the key point region features element by element to generate a hybrid feature map.
[0011] Furthermore, step S4 includes: S41: The hybrid feature map is sequentially input into the Gaussian error convolution unit and the progressive Gaussian error pooling module for feature refinement to obtain the refined high-dimensional visual feature map. S42: The refined high-dimensional visual feature map is sequentially subjected to channel dimensionality reduction, resolution restoration, and pixel value mapping to reconstruct the target image.
[0012] Furthermore, step S5 includes: S51: Calculate the reconstruction loss pixel by pixel between the reconstructed target image and the target frame image; S52: Using the reconstruction loss as a supervision signal, update the network parameters used in the feature extraction and key point prediction process through backpropagation; S53: Using the updated network parameters, key point detection is performed on the source frame image and the target frame image respectively, and the key point coordinates of each image frame are output.
[0013] Secondly, a rehabilitation training assessment method, the method comprising the steps of: S6: Obtain the reference angle and reference force of the patient's movements in a static state; S7: The rehabilitation patient performs motion segmentation based on the angular change trend of the key point coordinates during the exercise process to determine the integrity of a single motion; the key point coordinates are detected by any of the methods described above. S8: Calculate the angle increment, angular velocity root mean square error, and average relative load force of the single motion action based on the action reference angle and the reference force, and compare them with a preset quantization threshold to determine whether the single motion action is an effective motion.
[0014] Furthermore, the method also includes: S9: Statistical analysis of the single-movement effect value of all effective exercises in a single rehabilitation training session; S10: Calculate the arithmetic mean of all the single-action effect values to obtain the final quantitative value of this rehabilitation training, and output the final quantitative value and the total number of effective movements.
[0015] Furthermore, in step S8, calculating the angle increment, angular velocity root mean square error, and average relative load force of the single motion action based on the action reference angle and the reference force includes the following steps: S81: Construct a limb vector based on the coordinates of the key points, calculate the real-time angle using the vector angle formula, and use the difference between the maximum angle during a single movement and the action reference angle as the angle increment; S82: Divide the difference in the real-time angle between adjacent frames by the time interval between adjacent frames to obtain the instantaneous angular velocity at each moment, and calculate the root mean square error of all instantaneous angular velocities in a single motion process to obtain the root mean square error of the angular velocity. S83: Acquire real-time load force data collected by the leg sensor, and perform an arithmetic average of the difference between the real-time load force and the reference force in each frame during a single movement to obtain the average relative load force.
[0016] Furthermore, comparing the result with a preset quantization threshold to determine whether the single movement is a valid movement includes the following steps: S84: Real-time monitoring of fatigue index during rehabilitation training, wherein the fatigue index is determined based on the decay trend of the root mean square error of angular velocity as training time increases; S85: Dynamically adjust and compensate the quantitative threshold according to the fatigue index so that the quantitative threshold matches the real-time physiological state of the recovering patient. S86: Compare the extracted angle increment, the root mean square error of the angular velocity, and the average relative load force with the compensated quantization threshold, and output the determination result of whether the single motion action is a valid motion.
[0017] Beneficial Effects: This application proposes a method for quadriceps muscle keypoint detection and rehabilitation training assessment. By introducing a keypoint-aware dual-path dynamic attention modulation mechanism, it achieves dynamic fusion of local constrained sampling and global sparse sampling. This improves feature representation accuracy while solving the problem of keypoint inter-frame drift in dynamic rehabilitation scenarios in existing unsupervised models. This invention utilizes reconstruction error as an unsupervised signal, and through cross-frame feature transmission and target frame reconstruction, it achieves closed-loop automatic optimization of the detection network without manual annotation. Furthermore, by combining multi-dimensional kinematic parameters with a rehabilitation assessment method based on dynamic physiological fatigue compensation, it achieves quantitative assessment from single-action to overall rehabilitation effect, significantly improving the accuracy and efficiency of rehabilitation training monitoring and providing objective and reliable data support for clinical rehabilitation treatment. Attached Figure Description
[0018] Figure 1 This is a flowchart of a method for detecting key points of the quadriceps femoris muscle proposed in this application.
[0019] Figure 2 This is a flowchart of a rehabilitation training assessment method proposed in this application. Detailed Implementation
[0020] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and marked in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0021] In the field of medical rehabilitation engineering, the quadriceps, as a core muscle group of the lower limbs, plays a crucial role in rehabilitation training after injuries such as knee joint injuries and lower limb fractures. Accurate assessment of rehabilitation effectiveness heavily relies on the dynamic positioning and trajectory analysis of key points related to quadriceps movement (such as the hip, knee, and ankle). In actual rehabilitation training scenarios, it is necessary to capture the joint movement status in real time and accurately. However, traditional assessment methods mainly rely on manual visual observation, which is inefficient and difficult to quantify.
[0022] Existing deep learning-based keypoint detection methods are mostly supervised models, requiring significant investment in data annotation. Furthermore, their generalization ability is limited when facing rehabilitation scenarios with large individual differences and diverse postures. While unsupervised keypoint detection models eliminate the need for manual annotation, the highly dynamic and continuous nature of rehabilitation movements means that existing unsupervised models often lack specific optimization for motion scenes when processing such video streams. This can lead to inter-frame drift, where keypoints are inconsistently located across different image frames, resulting in insufficient localization accuracy and failing to meet the practical application requirements of intelligent rehabilitation assessment systems.
[0023] For this, please refer to Figure 1 This application proposes a method for detecting key points of the quadriceps femoris muscle, the method comprising the following steps: S1: Obtain the source frame image and the target frame image, perform feature extraction and key point prediction respectively, and obtain their corresponding high-dimensional visual feature maps and key point heatmaps; S2: Construct dual paths based on their respective key point heatmaps, perform dual-path sampling and gating fusion on their respective high-dimensional visual feature maps, and generate their respective enhanced feature maps; S3: Using two key point heatmaps as masks, background region features are extracted from the source frame enhancement feature map, and key point region features are extracted from the target frame enhancement feature map. The two are then fused to generate a hybrid feature map. S4: Reconstruct the target image based on the hybrid feature map; S5: Calculate the difference between the reconstructed target image and the target frame image and update the network parameters used in the keypoint prediction process. Use the updated network parameters to perform keypoint detection on the source frame image and the target frame image, and output the keypoint coordinates of each image frame.
[0024] In this system, the source frame image and the target frame image are two images extracted at certain time intervals from a continuous rehabilitation training video stream. The source frame image typically serves as a reference, while the target frame image represents the motion state after a period of time. The two are combined to capture the dynamic changes of the limbs. More specifically, the source frame image and the target frame image can come from a continuously acquired video sequence from the same camera device, or from a time-synchronized image sequence from different perspectives at the same moment. However, in this embodiment, it is preferred to use a continuously acquired video stream from the same camera device to avoid interference from imaging differences between different devices on key point learning.
[0025] The time interval is not limited to a fixed number of frames and can be adaptively selected based on the motion speed. When the motion is slow, two frames with a smaller interval can be selected to highlight subtle displacements; when the motion is fast, two frames with a larger interval can be selected to enhance motion differences. The purpose of this setting is to ensure that the source frame image and the target frame image retain sufficient background consistency while containing joint displacement information that can be used for learning.
[0026] A keypoint heatmap is a two-dimensional image matrix that represents the location of key points using a probability distribution. In a heatmap, areas with higher pixel values are more likely to contain key points (such as the knee joint), creating a visual effect similar to thermal radiation.
[0027] Furthermore, each keypoint to be detected typically corresponds to an independent keypoint heatmap; for example, the hip corresponds to one heatmap, the knee to another, and the ankle to yet another. If multiple keypoints need to be detected simultaneously, these heatmaps can be combined along the channel dimension to form a keypoint heatmap set. Compared to directly outputting coordinates, heatmaps are more suitable for spatial alignment with convolutional feature maps because high-response regions in the heatmap naturally correspond to local locations in the image, facilitating subsequent local sampling, region masking, and cross-frame feature transfer.
[0028] In image processing, a mask is similar to a masking layer, typically composed of 0s and 1s. Multiplying it by a feature map preserves information from specific regions (corresponding to values of 1) while filtering or occluding information from other regions (corresponding to values of 0). In this embodiment, the mask is not limited to a strictly binary form; it can also be a continuous weight map between low and high values. When using a continuous weight map, positions closer to the center of the keypoint have higher weights, while positions farther from the center have lower weights. This avoids abrupt boundary changes caused by hard segmentation, resulting in a smoother separation between the background and keypoint regions. For example, when a knee heatmap shows a distribution with a high center and low edges in a local area, the high-response region can be considered as a keypoint region mask, and its complementary region as a background region mask, thereby extracting features related to joint movement and features related to static parts of the scene, respectively.
[0029] In one specific implementation, to obtain the source frame image and the target frame image, a mobile APP can be used to receive a set of rehabilitation training video streams, decompose them frame by frame into 256×256×3 (RGB) image frames, and upload them to the server. The video stream sequence number is assigned as follows: The image frame number is coded as Let Z be the input video stream set, containing m video segments, each segment containing n frames. Each element in the set... The video stream set Z, representing the j-th frame of the i-th video segment, can be represented as: .
[0030] From the i-th video stream, sample adjacent frame pairs sequentially at time intervals τ, and use the j-th frame as the source frame image. , will the Frame as target frame image The key point detection and target frame reconstruction process is performed sequentially on all frame pairs in the video stream, where τ is a preset frame interval parameter used to control the motion amplitude between the source frame image and the target frame image.
[0031] Then, the server processes the image frames. A high-dimensional visual feature map of 32×32×512 was extracted using a convolutional neural network, Feature CNN (i.e., a feature extraction network). This lays the foundation for subsequent keypoint detection and cross-frame feature transmission. The main step is to extract multi-scale visual features layer by layer through hierarchical convolution. Specifically, step S1 includes: S11: Channel augmentation is performed on the source frame image and the target frame image through shallow convolutional layers in the feature extraction network. While maintaining their respective spatial dimensions, the number of channels is increased to the first preset dimension number to generate a preliminary feature map. S12: By using deep convolutional layers in the feature extraction network, the number of channels is increased to the second preset dimension while compressing the spatial dimension. The initial feature map is then fused by multi-channel convolution to form a high-dimensional visual feature map; the second preset dimension is greater than the first preset dimension. S13: Based on high-dimensional visual feature maps, key point coordinates are predicted through a differentiable key point prediction network, and the key point coordinates are converted into key point heatmaps according to a preset Gaussian kernel.
[0032] The convolutional neural network consists of shallow convolutional layers and deep convolutional layers. Shallow convolutional layers extract low-level visual features from the image, forming a preliminary feature map. They also preserve the spatial dimensions of the original source and target frames, and increase the channel dimension from 3 channels of RGB pixels to 64. Here, 64 is the first preset dimension number.
[0033] Deep convolutional layers are responsible for extracting high-level geometric features. By progressively compressing the spatial dimension and increasing the number of channels, the network can understand the relative positional relationships between the hip, knee, and ankle within a larger receptive field. The deep convolutional layers compress the spatial dimension of the initial feature map and significantly increase the channel dimension to 512. Through multi-level convolution and downsampling, a high-dimensional visual feature map with lower spatial resolution but stronger semantic expression is obtained. Here, 512 is the second preset dimension number.
[0034] Next, the differentiable keypoint prediction network outputs a response map for each keypoint to be detected, such as a hip response map, knee response map, and ankle response map. The differentiable keypoint prediction network is the KeyNet network, whose main functions include keypoint coordinate prediction and Gaussian heatmap transformation. For the knee response map, the region with the most concentrated response is first determined, and then the knee coordinates are obtained through differentiable coordinate decoding. Then, a knee keypoint heatmap is generated centered on these coordinates. If multiple keypoints need to be processed simultaneously, the above process is repeated for each keypoint, and the resulting multiple keypoint heatmaps are combined into a keypoint heatmap set for use in step S2.
[0035] To obtain a preset Gaussian kernel, the typical coverage area of joints such as the knee and ankle at the heatmap scale can be observed from several rehabilitation training videos before model training. A kernel width that covers the central area of the joint without excessively spreading to adjacent areas can then be selected as the initial setting. During training, the kernel width can be fine-tuned based on reconstruction stability. If the keypoint heatmap is found to be too sharp, causing training oscillations, the diffusion range can be appropriately increased; if the keypoint heatmap is found to be too diffuse, causing localization to be unfocused, the diffusion range can be appropriately decreased. After this preset process, a Gaussian kernel setting suitable for the current rehabilitation scenario can be obtained.
[0036] In one specific implementation, key point coordinate prediction is achieved by analyzing high-dimensional visual feature maps. Keypoint coordinates are obtained by performing dimensional marginalization, where R represents the real number domain. Dimensional marginalization involves processing the feature map in a spatial dimension. By aggregating and filtering features in this spatial dimension, the final output is the keypoint coordinates. : .
[0037] Where u and v represent high-dimensional visual feature maps, respectively. The row and column of the middle pixel, where u ranges from 1 to... The value of v ranges from 1 to... . and High-dimensional visual feature maps The total number of rows and columns. (u,v) serves as the coordinate weight, representing the precise spatial coordinates of the position at row u and column v on the feature map.
[0038] This represents the number of channels. The function is the normalized softmax function, which transforms high-dimensional visual feature maps. Transform into a probability graph Marginalization using probability graphs As weights, the coordinates are weighted and summed to obtain the final predicted keypoint coordinates. The weighted summation of coordinates refers to multiplying the coordinates of all positions (traversing u, v) on the high-dimensional visual feature map by their corresponding probabilities and then summing them up.
[0039] Gaussian heatmap transformation converts the predicted coordinates of two-dimensional key points. According to the preset Gaussian kernel transformation key point heatmap To achieve discrete two-dimensional keypoint coordinates With continuous high-dimensional visual feature maps Spatial alignment is performed. The preset Gaussian kernel includes the kernel size and standard deviation. The kernel size can be determined using keypoint coordinates. Centered on a finite window with dimensions of 5×5 or 7×7, the Gaussian kernel standard deviation defines the distribution of pixel response values within the window, which can be denoted as... The conversion formula for the key point heatmap is: .in The x-coordinate of the key point The vertical coordinate of the key point. Gaussian heatmap middle The value at that location.
[0040] Determine whether the key point detection results of the source frame image and the target frame image reach the preset accuracy. If the key points of each image frame are accurately detected, record and evaluate the rehabilitation training effect, and feed the evaluation results back to the mobile APP. The task ends here. If it is not accurate, proceed to step S2 to reconstruct the target.
[0041] Regarding the core technical approach of dual-path sampling and gated fusion in step S2, in some implementations, two sampling paths with different functions are constructed based on the spatial location and confidence level reflected in the keypoint heatmap. The first path is used to extract local fine features around the center of the keypoint, while the second path is used to search for contextual features related to the current keypoint over a larger area.
[0042] The reason for needing a dual-pathway approach is that the joint positions in rehabilitation movements possess both local stability and systemic coordination. For example, the knee is usually located near the junction of the thigh and calf, and local texture and contours are crucial for its positioning; however, in situations involving occlusion, blurring, or rapid movement, relying solely on local areas may be insufficient. In such cases, it is necessary to combine contextual information provided by the hip, ankle, and overall limb posture for auxiliary judgment.
[0043] More specifically, when processing the extracted high-dimensional visual feature map of the knee joint, the system first determines a central region based on the knee keypoint heatmap. This central region corresponds to a local neighborhood near the high-response position in the heatmap. Subsequently, anchored path sampling is performed within this local neighborhood to obtain local features directly related to the knee joint. Simultaneously, guided by the query features in the current feature map, free path sampling is performed in a larger spatial range to obtain global contextual features related to knee joint movement.
[0044] Finally, the system dynamically fuses the features extracted from the two paths based on the local confidence level reflected in the key point heatmap, rather than fusing them at a fixed ratio. This avoids introducing too much irrelevant background when the action is gentle, and also avoids over-reliance on local regions and missing global correlation information when the action is intense.
[0045] In the dual-path sampling (KDDAM mechanism), reference coordinates (pre-defined reference points) need to be pre-defined in the high-dimensional visual feature maps corresponding to the source and target frame images to guide the sampling of the free path. A 3×256 query feature is then set for each reference point. .
[0046] Specifically, setting reference points refers to three initial points pre-defined on the high-dimensional visual feature map, corresponding to the approximate positions of the hip, knee, and ankle, respectively. Since the feature map size is 32×32 pixels (32 pixels high and 32 pixels wide), the system randomly selects an initial coordinate for each keypoint within this 32×32 area during initialization. For example, (15, 10) is randomly selected for the hip, (16, 20) for the knee, and (17, 28) for the ankle. These coordinates are not accurate initially but will be gradually adjusted to the correct positions during subsequent training.
[0047] The system generates a 3-row, 256-column table of numbers, where the first row is assigned to the hip reference point, the second row to the knee reference point, and the third row to the ankle reference point. Each number (query feature) in the table is initially randomly generated, but these query feature numbers are not fixed; they are continuously adjusted as the model trains, eventually becoming a feature vector that can effectively guide sampling.
[0048] query features High-dimensional visual feature map Key point heat map and reference points Perform feature aggregation. (The rest of the text is missing.) It is a reference point. It is the x-coordinate of the reference point. It is the ordinate of the reference point.
[0049] The features are sampled and gated using a keypoint-aware dual-path dynamic attention modulation (KDDAM) mechanism, and then aggregated to obtain 3×256 aggregated features. The aggregated features are mapped to the input feature map after passing through a fully connected layer. Residual superposition yields a 32×32×512 enhanced feature map. .
[0050] Specifically, step S2 includes: S21: Extract the center coordinates of key points and local confidence energy from the key point heatmap; S22: Construct anchoring paths based on the center coordinates of key points, and perform local constraint sampling on the high-dimensional visual feature maps of each anchoring path to obtain the anchoring path sampling features; S23: Construct a free path based on a preset reference point, and perform global sparse sampling on the high-dimensional visual feature maps of each free path to obtain free path sampling features; S24: Using local confidence energy to drive the gating factor, the anchored path sampling features and the free path sampling features are dynamically weighted and fused to generate aggregated features; S25: After mapping the aggregated features through a fully connected layer, residual superposition is performed with their respective high-dimensional visual feature maps to generate their respective enhanced feature maps; the fully connected layer is used to transform the dimension of the aggregated features to match the dimension of the high-dimensional visual feature map.
[0051] The aggregated features employ a keypoint-aware dual-path dynamic attention modulation (KDDAM) mechanism, which includes five steps: heatmap spatial prior extraction, dual-path sampling rule generation, dual-path sparse feature sampling, gating factor calculation, and gating fusion aggregation.
[0052] Prior extraction of heatmap space involves extracting the Gaussian heatmap of key points output by KeyNet. (In a dimension of 32×32×3), for each key point ( (Corresponding to the hip, knee, and ankle respectively) Two prior quantities are extracted: the center coordinates of the key points. and local confidence energy .
[0053] Key point center coordinates It is to set the coordinates of key points After rounding and mapping to the heatmap space, we obtain the first... The corresponding pixel positions of key points on the heatmap are used as spatial anchor points for anchoring the path: .in, For the first Predicted coordinates of key points To Round down.
[0054] Local confidence energy It is based on the center coordinates of the key points Center, radius circular neighborhood The mean of the internal heatmap response is used to quantify the confidence level of keypoint predictions. ,in, For Center, radius The circular neighborhood, This represents the total number of pixels within that neighborhood. For the heat map Channel in coordinates The response value at that location. The higher the value, the higher the confidence level of the key point prediction. The gating factor, acting as a driving signal, works in conjunction with the query features. The gating factor value is output through the Sigmoid function, dynamically adjusting the weight ratio of anchored paths and free paths in the aggregated features.
[0055] The dual-path sampling mechanism consists of two branches: a free path and an anchored path, each generating attention weights and sampling offsets independently. The dual-path sampling rule generation involves two steps: free path sampling rule generation and anchored path sampling rule generation.
[0056] The free path sampling rule generation involves predicting free attention weights and free sampling offsets for each query feature. Specifically, the free attention weight prediction involves... After inputting into the fully connected layer, normalization is performed to obtain... Each attention head corresponds to an attention head. Free path attention weights for each sampling point And satisfy This is used to measure the contribution of each sampling point on the free path.
[0057] Among them, free sampling offset prediction is to use query features Input another independent fully connected layer to generate A free two-dimensional offset At the reference point Based on this, the spatial position of the sampling points can be freely fine-tuned to obtain the coordinates of the free sampling points. : .in, Number the attention head. To query the feature number, This is the sampling point number.
[0058] Among them, the anchoring path sampling rule generation is based on the key point center coordinates extracted from the key point heatmap space prior. As spatial anchors, query features The positional encoding of the anchor point coordinates is concatenated with the positional encoding and then fed into the fully connected layer to obtain the anchoring path input vector. : .in, It is a two-dimensional sinusoidal position encoding. This represents vector concatenation. It will serve as the common input for both the anchor attention weight prediction and constraint offset prediction steps.
[0059] Anchored attention weight prediction is to input the anchored path into the vector. After normalizing the input to the fully connected layer, the anchor path attention weights are obtained. This is used to measure the contribution of each sampling point along the anchoring path, satisfying... .
[0060] Constraint offset prediction is to input the anchoring path vector Input another independent fully connected layer, and generate it after being clipped by a truncation function. Constraint 2D Offset The offset range is limited to Within this range, ensure that the sampling points always converge near the joint region to obtain the coordinates of the anchored sampling points. : .in, This is a configurable hyperparameter, set to 1 / 8 of the feature map space size. This parameter is adjustable.
[0061] Dual-path sparse feature sampling, applying it to both free paths and anchored paths in high-dimensional visual feature maps. Bilinear interpolation sampling is performed on both paths, which share the same high-dimensional visual feature map, and free path feature values are extracted separately. and anchoring path characteristic values : ; FVS stands for Eigenvalue Sampling, which represents a bilinear interpolation operation that extracts eigenvalues at coordinates from the feature map Mf(xi,j).
[0062] Among these, the gating factor calculation involves designing a learnable gating factor. Driven jointly by query features and keypoint confidence energy, dynamic modulation is achieved through Sigmoid activation: .
[0063] in, For learnable parameter matrix, As a learnable bias, the gating factor is tailored to each query feature. and attention Calculate separately. When High accuracy (reliable key point prediction). Approaching 1, the anchored path dominates; when At low temperatures (rapid motion causes thermal diffusion). Approaching 0, free path dominates, achieving feature aggregation that adapts to motion state.
[0064] Gated fusion aggregation is a multi-head aggregation that combines the dual-path sampling features of each attention head with weighted fusion through gating factors. It consists of two steps: single-head gated fusion aggregation and multi-head feature aggregation.
[0065] Single-head gating fusion aggregation, for each attention head The free path and the anchored path The sampled feature values are weighted and fused using a gating factor to obtain the aggregated feature of the head. : Where F is the total number of query features (F=3, corresponding to hip, knee, and ankle).
[0066] Feature aggregation is to combine Aggregated features of attention heads Inputting into a fully connected layer yields the final KDDAM output aggregated features. : .in, This is a linear transformation operation, representing a linear mapping and fusion of multi-head aggregated features, with an output dimension of 3×256. After expansion by a fully connected layer, the high-dimensional visual feature map of the input is compared with the input high-dimensional visual feature map. The residuals are superimposed to finally output an enhanced feature map of 32×32×512. .
[0067] In rehabilitation training scenarios, patients' limb movements are often accompanied by clothing deformation, changes in lighting and shadows, and local occlusion. Simply using hard thresholding or crude feature stitching can easily produce severe semantic breaks or artifacts at the boundary between the background and the moving subject. This unnatural stitching causes the network to attribute errors in reconstructing the target image to improper background fusion rather than inaccurate keypoint localization, thus severely interfering with gradient backpropagation in the keypoint prediction branch. To address this issue, a smoother, more complementary feature fusion mechanism that fully utilizes the spatial distribution characteristics of keypoint heatmaps is needed to ensure that the blended feature map seamlessly connects the static background and the moving joints.
[0068] Furthermore, step S3 includes: S31: Take the complement of the key point heatmap of the source frame image and the key point heatmap of the target frame image respectively, multiply them to generate a combined suppression mask, multiply the combined suppression mask with the enhancement feature map of the source frame image to extract the background region features of the source frame image. S32: Use the key point heatmap of the target frame image as an extraction mask, multiply it with the enhanced feature map of the target frame image, and extract the key point region features of the target frame image; S33: Add the background region features and key point region features element by element to generate a hybrid feature map.
[0069] To reconstruct the target frame, the source frame image Target frame image Enhanced feature map , and key point heatmap , Cross-frame feature transmission is performed, followed by entry into the target frame reconstruction module to obtain a 256×256×3 reconstructed target frame. .
[0070] The cross-frame feature transmission uses keypoints as spatial anchors to align and replace features across frames. The steps include eliminating source frame interference, replacing target frame features, and fusing and generating features. The final result is an aligned hybrid feature map. : .
[0071] in, It is a heatmap of key points in the source frame image. It is a heatmap of key points in the target frame image. It is the enhanced feature map of the source frame image. It is the enhanced feature map of the target frame image.
[0072] Eliminating source frame interference corresponds to the formula in In order to suppress the features of keypoint-related regions in the source frame image, the formula in... , Its function is to generate keypoint suppression masks for the source frame image and the target frame image, which, together with the enhanced feature map of the source frame image, form a keypoint suppression mask. After multiplication, the feature is suppressed, retaining only the background and non-key point region features.
[0073] In the formula for target frame feature replacement Its function is to extract features of key point regions in the target frame image and mark their corresponding positions in the source frame image.
[0074] The background features of the source frame image and the key point core features of the target frame image are added element-wise to form a hybrid feature map of size 32×32×512, which is based on the background features of the source frame and fused with the aligned key point features of the target frame. .
[0075] Specifically, in step S4, the target frame reconstruction module includes two steps: refining the high-dimensional visual feature map and reconstructing the target frame image.
[0076] Furthermore, step S4 includes: S41: Input the hybrid feature map into the Gaussian error convolution unit and the progressive Gaussian error pooling module in sequence for feature refinement to obtain the refined high-dimensional visual feature map. S42: Perform channel dimensionality reduction, resolution restoration, and pixel value mapping sequentially on the refined high-dimensional visual feature map to reconstruct the target image.
[0077] The refined high-dimensional visual feature map is a refinement of the mixed high-dimensional feature map, consisting of two core modules: Gaussian error convolution unit (GECU) and progressive Gaussian error pooling (PGEP).
[0078] The Gaussian error convolutional unit (GECU) serves two purposes: first, it performs feature fine-tuning while preserving the original information; second, it performs final nonlinear refinement to ensure that the output size and channels perfectly match the input size.
[0079] The first function of GECU is to nonlinearly enhance features and retain the original information in the residuals by inputting the high-dimensional feature map Xin of the initial input into two layers of GECU. The two GECUs are concatenated to improve the feature representation capability.
[0080] GECU consists of two 3×3 convolutional layers and two GELU activation functions. Each time the input is passed through a 3×3 convolutional layer, it is followed by a GELU activation function. The output after passing through two convolutional layers and GELU is then compared with the original input. The result is obtained by summing element by element. Then Input the second GECU, and then compare the result with the original input of the second GECU. The result is obtained by summing element by element. The specific formula is as follows: ; ; .in, These are operations performed by the Gaussian error convolution unit. GECU1 and GECU2 are the convolution activation operations of the first and second layer GECUs, respectively.
[0081] GELU is a smooth, adaptive activation function, specifically: ; .
[0082] in, for The cumulative distribution function of the standard normal distribution, z represents the feature value input to the GELU activation function.
[0083] The second function of GECU is to perform nonlinear refining, received by the module. Output After two convolutional layers and GELU, and combined with the original input The final feature map is obtained after element-wise summation. : In this context, GECUR is the GECU refinement operation, which represents performing two convolutional layers and GELU nonlinear processing on the PGEP output features.
[0084] Progressive Gaussian Error Pooling (PGEP) consists of two pooling convolutional layers and two activation functions GELU. Its purpose is to expand the receptive field, capture the surrounding context of the target, and improve the semantic expressive power of the features without reducing the resolution.
[0085] The pooling convolutional layer consists of a 5×5 pooling layer. and a 1×1 convolutional layer It consists of receiving the outputs from the two preceding GECUs. The input, as the original input to the pooling convolution, passes through a pooling convolution layer and then through the GELU activation function to obtain... Then, input it into another identical pooling convolutional layer, and finally pass it through the GELU activation function to obtain... Finally , , The three elements are added together element by element to obtain the feature map with expanded receptive field and enhanced features. : ; ; ; .in, This represents a pooling convolutional layer operation, specifically a combination of 5×5 pooling and 1×1 convolution.
[0086] The process of reconstructing the target frame consists of three steps: convolutional dimensionality reduction, resolution restoration, and linear pixel mapping.
[0087] Convolutional dimensionality reduction achieves the transformation from high-dimensional features to image channel dimensions. Since the refined feature map has a high number of channels (512), it needs to be reduced to the number of RGB pixel channels (3) of the image first. The high-dimensional feature map is then input into two 1×1 convolutional layers to transform the high-dimensional abstract features into low-dimensional concrete features. During the convolution process, the spatial resolution of the feature map is not changed; only the number of channels is compressed from 512 to 3 to avoid loss of spatial information.
[0088] Resolution restoration first uses bilinear interpolation to upsample the feature map after compression to the original image resolution, thus initially restoring the original image resolution. Then, a 3×3 small convolution kernel is used for fine-tuning to correct the blurring effect caused by upsampling and make the pixel transition more natural.
[0089] Linear pixel mapping maps each element of a 256×256×3 feature map to a normalized pixel map. Pixel values are used to obtain the reconstructed target frame. Its size and number of channels are the same as the original target frame image. Totally consistent.
[0090] Finally, the target frame will be reconstructed. High-dimensional visual feature map extraction and keypoint detection are performed again to reconstruct the accuracy of error-supervised keypoint detection. The keypoint detection and target frame reconstruction process in steps S1 to S5 is repeated until the keypoints of each image frame can be accurately detected in step S1, thus completing this detection task.
[0091] Furthermore, step S5 includes: S51: Calculate the reconstruction loss pixel by pixel between the reconstructed target image and the target frame image; S52: Using reconstruction loss as a supervision signal, the network parameters used in feature extraction and keypoint prediction are updated through backpropagation; S53: Use the updated network parameters to perform key point detection on the source frame image and the target frame image respectively, and output the key point coordinates of each image frame.
[0092] This specific implementation plan clarifies the source of the supervision signal and the parameter update process for unsupervised training. In step S51, the system aligns the reconstructed target image with the real target frame image captured by the camera device and calculates the difference between them pixel by pixel. This difference can be quantified by metrics such as mean squared error, mean absolute error, or structural similarity index, forming the reconstruction loss. In practice, only one metric can be used, or multiple metrics can be used together to evaluate, so as to simultaneously consider the overall brightness consistency and local structural consistency. To ensure that the loss calculation result truly reflects the joint position error, before calculation, it can be checked whether the reconstructed target image and the target frame image have the same resolution, the same color channel order, and the same cropping area; if there is a slight time shift in the video stream, the truly corresponding target frame image can also be selected by frame order correction or motion peak alignment.
[0093] In step S52, the reconstruction loss serves as the sole supervisory signal for the entire unsupervised framework. Through backpropagation, it propagates along the reconstruction network, feature fusion module, and dual-path sampling module back to the front-end feature extraction and keypoint prediction network. During this process, the network automatically adjusts the weights and biases of the convolutional kernels based on gradient information, ensuring that the predicted keypoint heatmap better serves image reconstruction. To avoid instability in early training due to excessive errors, the system can employ a phased training strategy. For example, it can first fix some reconstruction module parameters and train only the keypoint prediction-related branches. Once the heatmap has basic localization capabilities, it can then perform joint optimization of the entire network. Alternatively, conventional stabilization measures such as gradient clipping, learning rate decay, or batch normalization can be incorporated during parameter updates.
[0094] In step S53, after multiple iterations of training, the network parameters gradually converge. At this point, the system can strip away the reconstruction-related auxiliary modules, retaining only the updated feature extraction and keypoint prediction networks. It then performs forward inference on the input source and target frame images, directly outputting high-precision keypoint coordinates. These keypoint coordinates can be output in two-dimensional image coordinate form, or they can be further converted to a unified planar reference coordinate system using camera calibration information for continuous use by subsequent motion analysis modules.
[0095] After obtaining the coordinates of key points during the patient's movement using the aforementioned high-precision unsupervised key point detection method, the core challenge facing intelligent rehabilitation systems is how to transform this massive amount of coordinate data into clinically significant rehabilitation assessment indicators. In traditional rehabilitation training, doctors typically can only visually observe the patient's range of motion, speed, and strength, making precise quantitative analysis difficult. Especially in quadriceps rehabilitation training, whether a single movement meets the standard, whether the movement is continuous, and whether the applied load is appropriate directly affect the rehabilitation effect and the patient's safety. If we merely remain at the coordinate output level without deeply exploring the completeness and effectiveness of the movement, we cannot truly achieve intelligent rehabilitation assessment.
[0096] Therefore, based on the acquired keypoint coordinates and the patient's physiological baseline state, a scientific and rigorous mechanism for motion segmentation and effectiveness determination needs to be constructed to achieve accurate quantitative assessment of the rehabilitation training process. The keypoint coordinates here typically come from the two-dimensional position sequence of the hip, knee, and ankle in consecutive video frames. If the system also connects to force sensors, tension sensors, or resistance module feedback interfaces on the rehabilitation chair, force data corresponding to each frame or time period can be obtained synchronously. By temporally aligning the coordinate information from the image side with the mechanical information from the device side, the system can further construct the kinematic and dynamic characteristics required for motion quality evaluation.
[0097] Please refer to Figure 2 A rehabilitation training assessment method, the method includes the following steps: S6: Obtain the reference angle and reference force of the patient's movements in a static state; S7: Segment the movement based on the angular change trend of the key point coordinates during the rehabilitation process to determine the integrity of a single movement; the key point coordinates are detected by any of the above methods; S8: Calculate the angle increment, angular velocity root mean square error, and average relative load force of a single motion action based on the motion reference angle and reference force, and compare them with the preset quantization threshold to determine whether the single motion action is a valid motion.
[0098] Among them, the reference angle refers to the natural angle of the patient's limb in the initial state, and the reference force refers to the basic load force detected by the sensors of the rehabilitation equipment in the absence of active force exertion. These reference data provide a personalized reference zero point for subsequent dynamic assessments, eliminating individual differences caused by different patient body shapes and initial postures.
[0099] In one specific implementation, after a rehabilitation exercise is completed, the individual baseline angle is based on the data collected before training. With reference force By combining the detected key point coordinates with the data collected by the leg sensors, it is determined whether the single movement is a valid movement. If it is a valid movement, the single action effect value of the single movement is calculated. .
[0100] After all the exercises in this rehabilitation training are completed, the final quantitative value of this rehabilitation training will be calculated based on the individual effect values of all effective movements. ,Will The values and number of effective movements are fed back to the mobile app, completing a quantitative assessment of the effectiveness of this rehabilitation training.
[0101] The effective motion determination and single action effect value calculation are divided into three sub-steps: effective motion determination, single action core parameter extraction, and single action effect value solution, which sequentially complete the effective screening and effect quantification of single motion.
[0102] Effective exercise is determined by the individual movement reference angles collected before training. Using the baseline value and combined with preset multi-dimensional thresholds, it is determined whether a single rehabilitation exercise is an effective exercise. The determination of effective exercise includes three steps: action segmentation, threshold setting, and effectiveness verification.
[0103] Motion segmentation is based on the detected angular change trends of key points in the hip, knee, and ankle. Before training begins, the angle between the thigh and calf is collected in the patient's natural seated static state as the motion reference angle. When the angle is from The baseline value increased to its maximum value and then fell back to its maximum value. When the movement is within the specified range, it is considered as completing a single quadriceps rehabilitation exercise.
[0104] Threshold settings involve setting three quantized thresholds for validity verification: angle threshold, stability threshold, and force threshold. The angle threshold is the angle increment of a single motion. satisfy ,in As the reference angle for the action, The maximum angle of the k-th single action. The minimum effective flexion-extension increment; the stability threshold is used to determine whether the root mean square error of the angular velocity in a single motion does not exceed the allowable range, i.e., it requires... , Let be the mean square error of the angular velocity in a single motion. The maximum permissible angular velocity variance; the force threshold is used to determine whether the average relative load force of a single motion meets the requirements, i.e., the requirement. , The average relative load force in a single motion. This represents the minimum effective relative load. All three thresholds are configured by the rehabilitation therapist based on the rehabilitation stage.
[0105] The validity check involves extracting the angle, angular velocity, and load force data of this single motion and comparing them one by one with preset thresholds. If all three data meet the threshold requirements, the single motion is determined to be a valid motion. If any data does not meet the requirements, it is determined to be an invalid motion and will not be included in the subsequent effect value calculation.
[0106] Furthermore, the methods also include: S9: Statistical analysis of the single-movement effect value of all effective exercises in a single rehabilitation training session; S10: Calculate the arithmetic mean of the effect values of all individual movements to obtain the final quantitative value of this rehabilitation training, and output the final quantitative value and the total number of effective movements as feedback.
[0107] Among them, the final quantization value The final quantitative value is obtained by statistically calculating the effect values of individual movements of all effective exercises in this rehabilitation training, which reflects the overall effect of this training. The calculation of the final quantitative value includes three steps: effective data statistics, arithmetic mean calculation, and evaluation result output.
[0108] The aforementioned effective data statistics refer to the single-action effect values of all exercises deemed effective during this rehabilitation training. The total number of valid actions was summarized. , If it is a positive integer, If no effective movement is found during the rehabilitation training, the result will be directly reported to the mobile app.
[0109] The arithmetic mean is calculated by summing the results. Effective action effect value The arithmetic mean was taken to obtain the final quantitative value of this rehabilitation training. : .in, The higher the value, the higher the average quality of the effective movements in this rehabilitation training, and the better the rehabilitation training effect.
[0110] Quantitative assessment function for rehabilitation training for Value calculation function: .
[0111] in, Represents the video data stream during the training process. This represents the sensor signal data acquired synchronously. The function is the effect value of a single action. The calculation function.
[0112] The assessment results output is the final quantitative value of this rehabilitation training. Total number of effective movements The feedback is simultaneously sent to the mobile app, providing quantitative data support for rehabilitation therapists to adjust training plans and for patients to understand their own training effects.
[0113] Furthermore, in step S8, calculating the angle increment, angular velocity root mean square error, and average relative load force for a single motion action based on the motion reference angle and reference force includes the following steps: S81: Construct limb vectors based on key point coordinates, calculate real-time angles using vector angle formulas, and use the difference between the maximum angle and the action reference angle during a single movement as the angle increment; S82: Divide the difference in the real-time angle between adjacent frames by the time interval between adjacent frames to obtain the instantaneous angular velocity at each moment, and calculate the root mean square error of all instantaneous angular velocities in a single motion process to obtain the root mean square error of angular velocity. S83: Acquire real-time load force data collected by the leg sensor, and perform an arithmetic average of the difference between the real-time load force and the reference force in each frame during a single movement to obtain the average relative load force.
[0114] Single-movement core parameter extraction involves extracting three core parameters needed to calculate the effect value of a single rehabilitation movement that has been determined to be an effective exercise. These parameters are: the maximum angle of the single movement, the maximum angle of the single movement, and the maximum angle of the single movement. Single-action average relative load force Angular velocity variance of a single action .
[0115] Maximum angle of a single action It constructs the thigh vector from the hip point to the knee point and the lower leg vector from the ankle point to the knee point, using the knee point as the vertex. The real-time angle between the thigh and lower leg is calculated using the vector angle formula, and the maximum angle during the entire single movement is taken as the [value / value]. The difference between the maximum angle of this single motion and the reference angle is the increment of the single motion angle. : ; .in For the hip area, For knee points, For the ankle point, This serves as the reference angle for individual movements.
[0116] Single-action average relative load The sensor reference force was collected before the rehabilitation patient began in a natural sitting position at rest. The arithmetic mean of the relative load force data of all time-synchronized data is obtained. : .in, It is the first The number of frames contained in a valid action. As a reference force for the pre-training static state, It is the first The first action The load capacity of the frame. Let be the difference between the real-time load force and the reference force in the t-th frame of the k-th action. .
[0117] Furthermore, the comparison with a preset quantization threshold is used to determine whether a single movement is a valid movement, including the following steps: S84: Real-time monitoring of fatigue indicators during rehabilitation training. The fatigue indicators are determined based on the decay trend of the root mean square error of angular velocity as training time increases. S85: Dynamically adjust and compensate the quantitative threshold based on the fatigue index to match the real-time physiological state of the recovering patient. S86: Compare the extracted angle increment, angular velocity root mean square error, and average relative load force with the compensated quantization threshold, and output the judgment result of whether a single motion action is a valid motion.
[0118] In one specific implementation, the root mean square error of the single-action angular velocity First, based on the angle change between adjacent frames Inter-frame time interval Calculate the instantaneous angular velocity at each moment during the entire motion process. Then, the root mean square error is calculated for all instantaneous angular velocity data to obtain... .
[0119] ,in, It is the first Frame and the The change in frame angle It is the inter-frame time interval. It is the first Instantaneous angular velocity of a frame.
[0120] ,in, It is the first The number of frames contained in a valid action. It is the first The first action Instantaneous angular velocity of the frame, It is the first The average instantaneous angular velocity of all frames in a valid action.
[0121] ,in, It is the first The mean square error of the instantaneous angular velocity of all frames in a valid action.
[0122] The single-action effect value is calculated by substituting the three extracted core parameters into a preset formula to obtain the single-action effect value of the effective single movement. : .
[0123] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for detecting key points of the quadriceps femoris muscle, characterized in that, The method includes the following steps: S1: Obtain the source frame image and the target frame image, perform feature extraction and key point prediction respectively, and obtain their corresponding high-dimensional visual feature maps and key point heat maps; S2: Construct dual paths based on their respective key point heatmaps, perform dual-path sampling and gating fusion on their respective high-dimensional visual feature maps, and generate their respective enhanced feature maps; S3: Using two key point heatmaps as masks, background region features are extracted from the source frame enhancement feature map, and key point region features are extracted from the target frame enhancement feature map. The two are then fused to generate a hybrid feature map. S4: Reconstruct the target image based on the hybrid feature map; S5: Calculate the difference between the reconstructed target image and the target frame image and update the network parameters used in the key point prediction process. Use the updated network parameters to perform key point detection on the source frame image and the target frame image, and output the key point coordinates of each image frame.
2. The method for detecting key points of the quadriceps femoris muscle according to claim 1, characterized in that, Step S1 includes: S11: Channel augmentation is performed on the source frame image and the target frame image respectively through shallow convolutional layers in the feature extraction network, increasing the number of channels to a first preset dimension while maintaining their respective spatial dimensions, and generating a preliminary feature map. S12: By using the deep convolutional layers in the feature extraction network, the number of channels is increased to a second preset dimension while compressing the spatial dimension, and the preliminary feature map is fused by multi-channel convolution to form the high-dimensional visual feature map; the second preset dimension is greater than the first preset dimension. S13: Based on the high-dimensional visual feature map, predict the coordinates of key points through a differentiable key point prediction network, and convert the key point coordinates into a key point heatmap according to a preset Gaussian kernel.
3. The method for detecting key points of the quadriceps femoris muscle according to claim 1, characterized in that, Step S2 includes: S21: Extract the center coordinates of key points and the local confidence energy from the key point heatmap; S22: Construct an anchoring path based on the center coordinates of the key points, and perform local constraint sampling on the respective high-dimensional visual feature maps on the anchoring path to obtain the anchoring path sampling features; S23: Construct a free path based on a preset reference point, and perform global sparse sampling on the respective high-dimensional visual feature maps on the free path to obtain free path sampling features; S24: Using the local confidence energy-driven gating factor, the anchored path sampling features and the free path sampling features are dynamically weighted and fused to generate aggregated features; S25: The aggregated features are mapped through a fully connected layer and then residually superimposed with their respective high-dimensional visual feature maps to generate their respective enhanced feature maps; the fully connected layer is used to transform the dimension of the aggregated features to match the dimension of the high-dimensional visual feature map.
4. The method for detecting key points of the quadriceps femoris muscle according to claim 1, characterized in that, Step S3 includes: S31: Take the complement of the key point heatmap of the source frame image and the key point heatmap of the target frame image respectively, multiply them to generate a combined suppression mask, and multiply the combined suppression mask with the enhancement feature map of the source frame image to extract the background region features of the source frame image. S32: Use the key point heatmap of the target frame image as an extraction mask, multiply it with the enhanced feature map of the target frame image, and extract the key point region features of the target frame image; S33: Add the background region features and the key point region features element by element to generate a hybrid feature map.
5. The method for detecting key points of the quadriceps femoris muscle according to claim 1, characterized in that, Step S4 includes: S41: The hybrid feature map is sequentially input into the Gaussian error convolution unit and the progressive Gaussian error pooling module for feature refinement to obtain the refined high-dimensional visual feature map. S42: The refined high-dimensional visual feature map is sequentially subjected to channel dimensionality reduction, resolution restoration, and pixel value mapping to reconstruct the target image.
6. The method for detecting key points of the quadriceps femoris muscle according to claim 1, characterized in that, Step S5 includes: S51: Calculate the reconstruction loss pixel by pixel between the reconstructed target image and the target frame image; S52: Using the reconstruction loss as a supervision signal, update the network parameters used in the feature extraction and key point prediction process through backpropagation; S53: Using the updated network parameters, perform key point detection on the source frame image and the target frame image respectively, and output the key point coordinates of each image frame.
7. A method for assessing rehabilitation training, characterized in that, The method includes the following steps: S6: Obtain the reference angle and reference force of the patient's movements in a static state; S7: The rehabilitation patient performs motion segmentation based on the angular change trend of the key point coordinates during the exercise process to determine the integrity of a single motion; the key point coordinates are detected by any of the methods described in claims 1-6 above; S8: Calculate the angle increment, angular velocity root mean square error, and average relative load force of the single motion action based on the action reference angle and the reference force, and compare them with a preset quantization threshold to determine whether the single motion action is an effective motion.
8. The rehabilitation training assessment method according to claim 7, characterized in that, The method further includes: S9: Statistical analysis of the single-movement effect value of all effective exercises in a single rehabilitation training session; S10: Calculate the arithmetic mean of all the single-action effect values to obtain the final quantitative value of this rehabilitation training, and output the final quantitative value and the total number of effective movements.
9. A rehabilitation training assessment method according to claim 7, characterized in that, In step S8, calculating the angle increment, angular velocity root mean square error, and average relative load force of the single motion action based on the action reference angle and the reference force includes the following steps: S81: Construct a limb vector based on the coordinates of the key points, calculate the real-time angle using the vector angle formula, and use the difference between the maximum angle during a single movement and the action reference angle as the angle increment; S82: Divide the difference in the real-time angle between adjacent frames by the time interval between adjacent frames to obtain the instantaneous angular velocity at each moment, and calculate the root mean square error of all instantaneous angular velocities in a single motion process to obtain the root mean square error of the angular velocity. S83: Acquire real-time load force data collected by the leg sensor, and perform an arithmetic average of the difference between the real-time load force and the reference force in each frame during a single movement to obtain the average relative load force.
10. A rehabilitation training assessment method according to claim 7, characterized in that, The process of comparing the result with a preset quantization threshold to determine whether a single movement is a valid movement includes the following steps: S84: Real-time monitoring of fatigue index during rehabilitation training, wherein the fatigue index is determined based on the decay trend of the root mean square error of angular velocity as training time increases; S85: Dynamically adjust and compensate the quantitative threshold according to the fatigue index so that the quantitative threshold matches the real-time physiological state of the recovering patient. S86: Compare the extracted angle increment, the root mean square error of the angular velocity, and the average relative load force with the compensated quantization threshold, and output the determination result of whether the single motion action is a valid motion.
