Ankylosing spondylitis rehabilitation evaluation method based on posture recognition

By preprocessing and semantic optical flow analysis of spinal video frames using a deep network model, the problem of insufficient accuracy of dynamic activities of spinal segments in existing rehabilitation assessment methods is solved, and high-precision rehabilitation assessment and personalized training programs are realized.

CN121885176APending Publication Date: 2026-04-17YANGZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
YANGZHOU UNIV
Filing Date
2025-12-05
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing rehabilitation assessment methods are insufficient to continuously reflect the dynamic activity of multiple spinal segments, and in the context of ankylosing spondylitis rehabilitation, there is a lack of targeted treatment for the local range of motion, overall postural deviation, and continuous sequence changes of spinal segments.

Method used

A deep network model is used to preprocess continuous motion video frames to generate visual features and semantic optical flow of the spinal region. Combined with the spinal structure deviation matrix, the key points of the spine are accurately located and the posture is analyzed to generate rehabilitation assessment indicators.

Benefits of technology

It achieves high-precision spinal posture monitoring and rehabilitation assessment, quantifies the dynamic changes of each segment and the overall posture deviation, provides personalized rehabilitation training programs, and improves the accuracy and reliability of the rehabilitation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121885176A_ABST
    Figure CN121885176A_ABST
Patent Text Reader

Abstract

The invention discloses an ankylosing spondylitis rehabilitation evaluation method based on posture recognition, and relates to the technical field of human body posture recognition, and the method comprises the steps: collecting and processing continuous video frames in the rehabilitation training process of a patient, and extracting spine key point information through a deep learning model; according to the method, the rehabilitation progress of a patient is calculated and evaluated by analyzing the activity range and posture deviation of each spine segment and combining preset rehabilitation target parameters and historical rehabilitation data. Through the combination of the time sequence characteristics and the spine structure offset matrix, the dynamic change of the spine can be accurately tracked, the weight is distributed for each spine segment, and segment activity range improvement and overall posture deviation improvement indexes are generated. And outputting a rehabilitation evaluation result according to a weighted result, and providing data support for a treatment scheme. Compared with a traditional assessment mode, the method can provide more accurate and dynamic rehabilitation effect assessment, and is suitable for assessment and adjustment of different patients and different rehabilitation stages.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of human posture recognition technology, and in particular to a method for rehabilitation assessment of ankylosing spondylitis based on posture recognition. Background Technology

[0002] Ankylosing spondylitis is a chronic inflammatory disease that primarily affects the spinal joints. As the disease progresses, patients are prone to spinal stiffness, limited segmental mobility, and postural abnormalities. Therefore, spinal activity monitoring and posture assessment during rehabilitation training are crucial for evaluating rehabilitation quality and optimizing training methods. Current rehabilitation assessment methods largely rely on physician observation, manual measurement, or simple angle-based instrument recording, which struggles to continuously reflect the dynamic activity of multiple spinal segments and to provide fine-grained quantification of overall and localized spinal posture changes during different rehabilitation movements. With the development of computer vision technology, RGB video-based human posture recognition methods are increasingly being applied to motion analysis and rehabilitation assistance. However, existing methods typically focus on coarse-grained key point localization of the entire skeletal structure, lacking sufficient ability to subdivide spinal segments, and lacking specific handling of continuous posture changes, segmental coupled movements, and individual differences in spinal structure. Especially in the context of ankylosing spondylitis rehabilitation, the local range of motion of spinal segments, overall posture deviation, and continuous sequence changes are more critical, and existing general-purpose posture recognition methods cannot directly meet these needs. Summary of the Invention

[0003] In view of the aforementioned existing problems, the present invention is proposed.

[0004] Therefore, this invention provides a posture recognition-based rehabilitation assessment method for ankylosing spondylitis to address the problems of insufficient accuracy in spinal key point localization, weak temporal analysis capability of motion state, and insufficient handling of structural deviation differences in existing ankylosing spondylitis rehabilitation assessments in terms of spinal posture monitoring, spinal motion state analysis, and rehabilitation effect evaluation.

