Improved SimAM-ResNet ankle rehabilitation training identification method and system

By improving the ResNet18 network, combining the identity mapping Inception module and the large selective convolutional kernel network, and introducing the SimAM attention mechanism, the problems of insufficient accuracy and privacy leakage in visual rehabilitation monitoring systems for ankle rehabilitation training are solved, achieving higher recognition accuracy and privacy protection.

CN120808108APending Publication Date: 2025-10-17GUIZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510908636.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-01
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Existing visual rehabilitation monitoring systems suffer from insufficient accuracy and privacy issues in ankle rehabilitation training, especially in home environments with varying lighting and complex backgrounds, which affect monitoring accuracy and privacy.

Method used

An improved ResNet18 network is adopted, combined with the identity mapping Inception module, multi-scale feature extraction and large selective convolutional kernel network, and the SimAM attention mechanism is introduced. By feature fusion and optimization processing of ankle rehabilitation images, the recognition accuracy is improved.

Benefits of technology

It improves the accuracy of ankle rehabilitation training identification, reduces environmental interference and privacy risks, and provides more accurate rehabilitation data support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120808108A_ABST
    Figure CN120808108A_ABST
Patent Text Reader

Abstract

The invention discloses an ankle rehabilitation training identification method and system based on improved SimAM-ResNet, and belongs to the technical field of ankle rehabilitation training identification, the method adopts an improved ResNet 18 network for identification, and the specific steps are as follows: 1) adopting an identical mapping Inception module to carry out feature extraction on an input ankle rehabilitation image, and carrying out feature extraction on the ankle rehabilitation image; the equal mapping Inception module replaces a large kernel convolution in an Inception module structure with four parallel branch structures formed by combining a small square convolution kernel, two orthogonal convolution kernels and equal mapping; 2) carrying out two-dimensional convolution, maximum pooling and residual block calculation on the optimized features; 3) performing extension extraction on the output features by using a large-selectivity convolution kernel network, fusing the extracted features with the input features, and obtaining optimized features by using a SimAM attention mechanism; and 4) carrying out two-dimensional convolution, maximum pooling and residual block calculation on the optimized features to obtain output. The ankle rehabilitation training effect recognition precision can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of rehabilitation recognition, and particularly relates to a kind of ankle rehabilitation training recognition method and system of improved SimAM-ResNet. BACKGROUND

[0002] Stroke and sports injury are two major causes of disability and limb dysfunction, which have a profound impact on the quality of life and daily activities of patients. Stroke patients often face language, cognitive and motor dysfunction, especially in the lower limb ankle function, which manifests as unstable gait and decreased balance ability, significantly increasing the risk of falling. In this context, accurate monitoring of the effect of ankle rehabilitation training is particularly critical. Rehabilitation effect monitoring not only can assess the recovery progress of patients in real time and timely adjust the treatment plan to optimize the rehabilitation effect, but also provides a scientific basis for the optimization of treatment plan. By regularly assessing the flexibility and stability of the ankle, potential problems can be identified early to ensure that patients receive adequate support and guidance during the rehabilitation process.

