{'fraction_non_alphanumeric': 0.034358047016274866, 'fraction_numerical': 0.021316236506109924, 'mean_word_length': 5.079280479680214, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Sagittal intervertebral rotational motion: a deep learning-based measurement on flexion–neutral–extension cervical lateral radiographs

Background The analysis of sagittal intervertebral rotational motion (SIRM) can provide important information for the evaluation of cervical diseases. Deep learning has been widely used in spinal parameter measurements, however, there are few investigations on spinal motion analysis. The purpose of this study is to develop a deep learning-based model for fully automated measurement of SIRM based on flexion–neutral–extension cervical lateral radiographs and to evaluate its applicability for the flexion–extension (F/E), flexion–neutral (F/N), and neutral–extension (N/E) motion analysis. Methods A total of 2796 flexion, neutral, and extension cervical lateral radiographs from 932 patients were analyzed. Radiographs from 100 patients were randomly selected as the test set, and those from the remaining 832 patients were used for training and validation. Landmarks were annotated for measuring SIRM at five segments from C2/3 to C6/7 on F/E, F/N, and N/E motion. High-Resolution Net (HRNet) was used as the main structure to train the landmark detection network. Landmark performance was assessed according to the percentage of correct key points (PCK) and mean of the percentage of correct key points (MPCK). Measurement performance was evaluated by intra-class correlation coefficient (ICC), Pearson correlation coefficient, mean absolute error (MAE), root mean square error (RMSE), and Bland-Altman plots. Results At a 2-mm distance threshold, the PCK for the model ranged from 94 to 100%. Compared with the reference standards, the model showed high accuracy for SIRM measurements for all segments on F/E and F/N motion. On N/E motion, the model provided reliable measurements from C3/4 to C6/7, but not C2/3. Compared with the radiologists’ measurements, the model showed similar performance to the radiologists. Conclusions The developed model can automatically measure SIRM on flexion–neutral–extension cervical lateral radiographs and showed comparable performance with radiologists. It may provide rapid, accurate, and comprehensive information for cervical motion analysis. Supplementary Information The online version contains supplementary material available at 10.1186/s12891-022-05927-0.

. As the main part of cervical intervertebral motion parameters, sagittal intervertebral rotational motion (SIRM) provides precise biomechanical information and reveals early abnormal motion patterns [4,5].
Originally, intervertebral motion parameters were measured manually with fine pencils on X-ray films [6]. Such handwork resulted in significant observer differences, which accounted for 38% or more of the value being measured [7]. Computer-assisted methods and various software have been developed for landmark location, parameter measurement, and data analysis to minimize subjective influence and accelerate processing speed [8][9][10]. However, manual annotation of the landmarks on vertebral bodies was unavoidable in these methods, which brought tedious and time-consuming work for operators.
In the field of spinal disorders, a variety of models have demonstrated good to excellent performance in automatically measuring Cobb angle, spinopelvic parameters, and sagittal alignment, with the mean absolute error (MAE) ranging from 1° to 5° [14][15][16][17]. Aside from static spinal parameter measurements, there were some studies focusing on the deep learning-based measurement for intervertebral motion. Jacobsen et al. [18] acquired cervical intervertebral angles on fluoroscopic images with a landmark detection algorism for cervical joint movement evaluation. Nguyen et al. [19] developed a deep learning system to measure lumbar intervertebral angles based on flexion and extension radiographs in order to determine the instability of the lumbar spondylolisthesis. The above studies have some limitations in using static parameters measured from a separate view to explore spinal motion function. Consequently, it is necessary to carry out a measurement derived from the combination of multiple views, which may provide more accurate and comprehensive information for spinal motion analysis.
The objective of the present study was to develop a fully automated deep learning model for the measurement of SIRM based on flexion-neutral-extension cervical lateral radiographs and to evaluate its applicability for the flexion-extension (F/E), flexion-neutral (F/N), and neutral-extension (N/E) motion analysis.

Dataset preparation
This study was approved by the Institutional Research Ethics Committee of Hospital (2022QT041). A total of 2247 cases for which flexion, neutral, and extension cervical lateral radiographs were taken in inpatient and outpatient settings between January 2019 and December 2020 were reviewed. The data of these patients were sequentially collected from the Picture Archiving and Communication System (PACS) of hospital. Adult patients (≥18 years) were included to ensure skeletal maturity in all cases in this study. The need for informed consent was waived due to the use of retrospective data. The exclusion criteria were as follows: (1) a history of cervical surgery; (2) partial or complete obscuration of the C7 vertebral body; (3) obscured landmarks due to severe osteophytes or fusion of adjacent vertebral bodies; and (4) poor radiograph quality and a wide range of aberrant motion out of the sagittal plane. From this review, a total of 2796 cervical lateral radiographs from 932 patients were collected. Radiographs from 100 cases were randomly assigned to the test set, and those from the remaining 832 cases were randomly divided in a 4:1 ratio to form the training and validation sets, respectively ( Fig. 1).

Landmark annotations
The training and validation sets were manually annotated by one musculoskeletal radiologist (R1, 5 years of experience), and 100 cases of them were reannotated by R1 after a 6-week interval for the assessment of intraobserver reliability. The test set was independently annotated by R1, together with R2 (a radiologist with 3 years of experience) and R3 (a radiologist with 5 years of experience). All radiologists discussed and agreed on the annotation method before starting the work. A dedicated website was developed for manual annotation (http:// wareh ouse. healt hview cn. com/).

Definitions of landmarks and parameter
A total of 22 landmarks were annotated on each radiograph on the flexion, neutral, and extension views. For the typical vertebrae from C3 to C7, the anterior-superior, posterior-superior, anterior-inferior, and posterior-inferior vertebral body corners were denoted by C-G1 to C-G4, respectively. For C2 vertebrae with a unique biological shape, only the anterior-inferior and posterior-inferior corners were denoted by B3 and B4, respectively. To reduce measurement error, all annotations of landmarks were made as close to the corticomedullary margin of the vertebral body as possible [7]. The method for measuring SIRM was based on the geometric midplanes method, for which excellent agreement and smaller errors have been demonstrated [20,21]. The vertebral midplane was defined by a line through the two midpoints between the anterior and posterior corners. The specific name of each landmark and the method for measurement are illustrated in Fig. 2.

Measurement model development
The deep learning model for SIRM measurement included two parts: a landmark detection network used to identify landmarks on flexion, neutral, and extension cervical lateral radiographs and mathematical formulae to calculate SIRM values.
The main structure of the landmark detection network was High-Resolution Net (HRNet), a novel deep convolutional neural network with excellent performance in localizing anatomical landmarks on medical images [22]. HRNet maintains high-resolution representations through parallel branches from beginning to end and repeatedly fuses features from different scales to achieve solid semantics and accurate location. Due to the proximity of the landmarks on cervical radiographs, HRNet's ability to preserve image details is crucial for model training. The landmark detection network consisted of four stages, beginning with a high-resolution branch as the first stage and then summing the high-to-low resolution branches in parallel to form the subsequent stages. At the end of each stage, information was repeatedly exchanged between parallel branches [23]. The final output was a 22-channel heatmap regressed from the high-resolution representation of the last stage. The coordinates with the maximum values in the heatmap were selected as the positions of predicted landmarks, which were mapped to the corresponding positions on the original image by applying affine transformation. To compare the ground truth and prediction heatmaps, the loss function was defined as the mean square error.
To build the landmark detection network, we trained our model on flexion, neutral, and extension cervical lateral radiographs. All images were preprocessed by resizing to a resolution of 512 × 512 pixels and augmented by random rotation, horizon flip, and random scale. The pixel spacing of each image was 0.143 mm. We used the stochastic gradient descent (SGD) optimizer with a base learning rate of 1e − 6 , a momentum of 0.9, and a weight decay of 0.0005. The model was trained on PyTorch (Version 1.3) for 120 iterations with a batch size of 12 on NVIDIA TITAN Xp GPUs. The model with the least loss on the validation set was verified using the test set.
The coordinates of the predicted landmarks and the mathematical formulae for measurement were used for automatic calculations of SIRM by Python (version 3.7). An overview of model implementation is presented in Fig. 3.

Evaluation and statistical analysis
All analyses were performed using MedCalc software (version 20.023) and Microsoft Excel 2020 with statistical significance defined by values of P < 0.05.

Reliability of landmark annotation
For assessment of the intra-and inter-observer reliability of landmark annotation, the landmark-to-landmark distance was represented as percentages within 1-3-mm thresholds.

Landmark performance
The metrics of percentage of correct key points (PCK) and mean of the percentage of correct key points (MPCK) were used for evaluating the performance of landmark prediction. PCK was defined as the percentage of predicted landmarks that fell within the r-radius neighborhood of the reference standard landmark [24]. MPCK was defined as the mean PCK values of each vertebra from C2 to C7 (MC2-MC7) [22]. The reference standards were the averages of landmark coordinates annotated by the three radiologists [25].

Measurement performance
For further evaluation of measurement performance, our model was compared with the reference standards on the test set by calculating the intra-class correlation coefficient (ICC), the Pearson correlation coefficient (r), MAE, and the root mean square error (RMSE). The ICC was calculated for the evaluation of consistency, and an ICC ≥0.7 was considered adequate for reliability. An |r| ≥0.7 indicated a high correlation. MAE was defined as 1 where i was the number of images. Additionally, the mean difference and 95% limit of agreement (LoA) were determined on Bland-Altman plots. The reference standards were the averages of measurements from the three radiologists [25]. To compare the performance of the model with that of each radiologist, the paired differences between the value from each individual radiologist and the average from the other two radiologists were compared with the difference between the same average value and the model value using paired t-test for comparing MAE [12].

General data distributions
A total of 932 cases with flexion, neutral, and extension cervical lateral radiographs were evaluated. There were 665, 167, and 100 patients in the training, validation, and test sets, respectively. There was no significant difference between the three datasets in gender composition and age ( Table 1).

Landmark performance
The PCKs at the 2-mm distance threshold on the flexion, neutral, and extension views were 95-100%, 94-100%, and 94-100%, respectively (Additional file 1). The MPCKs for each vertebra from C2 to C7 at the 2-mm distance threshold on the flexion, neutral, and extension views were 98-99%, 98-99%, and 97-100%, respectively (Fig. 4). The average annotating time for one cervical lateral radiograph was 0.066 s, which was much faster than the annotating time of 2.1 min for a radiologist. Representative examples of landmark detection by the model are shown in Fig. 5.

Measurement performance
Measurement values from three radiologists and model estimates for SIRM were shown in Table 3 Table 4). The Bland-Altman plots with 95% LoAs and scatter diagrams of correlation analysis are shown in Fig. 6 (F/E motion) and Additional files 2 and 3 (F/N and N/E motion).
On F/E motion, the MAEs of the model were significantly lower than those of R1 and R2 at C2/3 (P < 0.05) and those of R2 at C3/4 and C6/7 (P < 0.05). On F/N motion, the MAEs of the model were significantly lower than that of R3 at C2/3 (P < 0.05) and those of R1, R2, and R3 at C6/7 (P < 0.05). On N/E motion, the MAE of the model was significantly lower than that of R1 at C2/3 (P < 0.05; Table 5).

Discussion
In the present study, we developed a deep learning-based model to detect landmarks necessary for measuring cervical SIRM. On the test set, we found that our landmark detection network achieved the PCKs ranging from 94 to 100% at the 2-mm distance threshold. Based on this network, the developed model for automatic SIRM measurements was comparable in performance to radiologists' calculations.
Manual annotation is the main source of observer differences in spinal measurement. The reliability depends on the experience and judgment of radiologists. A landmark-to-landmark distance of 2.98 mm for inter-observer observations was reported to be acceptable for clinical analysis [26]. In the present study, the PCKs of our developed model at a 2-mm distance threshold ranged from 97 to 98% on the three views, which was similar to the percentage of inter-observer landmark distance from three radiologists. As a result, both the model and the radiologists were able to provide reliable landmark annotations. On all three views, the PCKs of C2 within a 2-mm distance threshold were relatively higher than other segments, which might be contributed to fewer degenerations occurring at C2 [27].
Measurement performance is mostly evaluated by calculating various measurement errors. In the applications of the spine, the MAEs could be less than 2° or close to 10° [19,28]. This indicates the performance of models varying greatly in different spinal landmarks and parameters. For SIRM, the interobserver variability of manual measurement could be up to 5.2°, which might not provide accurate evaluations for instability, abnormality, and preoperative motion function [29]. A study conducted by Frobin et al. reported that the error (standard deviation, SD) of approximately 2° was satisfactory for clinical cervical motion analysis [21]. In our test set, the model demonstrated excellent measurement performance and reliable clinical application with MAEs and SDs ranging from 1.19° to 1.69° and 1.50° to 2.27°, respectively. In the comparison of the model and radiologists, the MAEs of our model were equal to or significantly lower than those of the radiologists, indicating that our model showed similar or smaller errors compared to the radiologists. The model also achieved satisfactory agreement from C3/4 to C6/7, but the ICCs and rs at C2/3 were not sufficient to guarantee reliable consistency, especially on N/E motion (ICC = 0.60, r = 0.61). This might be due to the extremely small range of motion at C2/3, resulting in even slight differences (MAE = 1.21-1.40) having significant impacts [20].
Flexion, neutral, and extension cervical lateral radiographs are essential tools in the assessment of cervical SIRM and there will be great translational potentials in future clinical practice. The model will automatically generate parameter measurement reports for doctors and patients to facilitate clinical diagnosis and treatment guidance. With the expansion  . 4 The ability of landmark prediction. The prediction ability of our model is shown for each vertebra from C2 to C7. The first to third rows show the performance on flexion, neutral, and extension views, respectively of the database, the obtained measurement results will be used to build population-based models to provide personalized reference intervals for cervical SIRM of different genders and ages in asymptomatic and symptomatic individuals.
The present study does have several limitations. First, for the correctness and integrity of landmark annotation, we excluded a large number of patients based on postoperative status and obscuration of the C7 vertebral bodies. Second, because of inherent variations in manual annotation and the lack of a gold standard, some difficulties remain in accurately comparing performance between radiologists and the model. Third, the category and size of the training dataset are insufficient to represent the complex clinical environment. In future research, we will include more kinds of cases, with particular inclusion of patients with implanted surgical devices. For unsatisfactory landmark prediction due to anatomical variation or overlap, radiologists could slightly adjust the landmarks, and the feedback could be used to enhance model performance in efforts to further improve our model.

Availability of data and materials
The datasets generated and analyzed during the current study are not publicly available due to patient privacy concerns but are available from the corresponding author on reasonable request.

Declarations
Ethics approval and consent to participate This study was approved by the Ethics Committee of Zhejiang Provincial People's Hospital, China (No. 2022QT041). A certificate of approval has been provided. All procedures were performed in accordance with the Declaration