[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides a rehabilitation assessment method for ankylosing spondylitis based on posture recognition, which includes: acquiring continuous motion video frames of the patient during rehabilitation training, and preprocessing the continuous video frames to generate a current frame and adjacent frame pair of the spinal region of interest. Input the current frame into the deep network model to generate visual features of the spine region and output the initial values ​​of the spine keypoints and the confidence scores of the spine keypoints. A spinal region mask is constructed based on the confidence of spinal key points, and a pixel-level displacement field is calculated by combining adjacent frame pairs to form spinal semantic optical flow, and the spinal semantic optical flow is encoded as temporal features. The spinal structure deviation is calculated based on the initial values ​​of the key points of the spine and the preset spinal structure template, and a spinal structure bias matrix is ​​generated based on the structural deviation. Inference is performed based on visual features, temporal features, and the spinal structure bias matrix, and the predicted coordinates of spinal key points are generated through feature interaction. Rehabilitation assessment indicators are extracted from the spinal posture sequence, and these indicators are compared with preset rehabilitation target parameters and historical rehabilitation assessment records to output the rehabilitation assessment results for ankylosing spondylitis.

[0006] As a preferred embodiment of the posture recognition-based ankylosing spondylitis rehabilitation assessment method of the present invention, the generation of the current frame and adjacent frame pairs of the spinal region of interest includes: correcting the brightness and color of continuous video frames; converting the corrected video frames to a uniform size to obtain a preprocessed video frame sequence; identifying the spinal position of the preprocessed video frame sequence through a spinal region detection module; cropping the spinal region of interest image based on the spinal position identification result; and extracting adjacent frames from the cropped image sequence to form adjacent frame pairs based on time sequence.

[0007] As a preferred embodiment of the posture recognition-based rehabilitation assessment method for ankylosing spondylitis described in this invention, the key points of the spine include the occipital point, the representative points of the cervical vertebrae, the representative points of the thoracic vertebrae, the representative points of the lumbar vertebrae, the sacral point, and the left and right pelvic points. The process of generating visual features of the spinal region includes inputting the current frame of the spinal region of interest into a deep network model to obtain visual features of the spinal region, locating the corresponding response region for each spinal key point in the visual features of the spinal region, determining the initial value of the corresponding spinal key point based on the maximum response position of the response region, and generating the confidence level of the spinal key point based on the intensity distribution of the response region.

[0008] As a preferred embodiment of the posture recognition-based ankylosing spondylitis rehabilitation assessment method of the present invention, wherein: the formation of spinal semantic optical flow includes performing numerical calculation based on the position of each pixel in the current frame and the position of the initial value of the spinal key point, and generating a pixel response value for each pixel using the confidence of the spinal key point as a weighting factor. A threshold filtering is performed on the pixel response values. Pixels that meet the threshold conditions are marked as spine region pixels, and pixels that do not meet the threshold conditions are marked as non-spine region pixels, thus forming a spine region mask. The brightness of corresponding pixels in the current frame of the spine region of interest is compared with that in adjacent frames of the spine region of interest. The pixel movement direction corresponding to the brightness change is recorded, and the pixel movement direction is smoothed to generate pixel displacement information. The spine region mask and pixel displacement information are overlaid pixel by pixel. The pixel displacement information of pixels belonging to the spine region is preserved, while the pixel displacement information of pixels belonging to non-spine region is suppressed to generate the spine semantic optical flow. The pixel displacement amplitude in the spine semantic optical flow is statistically processed, and the statistical results are combined into temporal features.

[0009] As a preferred embodiment of the posture recognition-based ankylosing spondylitis rehabilitation assessment method of the present invention, wherein: the generation of the spinal structure bias matrix includes constructing a spinal segment sequence in order from top to bottom based on the initial values ​​of the spinal key points, and each spinal segment corresponds to the spatial connection between adjacent spinal key points. Based on a pre-defined spinal structure template, a template segment sequence corresponding to the spinal segment sequence is constructed, and translation and scaling processing are performed on the template segment sequence so that the template segment sequence and the spinal segment sequence are represented in the same reference coordinate space. For each spinal segment in the spinal segment sequence, the length change and direction change of the spinal segment are calculated, and the length change and direction change are used as the structural deviation data of the spinal segment. The structural deviation data of all spinal segments are combined in order from top to bottom to form a spinal structural deviation vector. Based on the spinal structural deviation vector, a structural bias weight is assigned to each spinal key point, and a spinal structural bias matrix is ​​constructed according to the structural bias weights of all spinal key points. The structural bias weights are calculated from the structural deviations of the spinal segments connected to key points of the spine.

[0010] As a preferred embodiment of the posture recognition-based ankylosing spondylitis rehabilitation assessment method of the present invention, the step of generating predicted coordinates of spinal key points includes: combining the visual features, temporal features, and structural bias weights corresponding to each spinal key point according to the spinal key point number to form key point-level input entries; generating a spinal topology description based on the topological connection relationship between spinal key points; and inputting the key point-level input entries and the spinal topology description into a deep network model. The deep network model performs inference and outputs keypoint-level prediction results covering all spinal keypoints; the output results of the deep network model are analyzed according to the spinal keypoint numbering order to obtain the set of predicted coordinates of the spinal keypoints in the current frame.

[0011] As a preferred embodiment of the posture recognition-based rehabilitation assessment method for ankylosing spondylitis described in this invention, the rehabilitation assessment indicators include: segmental range of motion indicators, overall posture deviation indicators, segmental range of motion improvement indicators, and overall posture deviation improvement indicators. The output of the ankylosing spondylitis rehabilitation assessment results includes determining the range of posture changes of each spinal segment in continuous video frames based on the spatial position changes of adjacent spinal key points in the spinal posture sequence, and using the range of posture changes as the segmental range of motion index of the corresponding spinal segment. Based on the posture changes of all spinal segments in continuous video frames in the spinal posture sequence, an overall posture deviation index is generated by comparing the reference posture data in the preset rehabilitation target parameters. The segmental range of motion index generated this time is compared with the segmental range of motion records in the historical rehabilitation assessment records to generate segmental range of motion improvement indexes for each spinal segment; the overall posture deviation index generated this time is compared with the overall posture deviation records in the historical rehabilitation assessment records to generate overall posture deviation improvement indexes. Based on the preset segment importance configuration, the improvement indicators of segment range of motion and the improvement indicators of overall posture deviation are weighted to form the ankylosing spondylitis rehabilitation assessment results corresponding to the current rehabilitation training.

[0012] Secondly, this invention provides a posture recognition-based rehabilitation assessment system for ankylosing spondylitis, comprising: a preprocessing module for preprocessing continuous motion video frames, cropping images of the spinal region of interest, and generating pairs of the current frame and adjacent frames; a visual feature generation module for generating visual features of the spinal region in the current frame, and outputting initial values ​​and confidence scores of spinal key points; a temporal feature generation module for constructing a spinal region mask based on the confidence scores of spinal key points, generating spinal semantic optical flow, and generating temporal features; a structural bias generation module for generating a spinal structural bias matrix based on the initial values ​​of spinal key points and a preset spinal structural template; a key point inference module for generating predicted coordinates of spinal key points based on visual features, temporal features, and the spinal structural bias matrix; and a rehabilitation assessment module for constructing a spinal posture sequence based on the predicted coordinates of spinal key points and generating rehabilitation assessment results for ankylosing spondylitis.

[0013] Thirdly, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, it implements any step of the posture recognition-based ankylosing spondylitis rehabilitation assessment method as described in the first aspect of the present invention.

[0014] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the posture recognition-based ankylosing spondylitis rehabilitation assessment method as described in the first aspect of the present invention.

[0015] The beneficial effects of this invention are as follows: By accurately identifying key points of the spine and combining temporal features with structural deviations, it provides a high-precision and continuous rehabilitation assessment method for patients with ankylosing spondylitis. During spinal posture monitoring, a deep network model effectively improves the positioning accuracy of key spinal points, clearly capturing the dynamic changes of each spinal segment. Combining the spinal semantic optical flow and spinal structural bias matrix generated from adjacent frames not only achieves accurate assessment of the range of motion of spinal segments and overall posture deviation, but also quantifies the improvement in movement of each segment. Simultaneously, based on reasoning and analysis of multi-source information, differentiated rehabilitation assessment indicators are provided, enabling the implementation of personalized rehabilitation training programs and effectively improving the accuracy and reliability of the rehabilitation process. Furthermore, comparing historical assessment records with preset target parameters ensures the continuity and accuracy of the assessment results, providing reliable data support for the rehabilitation management of ankylosing spondylitis. Attached Figure Description

[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a flowchart of a posture recognition-based rehabilitation assessment method for ankylosing spondylitis. Detailed Implementation

[0018] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0019] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0020] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0021] Example 1, referring to Figure 1 This is one embodiment of the present invention, which provides a posture recognition-based rehabilitation assessment method for ankylosing spondylitis, including the following steps: S1: Collect continuous motion video frames of the patient during rehabilitation training, and preprocess the continuous video frames to generate the current frame and adjacent frame pairs of the spinal region of interest; input the current frame into the deep network model to generate visual features of the spinal region, and output the initial values ​​of the spinal key points and the confidence scores of the spinal key points.