[0003] In recent years, the 'Internet + medical health' model has developed rapidly, and the application of health medical big data has expanded continuously, providing new impetus for improving the quality and efficiency of medical services and promoting economic development. With the support of intelligent technology, deep learning has gradually shown its application prospects in the field of medical health. In particular, in the field of limb rehabilitation monitoring, deep learning technology has become a research hotspot. A large number of intelligent technologies and devices have been applied in rehabilitation monitoring, among which vision-based rehabilitation monitoring identifies posture and movement patterns through camera systems, and there have been a large number of related researches at home and abroad. For example, the literature 'DOUSTY Mehdy and ZARIFFA Jose. Tenodesis Grasp Detection in Egocentric Video[J]. IEEE Journal of Biomedical and Health Informatics, 2021, 25(5): 1463-1470' proposes a video analysis method based on wearable cameras for upper limb dysfunction caused by cervical spinal cord injury, which helps clinicians remotely monitor patient rehabilitation through hand detection, posture recognition and arm direction detection, and has significance for remote treatment guidance. The literature 'LITianpeng, CHEN Jiansheng, HU Chunhua, et al. Automatic Timed Up-and-Go Sub-Task Segmentation for Parkinson’s Disease Patients Using Video-Based Activity Classification[J]. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 2018, 26(11): 2189-2199' proposes a video-based activity classification method that uses 2D human pose estimation to extract features based on deep learning, and combines support vector machines and long short-term memory networks to classify and segment activities for Parkinson's disease patients, thus realizing remote monitoring of patient's condition and rehabilitation effect.The paper "ZHOUChengju, FENG Daqin, CHEN Shuyu, BAN Nianming, et al. Portable vision-based gait assessment for post-stroke rehabilitation using an attention-based lightweight CNN[J]. Expert Systems with Applications, 2024, 238, 122074" developed a portable vision-based system to assess the recovery of stroke patients through deep learning-based gait observation. The system does not require the presence of skilled technicians and can be performed almost anytime and anywhere, monitoring the effectiveness of rehabilitation training at home in real time. The paper "WANG Yachun, PEI Zhongcai, WANG Chen, et al. Depth-aware pose estimation using deep learning for exoskeleton gait analysis [J]. Scientific Reports, 2023, 13, 22681" proposes a gait detection method based on computer vision for real-time monitoring of gait during human-machine integrated walking. It uses RGB images as input and joint correlation as the detection target to prevent gait asymmetry during rehabilitation training and reduce the risk of falls and secondary injuries.

[0004] Despite the broad potential of these methods, visual rehabilitation monitoring still faces challenges such as privacy breaches and environmental interference. For example, camera-based monitoring systems are susceptible to changes in lighting and complex backgrounds in the home environment, reducing monitoring accuracy. Privacy issues are also a major factor limiting their application. In contrast, infrared thermal imagers, as non-contact imaging devices, utilize infrared radiation to capture thermal signatures, effectively avoiding the privacy risks associated with traditional image acquisition. Infrared thermal imagers are widely used in biomedical monitoring, building energy efficiency assessment, and security, demonstrating their superior balance between technology and ethics. Therefore, intelligent rehabilitation monitoring based on infrared thermal imagers can obtain accurate rehabilitation data while protecting privacy, providing a scientific basis for clinical decision-making. The paper "Zhao Chengwei. Research on Ankle Lesion Area Analysis Based on Infrared Thermography [D]. Hebei University of Science and Technology, 2020" attempts to use Bayesian analysis to analyze ankle lesions using infrared thermography, but does not specifically investigate monitoring ankle rehabilitation outcomes. SUMMARY

[0005] The technical problem to be solved by the present application is to provide an ankle rehabilitation training recognition method and system improved by SimAM-ResNet, which can improve the accuracy of ankle rehabilitation training recognition.

[0006] The technical solution adopted by the present application is an ankle rehabilitation training recognition method improved by SimAM-ResNet, which uses an improved ResNet18 network for recognition, and the specific steps are as follows:

[0007] 1) Feature extraction: the identity mapping Inception module is used to extract features from the input ankle rehabilitation image, the identity mapping Inception module replaces the large kernel convolution in the Inception module structure with four parallel branch structures composed of a small square convolution kernel, two orthogonal convolution kernels and identity mapping, and the SimAM attention mechanism is used to obtain optimized features from the extracted features;

[0008] 2) Two-dimensional convolution, maximum pooling and residual block calculation are performed on the optimized features in step 1) to obtain multi-scale feature extraction output;

[0009] 3) The feature expansion method of the large selective convolution kernel network in step 3) is as follows: the large selective convolution kernel network includes two residual sub-modules, namely the large kernel selection module (Large Kernel Selection Sub-block, LKSelection) and the feed-forward network module (Feed-forward Network Sub-block, FFN), wherein the large kernel selection module (LK Selection) dynamically adjusts the receptive field through an adaptive mechanism, and automatically selects the appropriate convolution kernel size according to the input features, so as to more accurately capture different spatial feature information; the large selective convolution kernel LSK module uses a series of large convolution kernels for feature extraction in this process, then performs spatial selection operation (Spatial Selection), and finally fuses the extracted features with the input features, realizes the dynamic adjustment of the receptive field through the convolution, pooling and selection mechanism.

