IntroductionCompensatory movements usually occur in stroke survivors with hemiplegia, which is detrimental to recovery. This paper proposes a compensatory movement detection method based on near-infrared spectroscopy (NIRS) technology and verifies its feasibility using a machine learning algorithm. We present a differential-based signal improvement (DBSI) method to enhance NIRS signal quality and discuss its effect on improving detection performance.MethodTen healthy subjects and six stroke survivors performed three common rehabilitation training tasks while the activation of six trunk muscles was recorded using NIRS sensors. After data preprocessing, DBSI was applied to the NIRS signals, and two time-domain features (mean and variance) were extracted. An SVM algorithm was used to test the effect of the NIRS signal on compensatory behavior detection.ResultsClassification results show that NIRS signals have good performance in compensatory detection, with accuracy rates of 97.76% in healthy subjects and 97.95% in stroke survivors. After using the DBSI method, the accuracy improved to 98.52% and 99.47%, respectively.DiscussionCompared with other compensatory motion detection methods, our proposed method based on NIRS technology has better classification performance. The study highlights the potential of NIRS technology for improving stroke rehabilitation and warrants further investigation.