[0022] During rehabilitation training, a camera device positioned in a fixed location with a constant shooting direction continuously captures the entire process of the patient performing movements such as flexion, extension, lateral bending, rotation, and gait training, resulting in a video stream containing multiple consecutive video frames. These consecutive video frames are stored in chronological order of capture to preserve information about the patient's postural changes.

[0023] After acquiring consecutive video frames, preprocessing is performed to generate current and adjacent frame pairs for the spine region of interest. Specifically, basic brightness and color corrections are performed on each video frame, including adjusting the overall image brightness to make the brightness difference between the spine region and the background more obvious, and adjusting the white balance to make the colors in the vicinity of the spine more even. Through these basic brightness and color corrections, corrected video frames that more clearly present the spine region are obtained.

[0024] After brightness and color correction, the corrected video frames are converted to a uniform size to obtain a preprocessed video frame sequence. The uniform size conversion includes scaling the images proportionally and padding the image edges if necessary, so that all preprocessed video frames meet the input size requirements of the deep network model.

[0025] After obtaining the preprocessed video frame sequence, a spine region detection module is used to identify the spine position within the preprocessed video frames. This module detects the upper body region in the video frames and outputs spine position identification results including the patient's neck, chest, lumbar region, and pelvic region. Based on the spine position identification results, each preprocessed video frame is cropped so that the resulting image contains only the spine and its surrounding local area, forming a spine region of interest image. During cropping, the bounding box corresponding to the spine position identification results is used for truncating, and edge regions are appropriately preserved in the vertical, horizontal, and vertical directions to retain the contextual information surrounding the spine.

[0026] After obtaining the cropped image sequence of the region of interest (ROI) for the spine, current frame and adjacent frame pairs are formed according to the temporal order. Specifically, the ROI image at a certain moment is defined as the current frame, and the immediately preceding or following frame is defined as the adjacent frame. The current frame and adjacent frames are then combined to form the current frame and adjacent frame pairs for the ROI. This method preserves the motion changes of the spine at adjacent moments, which can be used for subsequent temporal correlation analysis.

[0027] After generating the current frame and adjacent frame pairs of the spine region of interest, the current frame of the spine region of interest is input into a deep network model to generate visual features of the spine region and output initial values ​​and confidence scores of the spine keypoints. In one specific implementation, the deep network model includes a feature extraction part and a keypoint prediction part. The feature extraction part receives the current frame of the spine region of interest and processes the texture information, contour information, and surrounding context information of the spine in the current frame layer by layer through a multi-layer feature processing structure to obtain visual features of the spine region representing the semantic information of the spine region.

[0028] In this embodiment, the key points of the spine include the occipital point, the representative points of the cervical vertebrae, the representative points of the thoracic vertebrae, the representative points of the lumbar vertebrae, the sacral point, and the left and right pelvic points.

[0029] In one optional implementation, the feature extraction part can employ a feature extraction network with convolutional layers as the basic structural units. By stacking multiple convolutional layers, downsampling layers, and nonlinear activation layers, the edge texture, regional brightness variations, and local structure of the spine region in the image are progressively encoded into feature maps that can be used for keypoint localization. In another optional implementation, the feature extraction part can also employ a feature representation structure that includes a multi-head attention mechanism, enabling the network to model the overall morphological features of the spine based on long-range correlations in the spine's region of interest. Both of these model structures can extract the texture and shape information of the spine region layer by layer in a continuous frame environment and use it to support subsequent keypoint localization tasks.

[0030] The keypoint prediction component is based on the visual features of the spinal region, locating the corresponding response region for each spinal keypoint within these visual features. The keypoint prediction component processes the visual features through convolution operations, feature mapping, or attention weighting to generate a response region for each spinal keypoint on the feature map. Within each response region, the location of the highest intensity is determined based on the distribution of response intensity, and the image coordinates corresponding to this location are used as the initial value for the corresponding spinal keypoint. Simultaneously, based on the peak value and distribution of the response intensity within the response region, a confidence score is generated for that spinal keypoint to characterize the reliability of the initial value.

[0031] By utilizing deep network models for spinal keypoint prediction, more accurate and efficient keypoint identification can be achieved compared to traditional methods. Traditional pose recognition methods typically rely on manually designed feature extraction algorithms, which are often affected by image quality and noise, resulting in poor performance in complex backgrounds. Deep learning technology, however, can automatically extract richer and more stable feature information from images, significantly improving the accuracy of spinal keypoint localization. In practical applications of rehabilitation training, patients' movement states often fluctuate significantly. Deep network models, through multi-level feature extraction and temporal data analysis, can effectively adapt to these dynamic changes, providing more stable keypoint predictions.

[0032] When processing video frame data, deep network models not only analyze each frame individually but also integrate temporal information. Traditional pose recognition methods often rely on single-frame analysis of static images, easily overlooking changes brought about by the time dimension. By processing continuous video frames, deep networks can capture the continuous changes in the spine during movement, thus providing a more comprehensive understanding of pose dynamics. Compared to traditional methods, deep learning technology can process large amounts of data in a short time and automatically adjust model parameters according to different training scenarios, giving the system strong real-time performance and adaptability.

[0033] Furthermore, during keypoint localization, deep networks not only provide the accurate locations of spinal keypoints but also output the confidence score for each keypoint. This additional output information is crucial for data processing in subsequent steps. Traditional pose recognition techniques typically only provide the coordinates of keypoints, lacking an assessment of the reliability of the prediction results. Deep network models, however, can evaluate reliability while performing localization, providing confidence scores and effectively avoiding inaccurate results introduced by errors or noise. In practical applications, this confidence assessment provides more reliable data support for subsequent pose analysis, motion tracking, and rehabilitation assessment.

[0034] S2: Construct a spinal region mask based on the confidence of spinal key points, and calculate pixel-level displacement fields by combining adjacent frame pairs to form spinal semantic optical flow, and encode the spinal semantic optical flow as temporal features.

[0035] Within the current frame of the spine focus region, spatial relationship calculations are performed on each pixel location relative to initial values ​​of spine keypoints, and pixel response values ​​are generated by combining these with spine keypoint confidence scores. Specifically, for pixel i, the pixel position is denoted as... The initial position of the kth spinal key point obtained in step S1 is denoted as... The confidence scores of the corresponding spinal key points are denoted as follows: The pixel response value is calculated using the following formula:

[0036] in, represents the pixel number; m(i) represents the pixel response value of pixel i; k represents the key point number of the spine; This represents the confidence level of the k-th spinal keypoint; Represents an exponential function; Indicates the distance attenuation factor; - Represents the coordinates of pixel i The square of the Euclidean distance; This represents the position coordinates of pixel i in the current frame within the spine region of interest.

[0037] After obtaining the pixel response values, a threshold filtering process is performed on the pixel response values ​​to form a spine region mask. The preset threshold is denoted as... Each pixel is classified according to the following formula:

[0038] in, The value is used to label the spine region of pixel i. A pixel with a value of 1 belongs to the spine region, and a pixel with a value of 0 belongs to the non-spine region. This represents the threshold used to distinguish pixels in the spine region from pixels in the non-spine region.

[0039] Between the current frame and adjacent frames of the spine region of interest, brightness comparisons are performed on corresponding pixels, the direction of brightness change is recorded, and pixel displacement information is generated through smoothing processing. Let the brightness image of the current frame of the spine region of interest be... The brightness images of adjacent frames to the spine region of interest are The pixel displacement component is denoted as (Level) and (Vertical), the pixel displacement is solved using an energy function that includes a brightness consistency term and a displacement smoothing term:

[0040] in, Represents the optical flow energy function; This represents the horizontal displacement of pixel i. This represents the vertical displacement of pixel i. The brightness function representing the region of interest in the spine in the current frame; The brightness function representing the frame adjacent to the region of interest in the spine; Indicates the balance parameters; Indicates pixel displacement Gradient in space; Indicates pixel displacement Gradient in space.

[0041] Obtaining a mask for the spinal region With pixel displacement information Next, a pixel-by-pixel overlay process is performed on the two to form the spinal semantic optical flow. For each pixel i in the current frame of the spinal region of interest, the spinal semantic optical flow is defined by the following formula:

[0042] in, Let be the spinal semantic optical flow vector for pixel i. Pixels with a mask value of 1 retain their displacement information, while pixels with a mask value of 0 have their displacement values ​​set to zero vectors, thus ensuring that the spinal semantic optical flow only includes pixel motion within the spinal region.

[0043] After obtaining the semantic optical flow of the spine, statistical processing is performed on the pixel displacement amplitudes in the spinal semantic optical flow to generate temporal motion features representing the changes of the spine over time. Let the number of pixels in the spinal region be... The displacement amplitude of pixel i in the spinal semantic optical flow is The overall spinal movement intensity can be obtained using the following formula:

[0044] The degree of motion dispersion in the spinal region is obtained using the following formula:

[0045] in, This indicates the overall intensity of spinal motion in the current frame; Indicates the number of pixels in the spine region; This indicates the degree of motion dispersion in the spine region of the current frame.

[0046] After the above numerical calculations are completed, the output temporal features are used in subsequent steps to calculate the spinal structure bias matrix and to perform fusion reasoning of visual features, temporal features, and structural features.

[0047] By constructing a spinal region mask based on the confidence level of spinal key points, the accuracy of key point detection and subsequent analysis is significantly improved. Traditional pose recognition methods typically do not consider the confidence level of key points, leading to reduced localization accuracy when the spinal region is at complex edges or in complex backgrounds. By constructing a spinal region mask based on the confidence level of key points, uncertain pixels and background noise can be effectively filtered out, ensuring that only spine-related areas are focused on, avoiding interference, and enhancing the accurate capture of spinal pose.

[0048] Furthermore, during the construction of the spine region mask, pixel displacement information between adjacent frames was introduced, enabling the computation of spinal semantic optical flow to be supplemented based on temporal features. Traditional methods often neglect the continuity of temporal information when processing single-frame images, failing to fully consider the dynamic changes of the spine at different time points. By combining pixel displacement information from adjacent frames, not only is the stability tracking of the spine in dynamic video sequences improved, but errors caused by factors such as illumination changes and background complexity are also effectively reduced, thereby improving the robustness of overall pose recognition.

[0049] The application of a threshold-based filtering strategy enhances the system's adaptability and accuracy when filtering pixels in the spinal region. Traditional image processing methods can be affected by image quality, noise, and motion blur, leading to performance degradation in complex environments. This pixel response-based filtering mechanism intelligently identifies key pixels in the spinal region and suppresses interfering pixels in non-spine areas, thereby improving the accuracy and real-time performance of the entire pose recognition process and ensuring that subsequent steps can be executed with higher-quality data support.

[0050] S3: Calculate the spinal structure deviation based on the initial values ​​of the key points of the spine and the preset spinal structure template, and generate the spinal structure bias matrix according to the structural deviation.

[0051] In the current frame, step S1 has already output the initial values ​​of the spinal keypoints. The spinal keypoints are arranged in the order of occipital point, cervical vertebrae representative point, thoracic vertebrae representative point, lumbar vertebrae representative point, sacrum point, and left and right pelvic points. A spinal segment sequence is constructed based on the spatial connectivity between adjacent spinal keypoints in the initial values, where each spinal segment consists of a pair of adjacent spinal keypoints. The current frame's first... The spatial connection length of each spinal segment is denoted as The direction of the spatial connection is denoted as the segmental direction vector. Thus using segment length and segmental direction For the current frame, the first The structural features of each spinal segment are described. A preset spinal structure template also provides template spinal key points corresponding to the above-mentioned sequence of key points, and a template segment sequence is constructed based on the spatial connection relationships between adjacent template spinal key points. The template segment sequence is then used to describe the structural features of each spinal segment. The length of each template spinal segment is denoted as Let the direction vector of the spinal segment of the template be denoted as In implementation, the template segment sequence undergoes translation and scaling to align it to the same reference coordinate space as the spinal segment sequence, thus ensuring the template segment length is consistent. and template segment direction vector It only reflects the morphological features of the preset spinal structure template itself, and is not affected by absolute position or overall proportion. In this way, the structural features of the spinal segment in the current frame can be obtained within the same reference coordinate space. and the structural features of the template spinal segments .