[0010] Step 4) Two-dimensional convolution, maximum pooling and residual block calculation are performed on the optimized features in step 3) to obtain global spatial feature output;

[0011] Step 3) The feature expansion method of the large selective convolution kernel network is as follows: the large selective convolution kernel network includes two residual sub-modules, namely the large kernel selection module (Large Kernel Selection Sub-block, LKSelection) and the feed-forward network module (Feed-forward Network Sub-block, FFN), wherein the large kernel selection module (LK Selection) dynamically adjusts the receptive field through an adaptive mechanism, and automatically selects the appropriate convolution kernel size according to the input features, so as to more accurately capture different spatial feature information; the large selective convolution kernel LSK module uses a series of large convolution kernels for feature extraction in this process, then performs spatial selection operation (Spatial Selection), and finally fuses the extracted features with the input features, realizes the dynamic adjustment of the receptive field through the convolution, pooling and selection mechanism.

[0012] Step 5) Normalization and linearization are performed on the features output in step 4) to obtain ankle rehabilitation training recognition results.

[0013] Specifically, the optimization method of the SimAM attention mechanism is: first, by performing global average pooling and global standard deviation pooling operations on the multi-scale features extracted by the identity mapping Inception module (what data to operate on), the global statistical information of each feature channel is extracted; then, the cosine similarity between each channel and other channels is calculated, and the similarity information between channels is represented as a matrix; then the multi-layer perceptron (MLP) is responsible for learning the similarity matrix and mapping these similarity information into the attention weights of the channels. Through this mechanism, SimAM applies different attention weights to the feature maps of each channel to reflect the importance of different channels to the feature representation. Finally, SimAM performs weighted summation on the input features to generate an optimized feature representation; the specific implementation method of the SimAM attention mechanism is: for the input features Figure X ∈R B ×C×W×H , where B represents the batch size, C represents the number of channels, H represents the height of the feature map, and W represents the width of the feature map; Figure X The mean μ∈R B×C×1×1 and variance ν∈R B×C×1×1 , where the mean and variance are calculated on the dimensions of H and W respectively. Figure X Perform standardization to obtain a standardized feature map:

[0014]

[0015] Where V represents the variance, and ε is a small constant of 10 -5 , avoid the denominator being 0;

[0016] Calculate each pixel X i,j Similarity Y between ∈V and other pixels i,j , and normalize the similarity. For each pixel X i,j , calculate the similarity value between it and other pixels:

[0017]

[0018] Where n = H × W represents the number of pixels in the feature map, x k Represents the feature values ​​of other pixels in the feature map except the current pixel, and the similarity Y i,j The calculation method is to convert X i,j The square difference between the pixels is normalized and a bias term of 0.5 is added to map the similarity to the range of [0,1], and the original feature Figure X Multiply it by the similarity Y to get the weighted feature map Z∈R B×C×W×G , that is: Zi,j = x i,j x y ij The weighted feature map Z is normalized by a Sigmoid activation function to obtain the final output feature map.

[0019] The feature extraction module adopts an identity mapping Inception module to extract features of the ankle rehabilitation image, wherein the identity mapping Inception module replaces a large kernel convolution in the Inception module structure with four parallel branch structures composed of a small square convolution kernel, two orthogonal convolution kernels and an identity mapping, and adopts a SimAM attention mechanism to obtain optimized features from the extracted features.

[0020] The first feature processing module performs two-dimensional convolution, maximum pooling and residual block calculation on the optimized features extracted by the feature extraction module to obtain an output.

[0021] The optimized feature module expands and extracts the features output by the first feature processing module by using a large selective convolution kernel network, fuses the extracted features with input features, and obtains optimized features by using a SimAM attention mechanism.

[0022] The second feature processing and recognition module performs two-dimensional convolution, maximum pooling and residual block calculation on the optimized features in the optimized feature module to obtain an output.

