Methods for recognizing knee joint movements in the elderly
By using the YOLOX algorithm and image analysis technology, combined with data annotation and model optimization, the problem of insufficient accuracy in knee joint function assessment has been solved, enabling rapid and accurate identification and assessment of knee joint movements in the elderly, and providing an efficient health monitoring solution.
Patent Information
- Application Number
- CN202311023223.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-14
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2043-08-14
AI Technical Summary
Existing knee function assessment questionnaires are insufficient in accurately reflecting the overall knee function of the elderly population. Furthermore, the elderly tend to avoid weight-bearing activities on their knees during daily activities, making it difficult to reliably report symptoms and lacking a rapid and accurate automated identification system.
By employing the YOLOX algorithm combined with image analysis technology, and through data annotation, model training and preprocessing, the improved YOLOX-s model and Bayesian optimization method are used to configure parameters. The model weights are optimized by combining data augmentation and CIOU loss function to achieve fast and accurate recognition of knee joint movements.
It enables rapid and accurate identification of knee joint movements without human intervention, provides quantitative assessment results, improves identification accuracy and reliability, and provides an efficient solution for knee joint health monitoring and sports rehabilitation in the elderly.
Smart Images

Figure CN117058756B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer vision technology, and specifically relates to a method for recognizing knee joint movements in the elderly. Background Technology
[0002] Accurate assessment of knee movement in older adults is crucial for personalized monitoring of related functional impairments. Knee function-specific questionnaires, such as the American Knee Society Score (AKSS) and the Western University / McMaster University Osteoarthritis Index (WOMAC), have been widely used to evaluate knee function. While these questionnaires help capture important clinical symptoms and functional limitations in older adults, they have limitations in accurately representing overall knee function. There is no standardized approach to tasks performed when questionnaires inquire about pain levels and task difficulty. Some older adults avoid activities that place excessive stress on the knee, such as running or jumping, making it difficult for them to reliably report symptoms associated with these activities during knee function assessments.
[0003] Computer vision is a crucial research area in modern science and technology, primarily aiming to enable computer vision systems to understand semantic information in images or videos, much like the human visual system. Computer vision and deep learning technologies have wide applications in healthcare, helping doctors assess the functional levels of the elderly more quickly and accurately. Developing an automated knee joint movement recognition system based on these technologies can provide doctors with realistic and objective indicators. The YOLOX algorithm is a highly efficient object detection algorithm capable of real-time detection in complex environments, exhibiting good performance and accuracy. Using this algorithm for knee joint movement recognition can improve the system's accuracy and speed, making it more suitable for practical clinical applications. Keypoint detection technology helps doctors measure and evaluate the completion of knee joint movements, enabling more accurate assessment of the knee condition in the elderly. Using this technology to develop an automated classification system can improve the system's accuracy and reliability. This invention combines image analysis and detection technology to establish a knee joint movement recognition and classification system. This is of great significance for further promoting the application and development of computer vision and deep learning technologies in the medical field. Summary of the Invention
[0004] The purpose of this invention is to provide a method for recognizing knee joint movements in the elderly, which can quickly and accurately identify knee joint movements and determine the smoothness of knee joint movements without human intervention.
[0005] The technical solution adopted in this invention is: a method for recognizing knee joint movements in the elderly, comprising the following steps:
[0006] Step 1: Collect and label video or image data of knee joint movements in elderly individuals;
[0007] Step 2: Select YOLOX as the object detection model and configure the parameters of the YOLOX model;
[0008] Step 3: Preprocess the data obtained in Step 1;
[0009] Step 4: Divide the data obtained in Step 3 into a training set and a validation set. Input the training set into the YOLOX model obtained in Step 2 to train the model.
[0010] Step 5: Use the validation set from Step 4 to evaluate the performance of the trained YOLOX model. If the performance of the YOLOX model meets the requirements, proceed to Step 6; otherwise, return to Step 2.
[0011] Step 6: Use the YOLOX model obtained in Step 5 to determine the knee joint movements of the elderly and perform corresponding classification and recognition.
[0012] The invention is further characterized in that,
[0013] The knee joint movement video or image data collected in step 1 involves elderly people of different ages, body types and movements. When labeling, the rectangular box labeling method is used to label the knee joint movements in the data as two labels: upright and supine.
[0014] In step 2, the improved YOLOX-s model is selected as the target detection model, and the parameters of the YOLOX-s model are configured using the Bayesian optimization method.
[0015] The parameter expression for the SCP module in the improved YOLOX-s model is as follows:
[0016]
[0017] In the formula: P represents the number of parameters calculated; I represents the number of layers in the network; C l-in C is the number of input channels in layer I; I_out is the number of output channels in layer I; K is the size of the convolution kernel.
[0018] The specific steps for configuring the YOLOX-s model parameters using the Bayesian optimization method are as follows:
[0019] Step 2.1: Define the parameter space, including the three hyperparameters of the YOLOX-s model: learning rate, batch size, and moving average decay. Each parameter has a domain, i.e., the range of values. The domain will be the search space for Bayesian optimization.
[0020] Step 2.2: Select accuracy or loss function value as the optimization objective;
[0021] Step 2.3: Construct a Gaussian process surrogate model to approximate the objective function;
[0022] Step 2.4: Select Expected Improvement as the sampling strategy;
[0023] Step 2.5: Select the next parameter combination for evaluation based on the surrogate model and sampling strategy, use the current parameter combination to train the YOLOX-s model, evaluate the performance metrics of the YOLOX-s model on the validation set, add the evaluation results to the known parameter-performance dataset, and then update the parameters of the surrogate model using the parameter-performance dataset.
[0024] Step 2.6: Repeat step 2.5 until the predetermined number of optimization rounds is reached or the termination condition is met;
[0025] Step 2.7: Use the optimal parameter combination as the final configuration of the YOLOX-s model.
[0026] The preprocessing in step 3 includes image normalization and data augmentation. Data augmentation includes random cropping, random flipping, random rotation, random scaling, and random brightness and contrast adjustment.
[0027] In step 4, the data obtained in step 3 is divided into a 70% training set and a 30% validation set.
[0028] In step 4, the CIOU loss function is used to optimize the weights of the YOLOX model, and the SGD optimization algorithm is used to optimize the parameters of the YOLOX model. In each iteration, a training sample (x) is randomly selected. i ,y i The loss function and gradient are calculated, and then the YOLOX model parameters are updated according to the direction of the gradient and the learning rate. This process is repeated multiple times on the entire training set until the predetermined number of training rounds is reached or the convergence condition is met.
[0029] In step 5, when evaluating the performance of the trained YOLOX model, the metric used is the mean precision, which is obtained by calculating the precision values at different confidence thresholds and averaging them.
[0030] Step 6 includes the following specific steps:
[0031] Step 6.1: Input the knee joint movement video into the YOLOX model, and obtain the predicted target box and category through forward pass;
[0032] Step 6.2: Based on the target bounding box and category output by the YOLOX model, determine whether the elderly person is lying down or standing. If the elderly person is lying down, proceed to the lying leg raise test stage in Step 6.3; if the elderly person is standing, proceed to the standing movement test stage in Step 6.4.
[0033] Step 6.3: Set a height threshold for leg raises to determine the effectiveness of leg raises, count the number of effective leg raises, and thus evaluate the knee joint movement status.
[0034] Step 6.4: Calibrate the test area. Once the person enters the test area, start timing. Calculate the person's walking speed on the uneven road by using the video frame rate and the number of frames detected. Simultaneously record the time for squatting and the time for going up and down stairs to assess knee joint mobility.
[0035] The beneficial effects of this invention are: the knee joint movement recognition method for the elderly can quantify the evaluation results, making the detection accuracy more accurate. It can quickly and accurately identify knee joint movements and judge the smoothness of knee joint movements without human intervention, providing an efficient and feasible solution for knee joint health monitoring and sports rehabilitation for the elderly. Attached Figure Description
[0036] Figure 1 This is a flowchart illustrating the knee joint movement recognition method for the elderly population of the present invention.
[0037] Figure 2 This is a schematic diagram of the improved SCP module of the YOLOX-s model in the knee joint movement recognition method for the elderly population of the present invention;
[0038] Figure 3 This is a schematic diagram of the mean accuracy of the YOLOX-s model in the knee joint movement recognition method for the elderly population of the present invention.
[0039] Figure 4 This is a schematic diagram of the system interface when the knee joint movement recognition method for the elderly population of the present invention is applied. Detailed Implementation
[0040] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0041] Example 1
[0042] This invention provides a method for recognizing knee joint movements in the elderly, such as... Figure 1 As shown, it includes the following steps:
[0043] Step 1: Dataset Construction: The first step in building the dataset is to collect video or image data containing knee joint movements of older adults. This data is obtained through field collection and publicly available datasets. Ensure the dataset is diverse and representative, including older adults of different ages, body types, and movements.
[0044] Next, the data needs to be labeled, with the people in the dataset labeled as either upright or lying down. The labeling process uses a bounding box method, that is, in each image or video frame containing a person, a rectangle is used to enclose the person, and each rectangle is labeled accordingly.
[0045] Step 2, Model Selection and Configuration: This invention selects YOLOX-s as the object detection model and optimizes its SCP (Spatial Channel-wise Pooling) module to improve system performance. The improved SCP module enhances the model's ability to fuse spatial and channel information, better capturing subtle motion features, thereby further improving recognition accuracy and stability. The parameters of the YOLOX model, such as learning rate, input image size, and batch size, are configured to adapt to the dataset and task requirements. To optimize the parameter configuration of the deep learning model, a Bayesian optimization method is used to find the optimal hyperparameter combination. A Gaussian model and sampling strategy are employed to efficiently search the parameter space, thus avoiding the complexity of manually adjusting model parameters and saving significant manual debugging time.
[0046] Step 3: Data Preprocessing: Before training the model, the data needs to be preprocessed to better suit the input requirements of the YOLOX model. Preprocessing steps include image normalization and data augmentation to reduce the impact of overfitting. Data augmentation techniques are used to process the labeled dataset to increase the diversity of data samples, better adapt to different action samples, and improve the robustness of the model.
[0047] Step 4, Model Training: Divide the labeled dataset into training and validation sets. Use the training set data to train the model. During training, use the YOLOX object detection loss function to optimize the model weights, the CIoU loss function to improve the accuracy and stability of object detection, and the stochastic gradient descent (SGD) optimization algorithm to improve the model convergence speed.
[0048] Step 5, Model Validation: Evaluate the performance of the trained YOLOX model using the validation set. Calculate the mean accuracy (mAP) of the object detection metric to measure the model's accuracy and performance.
[0049] Step 6, Model Inference and Recognition: The trained YOLOX model is used for inference and recognition. The test video is input into the model, and the predicted bounding boxes and categories are obtained through forward pass. Based on the model's output, the knee joint movements of the elderly are determined, and corresponding classification and recognition are performed.
[0050] Example 2
[0051] To improve the object detection performance, in step 2, model selection, a comparison and selection of YOLOX models is performed before model training.
[0052] Table 1 Comparison of Performance Parameters of YOLOX Model
[0053]
[0054] Because the hospital's usage scenario and specific needs need to be considered, the following are some suggested factors to consider:
[0055] 1. Real-time requirements: If fast, real-time knee joint motion recognition is required, it may be necessary to select a model with a smaller model size and a higher frame rate, such as YOLOX-s, to ensure that the system can respond quickly in a short time.
[0056] 2. Accuracy requirements: If high accuracy is required for knee joint movement recognition, consider choosing a model with a larger model size and higher accuracy, such as YOLOX-l.
[0057] 3. Equipment Resources: The hospital's equipment resources are also a factor to consider. If the hospital has limited equipment resources, it may be necessary to choose a model with a moderate model size, such as YOLOX-m, to balance performance and resource consumption.
[0058] 4. Dataset and pre-trained model: Consider whether the training dataset and pre-trained model are similar to the data in the hospital scenario to ensure that the model has good generalization ability in actual use.
[0059] Considering the current specific needs and resources of hospitals, and given the limited equipment resources, this invention selects YOLOX-s as the target detection model because it has a small model size and a high frame rate, making it suitable for scenarios requiring rapid response.
[0060] Then, the selected YOLOX-s improved SCP module
[0061] The YOLOX model's backbone employs a CBS, Focus, SCP, and SPP structure. The CBS consists of Conv+BN+Swish, while the CSP structure borrows from the SCPNet network structure, composed of convolutional layers and X residual components. Although the SCP module enhances the learning ability of CNNs, its receptive field remains limited by the size of the convolutional kernel, failing to capture pixel information outside the kernel. To improve YOLOX's target recognition accuracy, the network design considers not only accuracy and speed but also model effectiveness. Therefore, this invention improves the original SCP module by reducing backbone parameters and eliminating redundant gradient information during inference, thus enhancing the model's learning ability.
[0062] Depend on Figure 2 As can be seen, based on the residual structure of the original SCP module, a 1×1 convolution is added before each group of 3×3 convolutions in the output channel, reducing the number of output channels to half the number of input channels. The input feature map is processed by the 3×3 convolutional block residual structure, and the output feature map is processed and connected by 1×1 convolutional blocks. Ultimately, the output feature map and the input feature map have the same dimension. The improved module can add three residual blocks to the right of the new module to obtain the same receptive field as the SCP module. By modifying the SCP module in the YOLOX model, the number of network parameters is reduced, thereby improving the network's detection accuracy and inference speed.
[0063] In the YOLOX model, the parameters of the original SCP module mainly involve convolution operations, and their expression is:
[0064]
[0065] The improved expression for parameter calculation in this invention is as follows:
[0066]
[0067] In the formula: P represents the number of parameters calculated; I represents the number of layers in the network; C l-in C is the number of input channels in layer I; I_out is the number of output channels in layer I; K is the size of the convolution kernel.
[0068] As can be seen from equations (1) and (2), when the receptive field is the same, the computational cost of the improved structure is reduced by 36.2% compared with the original CSP module.
[0069] In step 2, parameter configuration, to avoid manually adjusting parameters and automatically find the optimal parameter combination during the deep learning model parameter configuration process, Bayesian optimization can be used. Bayesian optimization is a global optimization technique based on Bayes' theorem, used to optimize complex black-box functions, such as the performance metrics of deep learning models (e.g., accuracy, loss function). The detailed steps are as follows:
[0070] 1. Define the parameter space: First, the parameter space of the deep learning model needs to be defined. This includes the model architecture, hyperparameters (such as learning rate, batch size, number of hidden units, etc.), and other related parameters. Each parameter has a domain (the range of possible values), which will be the search space for Bayesian optimization.
[0071] 2. Choosing an Optimization Objective: In Bayesian optimization, the optimization objective needs to be explicitly defined. Typically, the objective is a performance metric of the deep learning model on the validation set, such as accuracy or the loss function value. The objective function will be a black-box function provided by the model training process.
[0072] 3. Constructing a surrogate model: Bayesian optimization uses a surrogate model (or surrogate function) to approximate the objective function. This invention uses a Gaussian process, which fits the objective function based on already evaluated parameter combinations and corresponding performance metrics, and is used to predict the performance of unevaluated parameter combinations. Gaussian Process surrogate model:
[0073]
[0074] Where f(x) is a surrogate model of the objective function, m(x) is the mean function, and k(x,x') is the covariance function.
[0075] 4. Sampling Strategy Design: In each round of optimization, Bayesian optimization selects the next parameter combination for evaluation based on the surrogate model and a specific sampling strategy. The sampling strategy aims to strike a balance between exploring unknown regions and finding the known optimal region, in order to find the global optimum as efficiently as possible. This invention uses the Expected Improvement (EI) sampling strategy:
[0076]
[0077] Among them, (x + () represents the currently known optimal combination of parameters. It is the standardized residue (i.e., the ratio of the difference between the residual mean and the known optimal value to the residual variance), and (Φ(Z)) and (φ(Z)) are the cumulative distribution function and probability density function of the standard normal distribution, respectively.
[0078] 5. Model Evaluation and Update: After selecting the next parameter combination, use this combination to train the deep learning model and evaluate its performance metrics on the validation set. Add the evaluation results to the known parameter-performance dataset, and then use this dataset to update the surrogate model's parameters to more accurately predict the objective function.
[0079] 6. Iterative Optimization: Repeat steps 4 and 5 until the predetermined number of optimization rounds is reached or the termination condition is met. In each round, the surrogate model gradually converges, and the Bayesian optimization gradually converges to the global optimum.
[0080] 7. Optimal Parameter Selection: During Bayesian optimization, the parameter combinations that achieve the best performance on the validation set are continuously recorded. Finally, the set of parameters with the best performance from these recorded parameter combinations is selected as the final configuration of the deep learning model.
[0081] Through the above steps, Bayesian optimization can find the optimal parameter combination within a finite number of iterations, avoiding the hassle of manually adjusting parameters. By continuously optimizing the surrogate model, Bayesian optimization gradually explores the parameter space and weighs the unknown region against the known optimal region, thereby efficiently finding the global optimum. This invention optimizes the following hyperparameters using Bayesian optimization:
[0082] ① The learning rate is a hyperparameter used in deep learning to control the magnitude of model weight updates, usually represented as α or η. The magnitude of the learning rate directly affects the training performance of the model.
[0083] ② Batch size is the number of samples used in each iteration when training a neural network.
[0084] ③Exponential Moving Average Decay is a commonly used optimization technique in deep learning. It is primarily used to smooth changes in weights within the model and reduce the volatility of weight updates, thereby making the model more stable. The formula for Exponential Moving Average Decay is as follows:
[0085] θ t+1 =βθ t +(1-β)θ t+1
[0086] Where, θ t Let θ represent the parameter values before the t-th iteration. t+1 This represents the parameter value after the t-th iteration, where β is the decay factor, typically ranging from 0.9 to 0.999. Moving average decay can improve the model's generalization ability and reduce the risk of overfitting.
[0087] Table 2. Bayesian optimization hyperparameter setting range and results
[0088]
[0089] Step 3, data augmentation, is a method of increasing data samples by transforming and expanding the original data, thereby improving the model's generalization ability and reducing the impact of overfitting. For the input requirements of the YOLOX model, the following are the data augmentation operations:
[0090] 1. Random Crop: Randomly cropping a region from an image as a training sample helps the model learn the features of the target in different locations.
[0091] 2. Random Flip: Randomly flip the image horizontally or vertically to increase the diversity of the data and enable the model to adapt to targets in different directions.
[0092] 3. Random Rotation: Randomly rotate the image to simulate the appearance of the target at different angles.
[0093] 4. Random Scale: Randomly scales the image so that the target can be correctly detected at different scales.
[0094] 5. Random Brightness and Contrast Adjustment: Randomly adjusts the brightness and contrast of the image, increasing the degree of variation in the image.
[0095] The above data augmentation helps increase the diversity of data samples, improve the robustness of the model, and thus achieve better detection performance during training.
[0096] Step 4: During model training, this invention divides the labeled dataset into a training set and a validation set. 70% of the data is used as the training set, and the remaining 30% as the validation set. This ensures that the model has sufficient samples to learn from during training and is validated on the validation set to assess its generalization ability.
[0097] For the YOLOX object detection model, this invention uses the YOLOX loss function to optimize the model's weights. YOLOX employs an improved version of the YOLO loss function called the CIOU loss function to improve detection performance.
[0098] The CIOU (Complete Intersection over Union) loss function is an improved version of the YOLO loss function used in YOLOX. It aims to address some of the shortcomings of the traditional YOLO loss function and improve the accuracy and stability of object detection. The CIOU loss function combines the Intersection over Union (IoU) and distance metrics, making the model more accurate during the detection process.
[0099] The main problem with the traditional YOLO loss function is that the IoU calculation becomes problematic when there is significant overlap between targets, leading to instability in the loss function. The CIOU loss function addresses this issue by considering the complete intersection-union ratio between targets and incorporating a distance metric.
[0100] The formula for the CIOU loss function is as follows:
[0101]
[0102] Wherein, IoU is the traditional Intersection over Union (IoU), which represents the area of the intersection between the predicted bounding box and the ground truth bounding box divided by the area of their union. 2 It is the square of the Euclidean distance between the center points of the predicted bounding box and the ground truth bounding box. 2 This is a parameter used to penalize differences in the size of the bounding box.
[0103] The advantage of the CIOU loss function lies in its consideration of not only positional matching between targets but also size matching, thus exhibiting better robustness when handling overlapping targets. It can better guide the model to learn more accurate bounding boxes, thereby improving the accuracy and stability of target detection.
[0104] To improve the convergence speed of the model, this invention can employ the stochastic gradient descent (SGD) optimization algorithm. SGD is a commonly used optimization algorithm that uses only the gradient of one sample each time the model's weights are updated, instead of using the average gradient of all samples, thus accelerating the model's convergence speed.
[0105] Stochastic Gradient Descent (SGD) is a commonly used optimization algorithm for training neural networks and other machine learning models. It is a first-order optimization algorithm that uses the gradient of only one sample each time the model parameters are updated, instead of using the average gradient of all samples. This makes SGD computationally inexpensive and efficient for optimizing large-scale datasets.
[0106] The formula for SGD is as follows:
[0107]
[0108] Where, θ t These are the parameters of the model at the $t$-th iteration. η is the learning rate, used to control the step size of each parameter update. It is a hyperparameter and needs to be set beforehand. A learning rate that is too large may cause parameter updates to be too drastic, while a learning rate that is too small may cause convergence to be too slow. J(θ) t ,x i ,y i ) is the loss function, representing the model's performance in terms of parameters θ. t For the training sample (x) i ,y i The prediction error is calculated by determining the gradient of the loss function with respect to the parameters. The goal of SGD is to minimize the loss function, thereby optimizing the model's parameters.
[0109] In SGD, at each iteration, this invention randomly selects a training sample (x). i ,yi The loss function and gradient are calculated, and then the model parameters are updated based on the direction of the gradient and the learning rate. This process is repeated multiple times on the entire training set until a predetermined number of training epochs are reached or the convergence condition is met.
[0110] In summary, the parameter allocation during model training is as follows:
[0111] - Training set: 70% of the labeled dataset
[0112] - Validation set: 30% of the labeled dataset
[0113] - Loss function: YOLOX's object detection loss function (CIOU loss function) is adopted.
[0114] - Optimization Algorithm: Stochastic Gradient Descent (SGD)
[0115] In step 5, the performance of the object detection model is evaluated using the mean precision (mAP). mAP is obtained by averaging the precision values at different confidence thresholds. The following are some relevant formulas:
[0116] 1. Precision:
[0117] Precision represents the proportion of samples that are actually positive out of all samples predicted as positive by the model.
[0118]
[0119] 2. Recall:
[0120] Recall represents the proportion of samples that the model successfully predicts as positive out of all samples that are actually positive.
[0121]
[0122] 3. F1 Score:
[0123] The F1 score is the harmonic mean of precision and recall, used to comprehensively consider the accuracy and comprehensiveness of the model.
[0124]
[0125] 4. Mean Precision (mAP):
[0126] mAP is the average of the accuracy values calculated at different confidence thresholds.
[0127] First, the model's predictions are sorted by confidence level. Then, by progressively increasing the confidence threshold, the precision value at each threshold is calculated, and the results are plotted as a precision-recall curve. Figure 3 The figure shows the area under the curve, i.e., mAP.
[0128] Step 6 uses a trained YOLOX model for inference and recognition. The process for classifying and recognizing knee joint movements in the elderly is as follows:
[0129] 1. Input test video: Input the test video into the YOLOX model, and obtain the predicted bounding box and category through forward pass.
[0130] 2. Determine the posture of the person: First, based on the target box and category output by the model, determine whether the elderly person is lying down or standing.
[0131] 3. Supine Leg Raise Test: If the character is determined to be in a supine position, proceed to the supine leg raise test stage.
[0132] 4. Set a height threshold: Based on the testing requirements, set a height threshold for raising the leg. This threshold is used to determine the effectiveness of raising the leg.
[0133] 5. Leg Raise Count Calculation: During the supine leg raise test, the knee joint movement is identified based on the target bounding box information output by the model. The number of effective leg raises is counted by monitoring the height of the knee joint.
[0134] By combining the above steps, a trained YOLOX model can be used to classify and identify knee joint movements in the elderly in real time. For elderly people in a supine position, the effectiveness of leg raises can be determined by setting a height threshold, and the number of leg raises can be counted to assess the knee joint movement status.
[0135] When performing tests in a standing position, follow these steps:
[0136] 1. Calibration Area: Within the test area, relevant areas are calibrated to limit the test range and ensure the consistency and repeatability of the test.
[0137] 2. Testing: Once the person enters the test area, timing begins. The walking speed of the person on the uneven road is calculated using the video frame rate and the number of frames in which the person is detected. Simultaneously, the time for squatting and the time for going up and down stairs are recorded.
[0138] Walking speed calculation formula:
[0139] Walking speed = Time taken / Distance traveled
[0140] Walking distance: Measure the total distance a person walks within the test area, which is also the actual distance of the defined area.
[0141] Time taken: Calculated by dividing the number of frames of human movement detected by the video frame rate.
[0142] At the same time, the time for squatting and the time for going up and down stairs were recorded.
[0143] Squatting time calculation: Record the time required for a person to complete one squat, which is recorded directly during the test.
[0144] Calculation of time for going up and down stairs: Record the time required for the person to complete the action of going up and down stairs, which is also recorded directly in the test.
[0145] It's important to note that walking speed is typically measured in distance per unit time (e.g., meters per second), while squatting time and time spent climbing stairs are measured in seconds. A person's mobility and performance can be assessed by calculating their walking speed, squatting time, and time spent climbing stairs.
[0146] 3. Calculating walking speed: By analyzing the video frame rate and the number of frames in which the person is detected, the walking speed of the person on uneven roads can be calculated. The speed can be obtained by dividing the total distance the person walks within the area by the total time.
[0147] 4. Calculate squatting time: For the squatting action, the time required for a person to complete one squat can be calculated. The squatting action can be set according to a preset squatting height threshold. When the squatting height meets the set threshold, the completion time is recorded.
[0148] 5. Calculate the time for going up and down stairs: For going up and down stairs, calculate the total time of the action, that is, the time from the start of stepping onto the stairs to the completion of stepping down.
[0149] Through the above steps, we can test a person's ability to walk on uneven roads, squat, and climb stairs while standing, and calculate the corresponding speed and completion time, thereby assessing and analyzing the mobility of the elderly.
[0150] Example 3
[0151] When applying the knee joint movement recognition method for the elderly population of this invention, the optimized YOLOX model is deployed to the Windows platform to achieve automatic knee joint movement recognition for the elderly population. In MATLAB, a standalone executable file is designed and developed using the MATLAB app to facilitate user operation on the Windows platform. The general steps are as follows:
[0152] 1. Develop a MATLAB app: Use the MATLAB app Designer to design and develop a user interface that is user-friendly and easy to use.
[0153] 2. Integrate the YOLOX model: Integrate the optimized YOLOX model into the MATLAB app for knee joint motion recognition.
[0154] 3. Compile into a standalone executable: Compile the developed MATLAB app into a standalone executable file (exe), allowing users to run the application directly on the Windows platform without installing the MATLAB environment.
[0155] 4. Testing and optimization: such as Figure 4 The system was tested on the Windows platform to ensure that real-time performance and accuracy met requirements. Necessary optimizations and adjustments were made based on the test results.
Claims
1. A method of recognizing a knee joint motion of an elderly person, characterized by, The method comprises the following steps: Step 1, collecting video or image data of knee joint action of the elderly and labeling; Step 2, selecting an improved YOLOX-s as a target detection model and adopting a Bayesian optimization method to configure parameters of the YOLOX-s model; wherein a parameter expression of an SCP module in the improved YOLOX-s model is: In the formula, P is a parameter calculation amount; I is the number of layers of the network; is I is the number of input channels in the layer; is I is the number of output channels in the layer; K is the size of the convolution kernel; The specific steps of configuring the parameters of the YOLOX-s model by adopting the Bayesian optimization method are: Step 2.1, defining a parameter space, including three hyperparameters of a learning rate, a batch size and a sliding average attenuation of the YOLOX-s model, each parameter has a defined domain, that is, a value range, and the defined domain will be a search space of the Bayesian optimization; Step 2.2, selecting an accuracy or a loss function value as an optimization target; Step 2.3, constructing a Gaussian process proxy model to approximate the target function; Step 2.4, selecting Expected Improvement as a sampling strategy; Step 2.5, selecting a next parameter combination for evaluation according to the proxy model and the sampling strategy, using the current parameter combination to train the YOLOX-s model, evaluating performance indicators of the YOLOX-s model on a validation set, adding the evaluation result to a known parameter-performance dataset, and then updating parameters of the proxy model by using the parameter-performance dataset; Step 2.6, repeating step 2.5 until a predetermined optimization round is reached or a termination condition is met; Step 2.7, taking the parameter combination with the optimal performance as a final configuration of the YOLOX-s model; Step 3, preprocessing the data obtained in step 1; Step 4, the data obtained in step 3 is divided into a training set and a validation set, the training set is input into the YOLOX model obtained in step 2 for training of the model; the CIOU loss function is used to optimize the weight of the YOLOX model, and the SGD optimization algorithm is used to optimize the parameters of the YOLOX model, and a training sample is randomly selected each time The loss function and the gradient are calculated, and then the YOLOX model parameters are updated according to the direction of the gradient and the learning rate, and multiple iterations are performed on the entire training set until a predetermined training round is reached or a convergence condition is reached; Step 5, evaluating the performance of the trained YOLOX model by using the validation set in step 4, if the performance of the YOLOX model meets the requirements, entering step 6, otherwise returning to step 2; Step 6, using the YOLOX model obtained in step 5 to judge the knee joint action of the elderly and performing corresponding classification and identification; The method comprises the following specific steps: Step 6.1, inputting the knee joint action video into the YOLOX model to obtain a predicted target frame and a category through forward transmission; Step 6.2, judging whether the elderly is lying or standing according to the target frame and the category output by the YOLOX model, if the elderly is in a lying posture, entering a lying leg lifting test stage of step 6.3, if the elderly is in a standing posture, entering a standing action test stage of step 6.4; Step 6.3, setting a leg lifting height threshold to judge the effectiveness of leg lifting, and counting the number of effective leg lifting to evaluate the knee joint movement condition; Step 6.4, calibrating a test area, starting timing when a person enters the test area, calculating the speed of the person walking on uneven roads by using a video frame rate and the number of frames of the detected person, and recording the time of squatting action and the time of ascending and descending stairs to evaluate the knee joint action ability.
2. The method of claim 1, wherein the knee joint motion of the elderly group is identified. The knee joint action video or image data collected in step 1 involves elderly people of different ages, body types and actions, and the knee joint action in the data is labeled as two labels of standing and lying by using a rectangular frame labeling method.
3. The method of claim 1, wherein the knee joint motion of the elderly group is identified by using a knee joint motion recognition model trained by using a knee joint motion of the elderly group. The preprocessing in step 3 includes image normalization and data augmentation, and the data augmentation includes random cropping, random flipping, random rotation, random scaling, and random brightness and contrast adjustment.
4. The method of claim 1, wherein the knee joint motion of the elderly group is identified. In step 4, the data obtained in step 3 is divided into a training set of 70% and a validation set of 30%.
5. The method of claim 1, wherein the knee joint motion of the elderly is recognized by using a plurality of sensors attached to the knee joint of the elderly. In step 5, when evaluating the performance of the trained YOLOX model, the average precision mean is used as the index, that is, the precision values at different confidence thresholds are calculated and averaged.
Citation Information
Patent Citations
Knee joint rehabilitation action recognition method and system
CN113869142A