[0052] In obtaining the structural features of the spinal segments in the current frame ( , ) and template spinal segmental structural features ( , After that, the length change and direction change are calculated for each spinal segment in the spinal segment sequence. The length change of the t-th spinal segment is denoted as... Defined as:

[0053] in, This represents the change in length of the t-th spinal segment. This represents the length of the t-th spinal segment in the current frame. This represents the length of the template segment corresponding to the t-th spinal segment in the preset spinal structure template. The change in length quantifies the relative change in the length of the t-th spinal segment relative to the template segment in the current frame. The directional change of the t-th spinal segment is denoted as... The change in direction is measured by the angle between the current frame segment direction vector and the template segment direction vector, and is defined as:

[0054] in, This represents the change in direction of the t-th spinal segment. This represents the direction vector of the t-th spinal segment in the current frame. This represents the template segment direction vector corresponding to the t-th spinal segment in the preset spinal structure template. This represents the dot product of two direction vectors. The change in direction describes the deviation of the current frame's spinal segment from the template spinal segment in terms of direction, from an angular dimension. This is achieved by calculating the change in length for each spinal segment in the spinal segment sequence. and directional change This allows us to obtain spinal segment structural deviation data arranged by segment index, providing input for subsequent construction of spinal structural deviation vectors and structural bias weights.

[0055] After obtaining the length changes of all spinal segments With change of direction Subsequently, the structural deviation data of all spinal segments are combined in a top-to-bottom order to form the spinal structural deviation vector for the current frame. This vector arranges the length and direction changes of each spinal segment in a fixed order, representing the overall deviation of the complete spinal structure in the current frame relative to a preset spinal structure template. This intermediate representation provides a basis for allocating structural bias weights at the spinal keypoint level, ensuring that the weights comprehensively consider the structural deviations of all spinal segments connected to the keypoints.

[0056] After constructing the spinal structure deviation vector, to apply differentiated structural constraints to different spinal key points during subsequent spinal key point prediction, a structural bias weight is assigned to each spinal key point based on the spinal structure deviation vector. In this embodiment, the spinal key points are numbered using... It indicates that, with the first The set of spinal segment numbers connected by key spinal points is denoted as The number of elements in the set is denoted as . Set The length and direction changes of each spinal segment are weighted and combined to obtain the first... Structural bias weights of key spinal points Defined as:

[0057] in, Indicates the first Structural bias weights corresponding to each key point in the spine. Indicates the relationship with the first A set of spinal segment numbers connected to key points in the spine. This indicates the number of spinal segments in the set. Represents a set The Middle The change in length of each spinal segment. Represents a set The Middle The amount of directional change in each spinal segment This is a weighting coefficient for the length and direction changes, used to adjust the relative influence of the two types of deviations in the structural bias weights. Through the above calculations, the structural bias weights of all spinal key points can be obtained. These structural bias weights are calculated from the structural deviations of the spinal segments connected to the spinal key points. After obtaining the structural bias weights of all spinal key points, a spinal structural bias matrix is ​​constructed based on these weights. The spinal structural bias matrix places the structural bias weights corresponding to each spinal key point, or constraint coefficients derived from these weights, sequentially along its diagonal. These weights serve as structural constraint inputs in subsequent feature fusion and spinal key point prediction processes, applying differentiated constraints to the position updates of different spinal key points. This allows the predicted spinal key point results to be adjusted based on changes in the length and direction of spinal segments, thereby matching the spinal structural features associated with ankylosing spondylitis.

[0058] By constructing a sequence of spinal segments and calculating segmental structural deviations, the accuracy of spinal motion capture is effectively improved. Traditional posture recognition methods often focus only on a single keypoint or simple skeletal connections, without fully considering the spatial structural changes between different spinal segments. This method often fails to adequately reflect the complex geometric changes of the spine during different postures and movements. By meticulously dividing the spinal segments and combining this with a structured description of the spatial relationships between start and end keypoints, the dynamic changes of the spine can be described more comprehensively and accurately, thereby improving the accuracy of posture analysis and the ability to capture details.

[0059] Furthermore, by translating and scaling the spinal segments, the spinal segments are aligned with a pre-set template, making the overall structure of the spine more consistent with the target template. Unlike traditional methods, which typically process spinal posture based solely on static images or simplified models without considering the relative changes during spinal movement and posture adjustments at different stages, this method dynamically processes the template to adapt it to the actual collected data. This ensures accurate matching and evaluation of spinal structures in different patients and at different stages of rehabilitation, thus avoiding errors that may arise when dealing with individual differences using traditional methods.

[0060] By combining the weighting mechanism of spinal structural deviations with key points, the role of structural deviation information in the key point localization process is further enhanced. Unlike traditional key point localization methods that rely solely on image data, which easily overlook changes in the relative positions and angles between spinal segments when structural deviation information is lacking—a crucial aspect of rehabilitation assessment—this method assigns appropriate structural bias weights to each spinal key point. This ensures that the prediction of spinal key points considers not only local features but also the overall structural changes of the spine. This results in more stable and accurate posture prediction during varied rehabilitation movements, thereby enhancing the credibility and reliability of the assessment results.

[0061] S4: Reasoning is performed based on visual features, temporal features, and the spinal structure bias matrix, and the predicted coordinates of spinal key points are generated through feature interaction.

[0062] The deep network model was trained offline. During the training phase, acquired video frames of spinal movements were used as training data. The true locations of spinal keypoints were labeled in each frame, and the motion trends of these keypoints over time were recorded based on adjacent video frames. During training data preprocessing, the spinal region of interest image of each frame was used as visual input, the spinal semantic optical flow calculated from adjacent frame sequences was used as temporal input, and the structural reference information calculated based on a preset spinal structure template was used as structural input, ensuring that the input format during the training phase remained consistent with the input format used during the inference phase.

[0063] During the training phase, the deep network model receives the three types of inputs mentioned above, along with corresponding labels for the actual locations of spinal key points. By comparing the predicted locations with the actual locations, it automatically adjusts its internal parameters, thereby learning the combined relationships between visual features, temporal features, and structural information in the spinal key point localization task. The training data covers different postural change rates, different spinal segment ranges of motion, and different forms of rehabilitation movements, enabling the trained deep network model to stably output predicted coordinates of spinal key points under various rehabilitation movement scenarios.

[0064] In the inference phase, step S4 receives the visual and temporal features of the spine region output from step S2, and the spine structure bias matrix output from step S3. For each spine keypoint in the current frame, step S4 extracts the visual feature fragment corresponding to the position of the spine keypoint from the visual features, extracts the temporal description related to the spine keypoint from the temporal features, and reads the structural bias weights corresponding to the spine keypoint in the structure bias matrix. The three parts are then combined into a keypoint-level input entry in a preset order.

[0065] Following the numerical order of the spinal keypoints, the keypoint-level input entries of all spinal keypoints in the current frame are combined into an input set. Simultaneously, a spinal topology description is constructed based on predefined spinal skeleton connections to indicate the adjacency relationships between different spinal keypoints. The keypoint-level input set and the spinal topology description together constitute the input data for the deep network model's inference phase.

[0066] In one alternative implementation, the deep network model treats each keypoint-level input entry as an input unit during the inference phase. For each spinal keypoint, visual features and temporal features are concatenated in a fixed order to form a feature vector, and structural bias weights are incorporated into the numerical representation of this feature vector. This allows the keypoint-level features to simultaneously carry local texture information, local motion information, and structural bias information. The deep network model encodes these keypoint-level feature vectors based on the parameters learned during the training phase, allowing the structural bias weights to influence the combination of visual and temporal features during the feature encoding process.

[0067] In another alternative implementation, the deep network model internally performs connection-based information transfer and feature interaction on the feature vectors corresponding to different spinal keypoints, according to the topological relationship of the spine. This allows connected spinal keypoints to complement each other's information in the feature space. Structural bias weights play a regulatory role in the feature interaction process, enabling spinal keypoints with larger structural biases to retain more of their own features when updating features, and allowing spinal keypoints with smaller structural biases to absorb more feature information from adjacent spinal keypoints when updating features. Since the deep network model has already completed parameter learning under the above input format and topological constraints during the training phase, no adjustments to the internal structure of the deep network model are needed during the inference phase. Joint inference can be performed based on visual features, temporal features, and structural bias information, ensuring the engineering feasibility of this step.

[0068] After the deep network model completes inference, the system receives the predicted results of the spinal key points output by the deep network model. These prediction results are given in the form of prediction entries that correspond one-to-one with the key point numbers of the spine. Each prediction entry contains numerical information describing the spatial location of the corresponding key point of the spine.

[0069] The predicted entries are processed one by one according to the numbering order of the spinal keypoints. For each predicted entry, the numerical data representing the horizontal position and the numerical data representing the vertical position are read from the predicted entry, and these two numerical data are combined according to the preset image coordinate system definition to form the two-dimensional coordinates of the spinal keypoint in the current frame. The two-dimensional coordinates of all spinal keypoints are arranged in the order of their numbers to form the predicted coordinate set of the spinal keypoints for the current frame.

[0070] In one alternative implementation, the prediction entries output by the deep network model may include confidence information to characterize numerical stability. This confidence information can be read simultaneously with the predicted coordinates during parsing, and when forming the set of predicted coordinates for spinal keypoints, the confidence information is appended to the corresponding spinal keypoint entries. This allows subsequent steps to adjust the spinal curve fitting method or motion parameter calculation method based on the confidence information.

[0071] The generated set of predicted coordinates for spinal key points is stored in the order of the spinal key point numbers. It is used to construct the spinal curve morphology and calculate spinal motion parameters, so that subsequent steps can process the spinal segment morphology and joint range of motion under a consistent spatial reference.

[0072] By fusing visual features, temporal features, and structural bias matrices of the spine, the accuracy and stability of spinal keypoint prediction are significantly improved. Existing techniques for pose recognition often rely on single visual features for prediction, neglecting the complex relationship between temporal changes and structural constraints. By introducing temporal features and a structural bias matrix, the changes in the spine during continuous movement can be better captured, thus providing more accurate spinal pose estimation. A limitation of traditional methods is their inability to handle the interactions between multi-dimensional data; this technique effectively solves this problem by fusing and interacting features within a deep learning model, enabling the prediction results of spinal keypoints to more comprehensively reflect the dynamic changes of the spine under various movement states.

[0073] When processing spinal keypoints, by incorporating the spinal structure bias matrix as input, the prediction of each keypoint not only relies on local visual information but also comprehensively considers the spatial relationships and dynamic changes between different spinal segments. Traditional methods typically treat the spine as a series of independent keypoints, which can easily lead to insufficient consideration of displacement and angular deviations between different spinal segments, thus affecting the accuracy of the overall posture. The S4 step, through a structured input method, ensures that the prediction results for each spinal keypoint are adjusted based on the spatial structure of the entire spine, thereby improving the accuracy and stability of the prediction results.

[0074] Furthermore, a feature interaction mechanism from deep network models is introduced, enabling effective information transfer and fusion among various input features. Through this interaction mechanism, the prediction of spinal keypoints is no longer a matter of processing each feature independently, but rather a comprehensive consideration of the synergistic effect of visual features, temporal features, and structural bias information. This approach effectively solves the problem of fragmented features in existing technologies, ensuring that the prediction of spinal keypoints is not only accurate but also adaptable to different movement patterns and posture changes, enhancing robustness in complex scenarios.

[0075] S5: Extract rehabilitation assessment indicators from the spinal posture sequence, compare the rehabilitation assessment indicators with preset rehabilitation target parameters and historical rehabilitation assessment records, and output the rehabilitation assessment results for ankylosing spondylitis.

[0076] After obtaining the predicted coordinate set of spinal key points, the predicted coordinate sets of spinal key points in all frames of a continuous video frame sequence are arranged temporally to form a spinal posture sequence. This spinal posture sequence contains spatial positional changes of each spinal key point in the continuous video frames. Rehabilitation assessment indicators are extracted from the spinal posture sequence and compared with preset rehabilitation target parameters and historical rehabilitation assessment records to output the ankylosing spondylitis rehabilitation assessment results.

[0077] In one specific implementation, the rehabilitation assessment indicators include segmental range of motion indicators, overall posture deviation indicators, segmental range of motion improvement indicators, and overall posture deviation improvement indicators. In the spinal posture sequence, a sequence of spinal segments in consecutive video frames is constructed according to the numbering order of spinal keypoints. Each spinal segment is defined by the spatial connection between the predicted coordinates of adjacent spinal keypoints. The posture change range of the t-th spinal segment in the spinal posture sequence within consecutive video frames is denoted as... The range of posture variation is determined by calculating the covariance of the changes in the norm of the length vector and the changes in the inner product of the orientation of the spinal segments in consecutive video frames, and is defined as:

[0078] in, Let represent the Euclidean norm of the length vector of the t-th spinal segment in consecutive video frames. This represents the direction vector of the t-th spinal segment. This represents the preset reference direction vector, and Var represents the variance operation. This represents the covariance operation. These are preset interaction weighting coefficients used to emphasize the collectable dynamic relationship between length and direction. The calculated range of posture changes is used as the segmental range of motion index for the corresponding spinal segment.

[0079] Based on the posture changes of all spinal segments in continuous video frames within a spinal posture sequence, and by comparing them with reference posture data in preset rehabilitation target parameters, an overall posture deviation index is generated. The overall posture deviation value is labeled as... It is defined by calculating the Frescher distance between the spinal posture sequence and the reference posture data, specifically as follows:

[0080] in, Indicates the total number of spinal segments. Indicating the first position in the spinal posture sequence Each segment in the parametric curve The position vector on, This represents the position vector corresponding to the reference posture in the preset rehabilitation target parameters. This represents a monotonically continuous reparameterized function. Indicates the infimum, The supremum is represented. This formula emphasizes the geometric interaction between sequences and is based on the computability of video frame positions. The generated segmental range of motion index is compared with the segmental range of motion records in historical rehabilitation assessment records for each spinal segment. Generate segmental range of motion improvement indicators Defined as:

[0081] in, This indicates the range of activity in this segment. This indicates the segmental range of motion recorded in the historical rehabilitation assessment records for the corresponding segment. Use small positive numbers to avoid division by zero. The preset attenuation coefficient, This represents an exponential function. If... This indicates an improvement in the range of motion of that segment. The generated overall postural deviation index is compared with the overall postural deviation records in historical rehabilitation assessments to generate an overall postural deviation improvement index. Defined as:

[0082] in, This indicates the overall attitude deviation index for this test. This indicates the overall postural deviation record in the historical rehabilitation assessment record. These are preset normalization coefficients used to ensure computability stability. If This indicates an improvement in overall postural deviation. Based on a pre-defined segmental importance configuration, the improvement indicators for segmental range of motion and overall postural deviation are weighted to generate an ankylosing spondylitis rehabilitation assessment result corresponding to the current rehabilitation training. The ankylosing spondylitis rehabilitation assessment result is recorded as follows: Calculated using the following formula:

[0083] in, This represents the diagonal vector of the preset importance weight matrix, containing the weight of each segment. and overall weight ,satisfy , This represents the transpose operation. Through the above matrix interaction, the generated ankylosing spondylitis rehabilitation assessment results are used to quantify the effectiveness of current rehabilitation training and can serve as a basis for adjusting subsequent rehabilitation plans.

[0084] By extracting rehabilitation assessment indicators from spinal posture sequences, the accuracy of efficacy evaluation during the rehabilitation process has been significantly improved. Existing technologies often rely solely on single physical measurements or empirical judgments in rehabilitation assessments, lacking a comprehensive capture of dynamic changes in the spine. By using the coordinates of key spinal points in continuous video frames as input, combined with temporal information and changes in spinal structure, the range of motion, postural deviations, and their improvement status of each spinal segment can be monitored in real time, thus achieving a comprehensive assessment of the rehabilitation process. This data-driven method, extracted from continuous postural changes, not only avoids subjective errors in manual assessments but also quantifies spinal rehabilitation progress at a finer granular level.

[0085] In calculating the range of motion and postural deviations of spinal segments, quantitative improvement feedback is provided for each segment by combining the target reference posture and historical rehabilitation records. The core advantage of this method lies in its consideration of individual patient differences and diverse movement patterns, enabling more precise comparison of changes across different rehabilitation stages and allowing for the tailoring of personalized rehabilitation goals for each patient. This quantitative assessment not only enhances the scientific rigor of rehabilitation training but also provides data support for adjusting treatment plans, avoiding the problems of traditional methods that rely on experience and imprecise assessments.

[0086] A comprehensive rehabilitation scoring system was developed by weighting the improvement indicators of each spinal segment and the overall postural deviation. This weighting strategy assigns different weights based on the importance of each segment, enabling the rehabilitation assessment to more accurately reflect the impact of different spinal segments on the overall rehabilitation effect. Unlike traditional simple comparison methods, the comprehensive rehabilitation score introduces a more refined weight adjustment mechanism, which can truly reflect the rehabilitation progress of each spinal segment, thus providing a more accurate assessment of rehabilitation effectiveness. This strategy enhances the specificity and dynamic adaptability of the assessment, especially in multi-stage rehabilitation processes.

[0087] This embodiment also provides a posture recognition-based rehabilitation assessment system for ankylosing spondylitis, including: The preprocessing module performs preprocessing on continuous motion video frames, cropping images of the spinal region of interest and generating pairs of the current frame and adjacent frames. The visual feature generation module generates visual features of the spinal region in the current frame and outputs initial values ​​and confidence scores of spinal keypoints. The temporal feature generation module constructs a spinal region mask based on the confidence scores of spinal keypoints, generates spinal semantic optical flow, and generates temporal features. The structural bias generation module generates a spinal structural bias matrix based on the initial values ​​of spinal keypoints and a preset spinal structure template. The keypoint inference module generates predicted coordinates of spinal keypoints based on visual features, temporal features, and the spinal structural bias matrix. The rehabilitation assessment module constructs a spinal posture sequence based on the predicted coordinates of spinal keypoints and generates rehabilitation assessment results for ankylosing spondylitis.

[0088] This embodiment also provides a computer device applicable to the ankylosing spondylitis rehabilitation assessment method based on posture recognition, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the ankylosing spondylitis rehabilitation assessment method based on posture recognition as proposed in the above embodiment.

[0089] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0090] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the posture recognition-based rehabilitation assessment method for ankylosing spondylitis as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0091] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for ankylosing spondylitis rehabilitation assessment based on posture recognition, characterized in that, include: Collect continuous motion video frames of the patient during rehabilitation training, and preprocess the continuous video frames to generate the current frame and adjacent frame pairs of the spinal region of interest. Input the current frame into the deep network model to generate visual features of the spine region and output the initial values ​​of the spine keypoints and the confidence scores of the spine keypoints. A spinal region mask is constructed based on the confidence of spinal key points, and a pixel-level displacement field is calculated by combining adjacent frame pairs to form spinal semantic optical flow, and the spinal semantic optical flow is encoded as temporal features. The spinal structure deviation is calculated based on the initial values ​​of the key points of the spine and the preset spinal structure template, and a spinal structure bias matrix is ​​generated based on the structural deviation. Inference is performed based on visual features, temporal features, and the spinal structure bias matrix, and the predicted coordinates of spinal key points are generated through feature interaction. Rehabilitation assessment indicators are extracted from the spinal posture sequence, and these indicators are compared with preset rehabilitation target parameters and historical rehabilitation assessment records to output the rehabilitation assessment results for ankylosing spondylitis.