[0023] The present application has the following advantages: compared with the prior art, the present application addresses the problem of insufficient spatial feature extraction capability of the ResNet18 model in processing ankle rehabilitation posture, proposes an IM-Inception module to capture multi-scale features in the image, and introduces a large selective convolution kernel network to better process various spatial feature information in the ankle rehabilitation posture, and finally fuses a SimAM attention mechanism to guarantee the recognition accuracy of ankle rehabilitation training effect, thereby promoting the development of intelligent rehabilitation monitoring. BRIEF DESCRIPTION OF DRAWINGS

[0024] Figure 1 It is a kind of improved SimAM-ResNet ankle rehabilitation training recognition method flow chart;

[0025] Figure 2 It is a residual block structure diagram;

[0026] Figure 3 It is an IM-Inception structure diagram;

[0027] Figure 4 It is a large selective convolution kernel network structure diagram;

[0028] Figure 5 It is a SimAM structure diagram;

[0029] Figure 6 This is the data collection diagram;

[0030] Figure 7 This is a partial data graph;

[0031] Figure 8 Accuracy and Loss graphs for model training. In the figure, (a) Accuracy curve comparison of different structural models; (b) Loss curve comparison of different structural models;

[0032] Figure 9 is the confusion matrix of the test results;

[0033] Figure 10 Diagram of the ankle rehabilitation training recognition system for improving SimAM-ResNet. DETAILED DESCRIPTION

[0034] Aiming at the problem of ankle rehabilitation posture recognition, we have carried out systematic improvement and optimization based on the ResNet18 deep learning architecture. First, in terms of network architecture, we proposed a new IM-Inception module and added a large selective convolution kernel network, aiming to improve the model's ability to capture features of different scales in the image and optimize the feature extraction process to more effectively process the complex spatial feature information of ankle rehabilitation posture. Secondly, in the algorithm framework, we integrated the SimAM module, the main function of which is to enhance the differences between image features, thereby improving the model's recognition accuracy for different ankle rehabilitation states. The final classification model structure is as follows: Figure 1 shown.

[0035] Example 1: Figures 1-6 As shown in the figure, an improved SimAM-ResNet ankle rehabilitation training recognition method is used. The method uses an improved ResNet18 network for recognition;

[0036] Residual Neural Network (ResNet) is a deep learning method widely used in image classification tasks. The innovation of ResNet is that it effectively alleviates the network degradation problem by introducing residual blocks with "skip connections", thereby achieving a steady improvement in model training effect as the number of network layers increases. Figure 2 As shown in Figure 2, this mechanism enables the gradient to propagate better in deep networks, avoiding problems such as gradient disappearance.

[0037] ResNet is composed of multiple residual blocks, and can be further subdivided into various variants according to the number of network layers, such as ResNet18, ResNet34, ResNet50, ResNet101 and ResNet152, etc. The present application selects the ResNet18 model as the basic architecture to adapt to the needs of small-scale data sets, ensuring that the network can effectively extract key features in the data during the training process and achieve high classification performance.

[0038] The specific steps are as follows:

[0039] 1) Feature extraction:

[0040] Inception is a deep learning architecture proposed by Google, which draws inspiration from the multi-scale receptive field characteristics of the human visual system, aiming to capture multi-scale features in images through multi-scale convolution operations. The core idea of Inception is to use convolution kernels of different sizes to act on input data simultaneously, thereby expanding the receptive field of the model without significantly increasing the depth and parameter amount of the network. This design not only captures detailed information of the image, but also more effectively combines global context information, thereby improving the ability of feature extraction. On this basis, the present application proposes a new identity mapping Inception (Identity Mapping-Inception, IM-Inception) module, which aims to further optimize the feature extraction process. The module innovatively adjusts the traditional Inception structure, and the identity mapping Inception module replaces the large kernel convolution in the Inception module structure with a four-parallel-branch structure composed of a small square convolution kernel, two orthogonal convolution kernels and an identity mapping. The extracted features are optimized using the SimAM attention mechanism; the main purpose of this four-parallel-branch structure design is to improve the flexibility and robustness of feature extraction by combining features of different dimensions while maintaining a large receptive field, such as Figure 3 as shown in

[0041] 2) Perform two-dimensional convolution, maximum pooling and residual block calculation on the optimized features in step 1) to obtain multi-scale feature extraction output;

