Upper limb rehabilitation training compensation identification method and device, terminal and medium
By identifying people and robots in video data, processing and detecting joint information in frame, and judging compensatory behaviors in upper limb rehabilitation training, it solves the problem of lack of compensation recognition in the existing system and realizes real-time correction and rehabilitation of patient postures. Improvement of effect.
Patent Information
- Application Number
- CN202410694838.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-09-27
AI Technical Summary
The existing upper limb rehabilitation training system lacks the compensatory behavior recognition function, resulting in poor rehabilitation results and real-time and efficiency problems. In particular, it is difficult to accurately identify a single person's posture and cannot effectively correct the patient's incorrect posture and compensatory movements.
By identifying the person and the robot in the video data, and then filtering out the person sitting next to the robot after frame processing, detecting their joint information, calculating the angle formed by the main torso and the thigh plane, determining whether compensatory behavior has occurred, and training according to the training mode Adjust robot parameters to correct motion.
It realizes real-time identification and correction of compensatory behaviors in upper limb rehabilitation training, improves the rehabilitation effect, and is suitable for rehabilitation treatment of patients with stroke and nerve damage.
Smart Images

Figure CN118711244A
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of rehabilitation therapy, and in particular to a method, device, terminal and medium for identifying compensation in upper limb rehabilitation training. Background Art
[0002] Patients (stroke, etc.) who use upper limb rehabilitation training robots often take incorrect postures or compensatory movements during rehabilitation training due to muscle weakness, nerve damage, or motor control disorders. Compensation will greatly affect the rehabilitation effect of the affected side of the patient and even increase the patient's risk. It is of great significance to correctly evaluate compensation and inhibit it. Therefore, a method that can monitor and identify patient postures in real time is needed to provide immediate feedback and guidance.
[0003] Although there are many upper limb rehabilitation training systems on the market, none of them has compensation recognition function.
[0004] The current methods for evaluating physical compensation in rehabilitation departments mostly rely on subjective judgments in the treatment room, and are not very real-time and efficient. Some studies use uncalibrated binocular vision cameras to collect motion data, and use open source human posture estimation models (such as openpose, etc.) to implement posture modeling and compensation judgment. Among them, binocular cameras are relatively expensive, and open source posture estimation models such as openpose are multi-person detections, which makes it difficult to filter out other people, and it is impossible to directly implement single-person posture estimation of the current training patient with a small amount of data fine-tuning (few-tuning). Summary of the invention
[0005] The present application provides a method, device, terminal and medium for identifying compensation in upper limb rehabilitation training, which has the advantage of being able to effectively identify whether a user of a rehabilitation training robot has exhibited compensatory behavior, thereby facilitating the guidance of rehabilitation treatment.
[0006] The technical solution of this application is as follows:
[0007] On the one hand, the present application provides a method for identifying compensation in upper limb rehabilitation training, comprising the following steps:
[0008] S1: Posture collection: collect the patient's upper limb posture in real time to obtain video data;
[0009] S2: Identify humans and robots in video data;
[0010] S3: In the recognition result of step S2, the people and robots whose detection boxes iou are larger than the threshold are framed together;
[0011] S4: select the person sitting next to the robot from the results of step S3 as the target patient and perform joint detection on the person;
[0012] S5: Calculate the angle formed by the target patient's main trunk and thigh plane according to the target patient's joint information;
[0013] S6: Compare the angle angle with a preset threshold value, and determine that compensation occurs when the angle angle is smaller than the threshold value.
[0014] Through the above scheme, this application first identifies the person and the robot, then frames the results, and finally identifies the person sitting next to the robot, thereby realizing the recognition of the target patient. After identifying the target patient, the joints of the target patient are detected, and the coordinates of the key points of the skeleton are estimated by posture to calculate the angle formed by the main trunk and the thigh plane, and the compensation threshold is compared to judge the compensatory behavior of the patient's upper limb rehabilitation training, thereby realizing the recognition of compensatory behavior.
[0015] Furthermore, in step S2, an open set-based object detection model is used to respectively identify humans and robots in the video data.
[0016] Furthermore, in step S3, in the recognition result of step S2, the iou of all detection frames between the two categories of human and robot is calculated, and the detection frames of human and robot whose iou is greater than the threshold are merged by calculating the maximum circumscribed rectangle as the target to be detected.
[0017] Furthermore, in step S4, the visual language pre-training model is used to screen out the person sitting next to the robot from the targets to be detected.
[0018] Furthermore, in step S4, in the step of performing joint detection on the target patient, at least the shoulder joint, hip joint and knee joint of the target patient are detected.
[0019] Further, in step S5, according to the joint information of the target patient, the normal vectors N1 and N2 of the plane where the shoulder joint and hip joint of the target patient are located and the normal vectors N1 and N2 of the plane where the knee joint and hip joint of the target patient are located are respectively obtained, and the angle between the vectors N1 and N2 is obtained according to the arc cosine, which is the angle angle
[0020] value=Cos(angle)=dot_product(N1,N2) / (Norm(N1)*Norm(N2))
[0021] angle=arccos(value).
[0022] Furthermore, the method further includes step S7: after determining that compensation occurs, visual prompts and voice prompts are issued to the patient and / or therapist, and the robot training parameters are adjusted according to the current training mode. The robot training parameter adjustment method is as follows:
[0023] When it is determined that compensation occurs and the robot is currently in active mode, no parameter adjustment is made;
[0024] When it is determined that compensation occurs and the current mode of the robot is passive mode, the passive speed is reduced by 20% and the stiffness gain is reduced by 20%;
[0025] When it is determined that compensation occurs and the robot is currently in power-assist mode, the guiding force percentage is reduced by 20% and the stiffness gain is reduced by 20%;
[0026] When it is determined that compensation occurs and the current mode of the robot is resistance mode, the resistance percentage is reduced by 20% and the stiffness gain is reduced by 20%.
[0027] Through the above scheme, the present application can improve the rehabilitation effect by timely correcting the compensatory action through visual prompts when compensation occurs.
[0028] In another aspect, the present application provides an upper limb rehabilitation training compensation identification device, comprising:
[0029] A posture acquisition unit is used to acquire the patient's upper limb posture in real time and obtain video data;
[0030] A first detection unit, used to respectively identify a person and a robot in the video data;
[0031] An image processing unit, configured to combine the human and robot whose detection boxes iou are larger than a threshold in the output result of the first detection unit;
[0032] The second detection unit is used to select the person sitting next to the robot from the targets to be detected and record it as a target patient and perform joint detection on the person;
[0033] a judgment unit, used to calculate the angle angle formed by the target patient's main trunk and the thigh plane from the target patient's joint data detected by the second detection unit, compare the angle angle with a preset threshold, and judge that compensation occurs when the angle angle is less than the threshold;
[0034] The output unit is used to output visual prompts, voice prompts and control signals when the judgment unit judges that compensation occurs.
[0035] On the other hand, the present application provides an electronic terminal, including a memory and a processor; wherein the memory stores a computer program, and when the program is executed by the processor, it can implement the upper limb rehabilitation training compensation identification method as described above.
[0036] On the other hand, the present application provides a computer-readable medium having a computer program stored thereon, and when the computer program is executed by a processor, the above-mentioned upper limb rehabilitation training compensation identification method is implemented.
[0037] In summary, the beneficial effects of this application are:
[0038] 1. This application first identifies the person and the robot, then frames the results, and finally identifies the person sitting next to the robot, thereby achieving the identification of the target patient;
[0039] 2. After identifying the target patient, detect the target patient's joints, estimate the coordinates of the key points of the skeleton through posture, calculate the angle between the main trunk and the thigh plane, and compare the compensation threshold to determine the patient's compensatory behavior in upper limb rehabilitation training, thereby realizing compensatory behavior recognition;
[0040] 3. This application can improve the rehabilitation effect by timely correcting the compensatory action through visual prompts when compensation occurs;
[0041] 4. This application can be widely used in the field of rehabilitation medicine, especially for patients who need upper limb rehabilitation training such as stroke rehabilitation and nerve injury rehabilitation. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 This is a schematic diagram of the system composition of the upper limb rehabilitation training compensation identification system in a specific embodiment of the present application. Figure 1 ;
[0043] Figure 2 This is a schematic diagram of the system composition of the upper limb rehabilitation training compensation identification system in a specific embodiment of the present application. Figure 2 ;
[0044] Figure 3 It is a schematic diagram of the key points of the human body posture skeleton;
[0045] Figure 4 It is a flowchart of steps S2-S4 of the upper limb rehabilitation training compensation identification method in a specific implementation of the present application. DETAILED DESCRIPTION
[0046] The specific implementation of the present application is described in detail below with reference to the accompanying drawings.
[0047] Embodiment: On the one hand, a specific embodiment of the present application provides an upper limb rehabilitation training compensation identification method. In the specific application scenario of this embodiment, the method is applied to an upper limb rehabilitation training compensation identification system. The system composition is as follows: Figure 1-2 As shown, it includes a display trolley, a PC host, a USB3.0 interface, a monocular camera, and a robot trolley.
[0048] The upper limb rehabilitation training compensation identification method comprises the following steps:
[0049] S1: Posture acquisition: real-time acquisition of the patient's upper limb posture to obtain video data; specifically, a monocular camera is used to collect and monitor the patient's upper limb posture in real time, and the video stream is stored.
[0050] S2: Identify people and robots in video data; specifically, use an open set based object detection model to separately identify people and robots in video data.
[0051] The video stream data obtained by the monocular camera is transmitted to the PC host via USB communication. Steps S2-S7 are implemented in the PC host. The display (including the speaker device) in the display trolley is used to output visual prompts and voice prompts. In step S2, the open-set-based detection model GroundingDino (Marrying DINO with Grounded Pre-Training for Open-Set Object Detection) is used to detect people and robots. The prompt of GroundingDino is set to 'person.robot.'. With the help of GroundingDino, all people and robots in the picture are detected.
[0052] S3: In the recognition result of step S2, the detection frames of people and robots whose iou is greater than the threshold are merged into one frame; specifically, in the recognition result of step S2, the iou (intersection over union) of all detection frames between the two categories of people and robots is calculated, and the detection frames of people and robots whose iou is greater than the threshold are merged into one frame by calculating the maximum circumscribed rectangle, as the target to be detected.
[0053] S4: The person sitting next to the robot is selected from the results of step S3 and recorded as the target patient and joint detection is performed on the person. The person sitting next to the robot is selected from the targets to be detected using the visual language pre-training model. In the step of performing joint detection on the target patient, at least the shoulder joint, hip joint and knee joint of the target patient are detected.
[0054] The person sitting next to the robot is recognized through the visual language pre-training model BLIP (Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation). The input of BLIP-VQA includes the cropped image after framing, and a prompt "Is this person sitting next to a robot?". When the output is yes, the current training patient to be tested is selected as the target of subsequent posture detection; then the YOLOV8 model is used to detect the human skeleton joints in the area within the frame, and the detection results are saved in a json file. The posture skeleton key points use 17 keypoints, and the human key point modeling is as follows: Figure 3shown.
[0055] The 17 keypoints detected by the YOLOV8 model are as follows:
[0056] keypoints={0:'nose',1:'left_eye',2:'right_eye',3:'left_ear',4:'right_ear',
[0057] 5:'left_shoulder',6:'right_shoulder',7:'left_elbow',8:'right_elbow',
[0058] 9:'left_wrist',10:'right_wrist',11:'left_hip',12:'right_hip',
[0059] 13:'left_knee',14:'right_knee',15:'left_ankle',16:'right_ankle'}
[0060] The overall process of steps S2-S4 is as follows Figure 4 shown.
[0061] S5: Calculate the angle formed by the target patient's main trunk and thigh plane according to the target patient's joint information.
[0062] According to the joint information of the target patient, the normal vectors N1 and N2 of the plane where the shoulder joint and hip joint of the target patient are located and the normal vectors N1 and N2 of the plane where the knee joint and hip joint of the target patient are located are obtained respectively. The angle between the vectors N1 and N2 is obtained by the arc cosine, which is the angle angle
[0063] value=Cos(angle)=dot_product(N1,N2) / (Norm(N1)*Norm(N2))
[0064] angle=arccos(value)
[0065] In this embodiment, among the 17 keypoints mentioned above, P1 is denoted as left_shoulder, P2 is denoted as left_hip, P3 is denoted as right_hip, and P4 is denoted as left_knee;
[0066] V1=P2-P1; V2=P3-P1; V3=P3-P4; V4=P2-P4;
[0067] The normal vectors N1 and N2 of the plane where the shoulder joint and hip joint of the target patient are located and the plane where the knee joint and hip joint are located are:
[0068] N1=V1×V2;
[0069] N2=V3×V4;
[0070] According to the vector dot product:
[0071] value=Cos(angle)=dot_product(N1,N2) / (Norm(N1)*Norm(N2));
[0072] According to the arccosine formula, the angle angle = arccos(value) can be calculated.
[0073] S6: Compare the angle angle with a preset threshold value, and determine that compensation occurs when the angle angle is less than the threshold value, in the following form:
[0074] if(angle <threshold)bComp=1;
[0075] else bComp = 0;
[0076] Threshold is the preset threshold, that is, the compensation threshold.
[0077] Step S7: After determining that compensation has occurred, visual and voice prompts are issued to the patient and / or therapist, and the robot training parameters are adjusted according to the current training mode, as shown in the following table. The robot training parameter adjustment method is as follows:
[0078]
[0079] When it is determined that compensation occurs and the robot is currently in active mode, no parameter adjustment is made;
[0080] When it is determined that compensation occurs and the current mode of the robot is passive mode, the passive speed is reduced by 20% and the stiffness gain is reduced by 20%;
[0081] When it is determined that compensation occurs and the robot is currently in power-assist mode, the guiding force percentage is reduced by 20% and the stiffness gain is reduced by 20%;
[0082] When it is determined that compensation occurs and the current mode of the robot is resistance mode, the resistance percentage is reduced by 20% and the stiffness gain is reduced by 20%.
[0083] In another specific embodiment of the present application, a compensation identification device for upper limb rehabilitation training is provided, comprising:
[0084] A posture acquisition unit is used to acquire the patient's upper limb posture in real time and obtain video data;
[0085] A first detection unit, used to respectively identify a person and a robot in the video data;
[0086] An image processing unit, configured to combine the human and robot whose detection boxes iou are larger than a threshold in the output result of the first detection unit;
[0087] The second detection unit is used to select the person sitting next to the robot from the targets to be detected and record it as a target patient and perform joint detection on the person;
[0088] a judgment unit, used to calculate the angle angle formed by the target patient's main trunk and the thigh plane from the target patient's joint data detected by the second detection unit, compare the angle angle with a preset threshold, and judge that compensation occurs when the angle angle is less than the threshold;
[0089] The output unit is used to output visual prompts, voice prompts and control signals when the judgment unit judges that compensation occurs.
[0090] In another specific embodiment of the present application, an electronic terminal is provided, including a memory and a processor; wherein the memory stores a computer program, and when the program is executed by the processor, the above-mentioned upper limb rehabilitation training compensation identification method can be implemented.
[0091] In another specific embodiment of the present application, a computer-readable medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned upper limb rehabilitation training compensation identification method is implemented.
[0092] The above is only a preferred implementation of the present application. It should be pointed out that a person skilled in the art can make several modifications and improvements without departing from the inventive concept of the present application, and these all fall within the scope of protection of the present application.
Claims
1. A method for identifying compensation in upper limb rehabilitation training, characterized in that: The following steps are involved: S1: Posture collection: collect the patient's upper limb posture in real time to obtain video data; S2: Identify humans and robots in video data; S3: In the recognition result of step S2, the people and robots whose detection boxes iou are larger than the threshold are framed together; S4: select the person sitting next to the robot from the results of step S3 as the target patient and perform joint detection on the person; S5: Calculate the angle formed by the target patient's main trunk and thigh plane according to the target patient's joint information; S6: Compare the angle angle with a preset threshold value, and determine that compensation occurs when the angle angle is smaller than the threshold value.
2. The upper limb rehabilitation training compensation identification method according to claim 1, characterized in that: In step S2, an open set-based object detection model is used to respectively identify humans and robots in the video data.
3. The upper limb rehabilitation training compensation identification method according to claim 1, characterized in that: In step S3, in the recognition result of step S2, the iou of all detection frames between the two categories of human and robot is calculated, and the detection frames of human and robot whose iou is greater than the threshold are merged by finding the maximum circumscribed rectangle as the target to be detected.
4. The upper limb rehabilitation training compensation identification method according to claim 3, characterized in that: In step S4, the visual language pre-training model is used to screen out the person sitting next to the robot from the targets to be detected.
5. The upper limb rehabilitation training compensation identification method according to claim 1, characterized in that: In step S4, in the step of performing joint detection on the target patient, at least the shoulder joint, hip joint and knee joint of the target patient are detected.
6. The upper limb rehabilitation training compensation identification method according to claim 1, characterized in that: In step S5, according to the joint information of the target patient, the normal vectors N1 and N2 of the plane where the shoulder joint and hip joint of the target patient are located and the normal vectors N1 and N2 of the plane where the knee joint and hip joint of the target patient are located are obtained respectively, and the angle between the vectors N1 and N2 is obtained according to the arc cosine, which is the angle angle value=Cos(angle)=dot_product(N1,N2) / (Norm(N1)*Norm(N2)) angle=arccos(value).
7. The upper limb rehabilitation training compensation identification method according to any one of claims 1 to 6, characterized in that: The method further includes step S7: after determining that compensation occurs, visual prompts and voice prompts are sent to the patient and / or therapist, and the robot training parameters are adjusted according to the current training mode. The robot training parameter adjustment method is as follows: When it is determined that compensation occurs and the robot is currently in active mode, no parameter adjustment is made; When it is determined that compensation occurs and the current mode of the robot is passive mode, the passive speed is reduced by 20% and the stiffness gain is reduced by 20%; When it is determined that compensation occurs and the robot is currently in power-assist mode, the guiding force percentage is reduced by 20% and the stiffness gain is reduced by 20%; When it is determined that compensation occurs and the current mode of the robot is resistance mode, the resistance percentage is reduced by 20% and the stiffness gain is reduced by 20%.
8. An upper limb rehabilitation training compensation identification device, characterized in that: include: A posture acquisition unit is used to acquire the patient's upper limb posture in real time and obtain video data; A first detection unit, used to respectively identify a person and a robot in the video data; An image processing unit, configured to combine the human and robot whose detection boxes iou are larger than a threshold in the output result of the first detection unit; The second detection unit is used to select the person sitting next to the robot from the targets to be detected and record it as a target patient and perform joint detection on the person; a judgment unit, used to calculate the angle angle formed by the target patient's main trunk and the thigh plane from the target patient's joint data detected by the second detection unit, compare the angle angle with a preset threshold, and judge that compensation occurs when the angle angle is less than the threshold; The output unit is used to output visual prompts, voice prompts and control signals when the judgment unit judges that compensation occurs.
9. An electronic terminal, characterized in that: It comprises a memory and a processor; wherein the memory stores a computer program, and when the program is executed by the processor, it can implement the upper limb rehabilitation training compensation identification method as described in any one of claims 1-7.
10. A computer-readable medium, characterized in that A computer program is stored thereon, and when the computer program is executed by a processor, the upper limb rehabilitation training compensation identification method as described in any one of claims 1-7 is implemented.
Citation Information
Cited By
Muscle-bone rehabilitation posture motion analysis system based on visual identification
CN121687384A