2. The posture recognition based ankylosing spondylitis rehabilitation assessment method of claim 1, wherein: The process of generating the current frame and adjacent frame pairs for the spinal region of interest includes: correcting the brightness and color of consecutive video frames; converting the corrected video frames to a uniform size to obtain a preprocessed video frame sequence; identifying the spinal position of the preprocessed video frame sequence through a spinal region detection module; cropping the spinal region of interest image based on the spinal position identification result; and extracting adjacent frames from the cropped image sequence to form adjacent frame pairs based on time sequence.

3. The posture recognition based ankylosing spondylitis rehabilitation assessment method of claim 2, wherein: The key points of the spine include the occipital point, the representative points of the cervical vertebrae, the representative points of the thoracic vertebrae, the representative points of the lumbar vertebrae, the sacral point, and the left and right pelvic points. The process of generating visual features of the spinal region includes inputting the current frame of the spinal region of interest into a deep network model to obtain visual features of the spinal region, locating the corresponding response region for each spinal key point in the visual features of the spinal region, determining the initial value of the corresponding spinal key point based on the maximum response position of the response region, and generating the confidence level of the spinal key point based on the intensity distribution of the response region.

4. The posture recognition based ankylosing spondylitis rehabilitation assessment method of claim 3, wherein: The process of forming spinal semantic optical flow includes performing numerical calculations based on the position of each pixel in the current frame and the position of the initial value of the spinal keypoint, and generating a pixel response value for each pixel using the confidence level of the spinal keypoint as a weighting factor. A threshold filtering is performed on the pixel response values. Pixels that meet the threshold conditions are marked as spine region pixels, and pixels that do not meet the threshold conditions are marked as non-spine region pixels, thus forming a spine region mask. The brightness of corresponding pixels in the current frame of the spine region of interest is compared with that in adjacent frames of the spine region of interest. The pixel movement direction corresponding to the brightness change is recorded, and the pixel movement direction is smoothed to generate pixel displacement information. The spine region mask and pixel displacement information are overlaid pixel by pixel. The pixel displacement information of pixels belonging to the spine region is preserved, while the pixel displacement information of pixels belonging to non-spine region is suppressed to generate the spine semantic optical flow. The pixel displacement amplitude in the spine semantic optical flow is statistically processed, and the statistical results are combined into temporal features.