[0042] 3) Use a large selective convolution kernel network to expand and extract the features output in step 2), fuse the extracted features with the input features, and use the SimAM attention mechanism to obtain optimized features;

[0043] In order to better process the spatial feature information in the ankle rehabilitation posture, the application introduces a large selective kernel network (LSKN). The network uses a selective mechanism in the spatial dimension to adaptively adjust the convolution operation according to the distribution of target features at different spatial positions, so as to fully consider the diversity of spatial features in the feature extraction process.

[0044] The feature expansion method of the large selective convolution kernel network is as follows: the large selective convolution kernel network includes two residual sub-modules, namely a large kernel selection module (LK Selection) and a feed-forward network module (FFN), wherein, as shown in Figure 3 The large kernel selection module (LK Selection) dynamically adjusts the receptive field through an adaptive mechanism and automatically selects the appropriate convolution kernel size according to the input features, so as to more accurately capture different spatial feature information; the LSK module uses a series of large convolution kernels for feature extraction in this process, then performs a spatial selection operation (Spatial Selection), and finally fuses the extracted features with the input features, so as to realize dynamic adjustment of the receptive field through convolution, pooling and selection mechanisms, and better adapt to the needs of different spatial features.

[0045] Step 4) performing two-dimensional convolution, maximum pooling and residual block calculation on the optimized features in step 3) to obtain global spatial feature output;

[0046] Step 5) normalizing and linearizing the features output in step 4) to obtain ankle rehabilitation training recognition results.

[0047] The SimAM attention mechanism is adopted, which is an energy function optimization method based on neuroscience theory, aiming to mine the importance of neurons. SimAM is a simple and efficient attention module, which is widely used in image classification tasks. The core idea is to use the similarity information between feature channels to dynamically adjust the attention weight of each channel, so as to improve the performance of the model in image classification tasks.

[0048] The optimization method of the SimAM attention mechanism is as follows: first, the global average pooling and global standard deviation pooling operations are used to extract the global statistical information of each feature channel; then, the cosine similarity between each channel and other channels is calculated, and the similarity information between the channels is represented as a matrix; then, a multilayer perceptron (MLP) is responsible for learning the similarity matrix, and the similarity information is mapped to the attention weight of the channel. Through this mechanism, SimAM applies different attention weights to each channel of the feature map to reflect the importance of different channels to the feature representation. Finally, SimAM performs weighted summation on the input features to generate an optimized feature representation, thereby improving the overall classification effect of the model. The structure of SimAM is shown in Figure 5 .

[0049] The specific implementation of the SimAM attention mechanism is as follows: for the input feature Figure X ∈R B×C×W×H , where B represents the batch size, C represents the number of channels, H represents the height of the feature map, and W represents the width of the feature map; the mean μ ∈ R Figure X and variance v ∈ R B×C×1×1 of the feature B×C×1×1 are calculated, where the mean and variance are calculated in the H and W dimensions, respectively, and the feature Figure X is standardized to obtain the standardized feature map:

[0050]

[0051] where V represents the variance, and ε is a very small constant of 10 -5 to avoid division by zero;

[0052] The similarity Y i,j between each pixel point X i,j and other pixel points is calculated, and the similarity is normalized. For each pixel point X i,j , the similarity value between it and other pixel points is calculated as follows:

[0053]

[0054] where n = H × W represents the number of pixel points in the feature map, x k represents the feature value of other pixel points in the feature map except the current pixel, and the similarity Y i,j is calculated by normalizing the squared difference between X i,j and other pixel points and adding a bias term of 0.5 to map the similarity to the range of [0, 1]. The original feature Figure X is multiplied by the similarity Y to obtain the weighted feature map Z ∈ R B×C×W×G , i.e.: Zi,j = x i,j x y ij The weighted feature map Z is normalized by a Sigmoid activation function to obtain the final output feature map.

[0055] Embodiment 2: An ankle rehabilitation training recognition system improved by SimAM-ResNet is used to improve the recognition of ankle rehabilitation training effect by the improved ResNet18 network, as shown in Figure 10 , which includes:

[0056] The feature extraction module extracts features of the input ankle rehabilitation image by using an identity mapping Inception module, wherein the identity mapping Inception module replaces the large kernel convolution in the Inception module structure with four parallel branch structures composed of a small square convolution kernel, two orthogonal convolution kernels and an identity mapping, and obtains optimized features by using a SimAM attention mechanism on the extracted features.

[0057] The first feature processing module performs two-dimensional convolution, maximum pooling and residual block calculation on the optimized features extracted by the feature extraction module to obtain an output.

[0058] The optimized feature module expands and extracts the features output by the first feature processing module by using a large selective convolution kernel network, fuses the extracted features with the input features, and obtains optimized features by using a SimAM attention mechanism.

[0059] The second feature processing and recognition module performs two-dimensional convolution, maximum pooling and residual block calculation on the optimized features in the optimized feature module to obtain an output.

[0060] In order to illustrate the effect of the present application, the following simulation is performed:

[0061] 1. Dataset

[0062] Deep learning is a highly data-driven technique that usually requires large-scale datasets to effectively train models. However, in existing research, there is a relative lack of publicly available datasets related to ankle rehabilitation outcomes after stroke or sports injuries. To address this issue, a dataset containing 20 different ankle rehabilitation outcomes was constructed to provide systematic support for the training of supervised deep learning models, thereby filling the gap in the current mainstream research due to the lack of datasets. During the dataset construction process, to ensure the broad applicability of the data, 6 healthy volunteers without motor dysfunction were recruited for the experiment. The volunteers' heights ranged from 155 cm to 172 cm, and their weights ranged from 47 kg to 60 kg. Detailed volunteer information is listed in Table 1. By collecting these data, an important foundational data resource was provided for deep learning research in the field of ankle rehabilitation, which is expected to further promote research progress in this field.

[0063] Table 1 Volunteer information

[0064]

[0065] After fully communicating with the rehabilitation therapist, the posture with the tibia perpendicular to the plantar surface was defined as zero degrees (i.e., neutral position), and multidimensional data collection was performed within a 180° range around the front of the ankle. Four common ankle rehabilitation postures were designed: dorsiflexion, plantarflexion, adduction, and abduction. In the absence of other heat source interference, precise data collection was performed using a FLIR TG165 model thermal imager (resolution: 80*60), as shown in Figure 6 The data collection process included data format conversion and storage. Since the collected data formats were not uniform, the data was standardized in terms of data format, naming conventions, classification methods, and standardization processes. The processed data was then stored in a database according to the multi-layer classification. To further enrich the training sample set and enhance the robustness of the deep learning model, conventional data augmentation techniques were applied, including translation, flipping, rotation, and HSV color space transformation, to expand the diversity of data samples. The total number of augmented images reached 24,000, with the training set containing 20,000 images, including 1,000 images for each posture, covering different activity range angles; the test set contained 4,000 images, including 200 images for each posture. Some of the collected data are shown in Figure 7 The active range of motion of the four ankle rehabilitation postures and their corresponding rehabilitation outcomes are listed in Table 2, and the label classification and annotation for subsequent deep learning network training were performed.

[0066] Table 2 Ankle rehabilitation activity classification table

[0067]

[0068] 2. Experimental environment configuration:

[0069] The network model was built based on the PyTorch deep learning framework and run on a computer system equipped with NVIDIA GeForce RTX 4090 graphics processors, with a Windows 10 system environment. Given the relatively limited size of the dataset, the batch size was set to 64 during model training, the initial learning rate was set to 0.01, and the maximum number of iterations was 100. To improve the adaptability of the model at different learning stages, the Adam (Adaptive Moment Estimation) optimizer was selected for training. For the ankle rehabilitation effect pose recognition task, it was defined as a multi-classification problem. To measure the error between the model's prediction results and the true labels, the cross-entropy loss function (Cross Entropy Loss) was used as the loss function, which helps to accurately evaluate the model's prediction performance on different rehabilitation pose effect categories.

[0070] 3. Evaluation indicators