5. The posture recognition based ankylosing spondylitis rehabilitation assessment method of claim 4, wherein: The generation of the spinal structure bias matrix includes constructing a spinal segment sequence in a top-to-bottom order based on the initial values ​​of the spinal key points, with each spinal segment corresponding to the spatial connection between adjacent spinal key points. Based on a pre-defined spinal structure template, a template segment sequence corresponding to the spinal segment sequence is constructed, and translation and scaling processing are performed on the template segment sequence so that the template segment sequence and the spinal segment sequence are represented in the same reference coordinate space. For each spinal segment in the spinal segment sequence, the length change and direction change of the spinal segment are calculated, and the length change and direction change are used as the structural deviation data of the spinal segment. The structural deviation data of all spinal segments are combined in order from top to bottom to form a spinal structural deviation vector. Based on the spinal structural deviation vector, a structural bias weight is assigned to each spinal key point, and a spinal structural bias matrix is ​​constructed according to the structural bias weights of all spinal key points. The structural bias weights are calculated from the structural deviations of the spinal segments connected to key points of the spine.

6. The ankylosing spondylitis rehabilitation assessment method based on posture recognition as described in claim 5, characterized in that: The process of generating predicted coordinates for spinal keypoints includes combining the visual features, temporal features, and structural bias weights corresponding to each spinal keypoint according to the spinal keypoint number to form a keypoint-level input entry; generating a spinal topology description based on the topological connection relationship between spinal keypoints; and inputting the keypoint-level input entry and the spinal topology description into a deep network model. The deep network model performs inference and outputs keypoint-level prediction results covering all spinal keypoints; the output results of the deep network model are analyzed according to the numbering order of the spinal keypoints to obtain the set of predicted coordinates of the spinal keypoints in the current frame.