[0071] To comprehensively evaluate the performance of the proposed network model and enhance the scientificity and credibility of the experimental results, this study analyzed and compared multiple key performance indicators of the model. Specifically, the accuracy (Accuracy), macro-precision (Macro-precision), macro-recall (Macro-recall), and macro-F1 score (Macro-F1) were selected as evaluation indicators, as shown in equations (3)-(5). Through the comparative analysis of these indicators, the overall performance of the model in handling different categories of data can be more comprehensively and objectively reflected.

[0072]

[0073] where TP, TN, FP, and FN represent true positives, true negatives, false positives, and false negatives, respectively.

[0074] 4. Experimental results

[0075] The application compares and analyzes the traditional ResNet18 model as the baseline, improves the algorithm structure of ResNet18, including integrating SE module, CBAM module and SimAM module, and carries out corresponding comparative experiments. In addition, the network structure is also improved and evaluated. In order to better compare the indicators of several models, the accuracy, macro precision, macro recall rate and macro F1 score of each network model are drawn into a comparison table, as shown in Table 3. According to the experimental results, the improved model is significantly better than the baseline model in multiple performance indicators, specifically, the accuracy is improved by 3.1%, the macro precision is improved by 3.14%, the macro recall rate is increased by 3.45%, and the macro F1 score is also increased by 3.45%. In addition, the application also records and analyzes the performance changes of different model structures in the training process, including the change curves of accuracy and loss value. As shown in Figure 8 , the improved model shows faster convergence speed and lower loss value on the specified task, thereby verifying the effectiveness and practicality of the proposed improvement measures.

[0076] Table 3 Evaluation indicators of different structure models

[0077]

[0078]

[0079] The application analyzes the performance of the improved model on the 20-class ankle rehabilitation effect image test set in detail, and the results are shown in the form of a confusion matrix in Figure 9 . The labels 0-20 in the confusion matrix correspond one-to-one to the true labels in Table 2, which intuitively reflects the correspondence between the classifier prediction results and the actual situation, thereby helping to deeply understand the classification effect of the model on different classes. From the analysis results, the improved model shows high accuracy in recognizing various ankle rehabilitation postures, especially in the plantar flexion state, with an accuracy of 99.3%. In addition, the recognition accuracy in dorsiflexion, adduction and abduction states reaches 94.1%, 95.5% and 96.3% respectively. Although the recognition accuracy in these states is slightly insufficient, the accuracy still maintains above 94.1%, fully demonstrating the reliability of the model. This result shows that the improved model has significant practicality and stability in the multi-class ankle rehabilitation posture recognition task.

[0080] In summary, the application proposes a specific ankle rehabilitation effect recognition method of a multi-scale large-selectivity convolution improved ResNet model based on a parameter-free attention mechanism SimAM, which has the following specific advantages:

[0081] (1) To solve the problem of the relative scarcity of public data sets related to ankle rehabilitation effects after stroke or sports injuries, a data set containing 20 different ankle rehabilitation effects was constructed to provide systematic support for the training of supervised deep learning models;

[0082] (2) The IM-Inception module was proposed, which consists of four parallel branch structures composed of small square convolution kernels, two orthogonal convolution kernels, and identity mapping to capture multi-scale features in images;

[0083] (3) The large selective convolution kernel network was introduced to optimize the feature extraction process to more effectively process the complex spatial feature information of ankle rehabilitation poses;

[0084] (4) By embedding the SimAM attention mechanism, the model's recognition accuracy for various ankle pose rehabilitation effects was effectively improved. Finally, the experimental results showed that the improved model achieved an average accuracy of 96.25% on the test set, which can better achieve the recognition of different ankle rehabilitation pose effects and inject new momentum into the "Internet + medical health".

Claims