7. The ankylosing spondylitis rehabilitation assessment method based on posture recognition as described in claim 6, characterized in that: The rehabilitation assessment indicators include: segmental range of motion indicators, overall postural deviation indicators, segmental range of motion improvement indicators, and overall postural deviation improvement indicators; The output ankylosing spondylitis rehabilitation assessment results include determining the range of posture changes of each spinal segment in continuous video frames based on the spatial position changes of adjacent spinal key points in the spinal posture sequence, and using the range of posture changes as the segmental range of motion index of the corresponding spinal segment. Based on the posture changes of all spinal segments in continuous video frames in the spinal posture sequence, an overall posture deviation index is generated by comparing the reference posture data in the preset rehabilitation target parameters. The segmental range of motion index generated this time is compared with the segmental range of motion records in the historical rehabilitation assessment records to generate segmental range of motion improvement indexes for each spinal segment; the overall posture deviation index generated this time is compared with the overall posture deviation records in the historical rehabilitation assessment records to generate overall posture deviation improvement indexes. Based on the preset segment importance configuration, the improvement indicators of segment range of motion and the improvement indicators of overall posture deviation are weighted to form the ankylosing spondylitis rehabilitation assessment results corresponding to the current rehabilitation training.

8. A posture recognition-based rehabilitation assessment system for ankylosing spondylitis, based on the posture recognition-based rehabilitation assessment method for ankylosing spondylitis according to any one of claims 1 to 7, characterized in that: The preprocessing module is used to perform preprocessing on continuous motion video frames, crop the spine region of interest image, and generate the current frame and adjacent frame pairs; the visual feature generation module is used to generate visual features of the spine region on the current frame and output the initial values ​​and confidence scores of the spine key points. The temporal feature generation module is used to construct a spinal region mask based on the confidence of spinal key points, generate spinal semantic optical flow, and generate temporal features; The structural bias generation module is used to generate a spinal structural bias matrix based on the initial values ​​of the spinal key points and the preset spinal structural template. The key point reasoning module is used to generate predicted coordinates of spinal key points based on visual features, temporal features, and spinal structure bias matrix; the rehabilitation assessment module is used to construct a spinal posture sequence based on the predicted coordinates of spinal key points and generate rehabilitation assessment results for ankylosing spondylitis.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the posture recognition-based ankylosing spondylitis rehabilitation assessment method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the posture recognition-based ankylosing spondylitis rehabilitation assessment method according to any one of claims 1 to 7.