1. An improved SimAM-ResNet ankle rehabilitation training recognition method, characterized in that: This method uses the improved ResNet18 network for recognition. The specific steps are as follows: 1) Feature extraction: The identity mapping Inception module is used to extract features from the input ankle rehabilitation images. The identity mapping Inception module replaces the large kernel convolution in the Inception module structure with a four-parallel branch structure composed of a small square convolution kernel, two orthogonal convolution kernels, and an identity mapping. The SimAM attention mechanism is used to obtain optimized features for the extracted features. 2) Perform two-dimensional convolution, maximum pooling, and residual block calculation on the features optimized in step 1) to obtain multi-scale feature extraction output; 3) Use a large selective convolutional kernel network to expand and extract the features output in step 2), fuse the extracted features with the input features, and use the SimAM attention mechanism to obtain optimized features; Step 4) Perform two-dimensional convolution, maximum pooling, and residual block calculation on the features optimized in step 3) to obtain global spatial feature output; Step 5) normalizes and linearizes the features output in step 4) to obtain ankle rehabilitation training recognition results.

2. The ankle rehabilitation training recognition method based on improved SimAM-ResNet according to claim 1, characterized in that: In step 3), the feature expansion method of the large selective convolution kernel network is as follows: the large selective convolution kernel network includes two residual submodules, namely the large kernel selection module and the feedforward network module. Among them, the large kernel selection module dynamically adjusts the receptive field through an adaptive mechanism, and automatically selects the appropriate convolution kernel size according to the input features to capture different spatial feature information; the large selective convolution kernel LSK module uses a series of large convolution kernels for feature extraction in this process, and then performs spatial selection operations, and finally fuses the extracted features with the input features, and realizes dynamic adjustment of the receptive field through convolution, pooling and selection mechanisms.

3. The ankle rehabilitation training recognition method based on improved SimAM-ResNet according to claim 1, characterized in that: The optimization method of the SimAM attention mechanism is as follows: first, global average pooling and global standard deviation pooling operations are performed on the multi-scale features extracted by the identity mapping Inception module to extract the global statistical information of each feature channel; then, the cosine similarity between each channel and other channels is calculated, and the similarity information between channels is represented as a matrix; then the multi-layer perceptron is responsible for learning the similarity matrix and mapping these similarity information into the attention weights of the channels. Finally, SimAM performs weighted summation on the input features to generate an optimized feature representation.

4. The ankle rehabilitation training recognition method based on improved SimAM-ResNet according to claim 1, characterized in that: The specific implementation of the SimAM attention mechanism: For the input feature map X∈R B×C×W×H , where B represents the batch size, C represents the number of channels, H represents the height of the feature map, and W represents the width of the feature map; calculate the mean μ∈R of the feature map X B×C×1×1 and variance ν∈R B×C×1×1 , where the mean and variance are calculated in the dimensions of H and W respectively, and the feature map X is standardized to obtain a standardized feature map: Where V represents the variance, and ε is a small constant with a value of 10 -5 ; Calculate each pixel X i,j Similarity Y between ∈V and other pixels i,j , and normalize the similarity. For each pixel X i,j , calculate the similarity value between it and other pixels: Where n = H × W represents the number of pixels in the feature map, x k Represents the feature values ​​of other pixels in the feature map except the current pixel, and the similarity Y i,j The calculation method is to convert X i,j Normalize the square difference between the other pixels and add a bias term of 0.5 to map the similarity to the range of [0,1]. Multiply the original feature map X by the similarity Y to obtain the weighted feature map Z∈R B×C×W×G , that is: Z i,j =x i,j ×y ij , the weighted feature map Z is normalized by the Sigmoid activation function to obtain the final output feature map.

5. The improved SimAM-ResNet ankle rehabilitation training recognition system according to claim 1, characterized in that: include: The feature extraction module uses the identity mapping Inception module to extract features from the input ankle rehabilitation images. The identity mapping Inception module replaces the large kernel convolution in the Inception module structure with a four-parallel branch structure composed of a small square convolution kernel, two orthogonal convolution kernels, and the identity mapping. The SimAM attention mechanism is used to obtain optimized features for the extracted features. The first feature processing module performs two-dimensional convolution, maximum pooling and residual block calculation on the features extracted and optimized by the feature extraction module to obtain output; The feature optimization module uses a large selective convolution kernel network to expand and extract the features output by the first feature processing module, fuses the extracted features with the input features, and uses the SimAM attention mechanism to obtain optimized features; The second feature processing and recognition module performs two-dimensional convolution, maximum pooling and residual block calculation on the features optimized in the optimization feature module to obtain output.