Intelligent system for auxiliary diagnosis of spinal cord injury based on MRI image
By developing an intelligent system based on MRI imaging, combining semantic segmentation model and integrated learning model, misdiagnosis and misdiagnosis in spinal cord injury diagnosis are solved, and high sensitivity and specific diagnosis and scoring are achieved, reducing patient health and economic damage.
Patent Information
- Application Number
- CN202411509105.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-04-15
Smart Images

Figure CN119833102A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of auxiliary diagnosis of spinal cord injury, and in particular to an intelligent system for auxiliary diagnosis of spinal cord injury based on MRI images. Background Art
[0002] Spinal cord injury and current clinical issues that need to be addressed:
[0003] Spinal cord injury is a common and serious accidental injury disease, which can bring catastrophic consequences and huge economic burden to patients. At present, the severity of spinal cord injury patients is mainly assessed clinically based on the International Standard for Neurological Classification of Spinal Cord Injury (ISNCSCI) formulated by the International Spinal Cord Injury Society and the American Spinal Injury Association in 2011, the ASIA impairment grading and conventional magnetic resonance imaging (MRI) comprehensive evaluation. At present, the most commonly used method for clinical evaluation of the severity of spinal cord injury patients is the ASIA impairment grading and conventional MRI comprehensive evaluation.
[0004] MRI is an important basis for diagnosing spinal cord injury, but the signal of spinal cord injury on MRI is not easy to identify and requires the physician's experience. The difficulty in judging the location of the injured spinal cord based on MRI reading lies in:
[0005] 1. The spinal curvature and spinal canal size of each patient are different, so doctors need to have rich experience to minimize missed diagnosis and misdiagnosis.
[0006] 2. MRI imaging is affected by the patient's position, whether the patient remains still during filming, and the MRI machine. This means that the image quality is not always good when patients with spinal cord injuries take MRIs.
[0007] MRI images are very important for patients with spinal cord injuries, because doctors can objectively understand the patient's condition through MRI images, and use this as an important basis to formulate subsequent treatment plans. However, there are pain points in the clinic: hospitals at all levels may receive patients with spinal cord injuries, but not all doctors in hospitals of all levels have rich experience. The level of doctors in some secondary hospitals, county hospitals, and some private hospitals varies, and missed diagnoses and misdiagnoses may occur, causing damage to the patient's physical health and economy.
[0008] Therefore, an intelligent system based on MRI image-assisted diagnosis of spinal cord injury is very necessary. Summary of the invention
[0009] The technical problem to be solved by the present invention is to provide an intelligent system for diagnosing spinal cord injury based on MRI images in view of the deficiencies of the above-mentioned prior art.
[0010] The purpose of the present invention is achieved through the following technical solutions:
[0011] An intelligent method for diagnosing spinal cord injury based on MRI images, specifically comprising the following steps;
[0012] Step 1: construct a semantic segmentation model of spinal cord injury based on MRI;
[0013] Step 2: Develop an original integrated learning model for intelligent evaluation of ASIA scoring;
[0014] Step 3, MRI machine and ROI delineation;
[0015] Step 4, architecture of attention neural network;
[0016] Step 5: Pre-training of the semantic segmentation model of spinal cord injury based on T2-weighted MRI images;
[0017] Step 6: Feature extraction and consistency analysis.
[0018] As a further preferred embodiment of the intelligent method for MRI-based image-assisted diagnosis of spinal cord injury of the present invention, in step 2, an original algorithm is used to evaluate the ASIA score; the original algorithm includes two parts: a feature engineering part and a model fusion part;
[0019] The feature engineering part is as follows: based on L1 regularized logistic regression, an embedded feature engineering algorithm is constructed; in order to prevent the model from reaching the local optimum, a simulated annealing algorithm is introduced;
[0020] The ASIA scores were divided into two groups, with scores A, B, and C as the ASIA-high group and score D as the ASIA-low group, and the binary ASIA score labels were recoded;
[0021] We obtained the binary and quadrilateral labels of the ASIA score. The binary labels are ASIA-high and ASIA-low. The quadrilateral labels are the four levels of ASIA score (A, B, C, D).
[0022] The embedded feature engineering algorithm and simulated annealing algorithm were used to extract strong features for each of the two-class and four-class categories, and the filtered features were used as the input of the fusion model; the SHAP value of each strong feature was calculated and visualized using matplotlib;
[0023] The model fusion part is as follows: a binary logistic regression model of the ASIA score is constructed, named Em-2Class, with labels ASIA-high and ASIA-low. If the model predicts an ASIA-low score, the output result is the D score. The model can accurately judge the D score in the ASIA score.
[0024] After excluding samples with D score, binary logistic regression models were constructed for the three ASIA scores, including A, B, and C scores;
[0025] First, 15 different decision tree models were built, and then the bagging method was used to fuse the models. We obtained an A score prediction model with good accuracy and robustness. The prediction results of the above two-classification model were embedded in the standardized image features, and the simulated annealing algorithm was used to screen strong features. Based on the screened strong features, a decision tree model was built, named Em-3Class, with labels A, B, and C scores. This model can accurately judge the A, B, and C scores in the ASIA score. The inputs of the above models are all training sets. The models Em-2Class and Em-3Class are fused in series, named Em-En, with labels A, B, C, and D scores. This model can accurately judge the A, B, C, and D scores in the ASIA score. In order to clarify the decision logic of the model, the Python library matplotlib was used to visualize the decision boundary.
[0026] The receiver operating characteristic (ROC) curve was used to evaluate the comprehensive performance and generalization ability of the integrated model; the precision-recall (PR) curve was used to evaluate the robustness of the model;
[0027] In order to clarify the actual prediction performance and generalization performance of the model, the confusion matrix heat map was drawn using the Python library matplotlib; based on the confusion matrix, the true positive TP, true negative TN, false positive FP, and false negative FN were calculated. Then the Accuracy, Specificity, Sensitivity, and F1-score of Em-En were calculated using the following formula:
[0028]
[0029] In the formula, C represents the number of multi-classifications of the model, which is 4 here. At the same time, the ROC curve was used to compare the prediction performance and generalization performance of multiple models, including: random forest RF, extreme boosting tree XGBoost, lightweight gradient boosting machine LGBM, support vector machine SVM, multivariate linear regression MLR, Em-En. The clinical decision curve DCA was used to compare the clinical decision benefits of multiple models.
[0030] As a further preferred embodiment of the intelligent method for MRI-assisted diagnosis of spinal cord injury of the present invention, in step 3, a 1.5T MRI scanner is used to obtain MRI images; all patients suspected of spinal cord injury are routinely scanned with sagittal T1WI (T1 weighted), T2WI (T2 weighted), and axial T2WI; sagittal T2WI is selected; the original MR image format DICOM is converted into a desensitized image format Nifti (Nii) and used for subsequent image feature extraction; for semantic segmentation research, all images are converted from pre-processed Nii to PNG format;
[0031] Based on python Version: 3.10.6, the original MR images in DICOM format were converted into Nii format and then loaded into MRIcroGL open source software Version: 12.2. Three senior radiologists manually drew the region of interest (ROI) of the lesion layer by layer to form a three-dimensional volume of interest (VOI). After the senior radiologists completed the drawing of the injured spinal cord, the referee checked the quality of the ROI and made adjustments.
[0032] As a further preferred solution of the intelligent method for MRI-assisted diagnosis of spinal cord injury of the present invention, in step 4, a Transformer-based U-Net optimization solution is used; UCTransnet is implemented in python, version 3.8.15, based on the pytorch framework, version 1.11.0, and the semantic segmentation of the injured spinal cord in MRI is trained. The input of the network is the PNG image of each layer of T2WI; after the input image is corrected by N4 bias field and Z-score normalization, it is resampled to 224×224×3 to provide a consistent input for the neural network;
[0033] The network consists of 4 layers, each with 3 modules. The first module has a convolutional layer with a kernel size of 3×3 and a stride of 1. The second module is a batch normalization and rectified linear unit. The third module is a channel cross-melting converter CCT between the original U-Net encoder and decoder. In CCT, there are 4 tokens (Ti) for search and 1 cascade token (Tc) for integration. The keys and values of the multi-head cross attention mechanism are Qi=TiWQi, K=TcWk, V=TcWv, where WQi, Wk, and Wv are weights of different inputs. The spinal cord injury (SCI) site occupies a smaller part in the MR image, and the size of the injured spinal cord of each patient is not consistent, and there is an imbalance in the foreground and background and the segmentation content. The final BCE-DICE loss function BDL is determined based on the binary cross entropy loss BCE and the dice similarity coefficient DICE:
[0034]
[0035] Among them, p represents the model prediction value, t represents the label value, w represents the readjusted weight of the loss of each batch element, here the value is [0.5, 0.5], i represents the batch element, n represents the number of samples, and s is the smooth value to prevent the loss from exploding, which is 1e-5 here.
[0036] As a further preferred embodiment of the intelligent method for diagnosing spinal cord injury based on MRI images of the present invention, in step 5, the pre-training of the semantic segmentation model of spinal cord injury based on T2-weighted MRI images is as follows:
[0037] Obtain the pre-trained network of the public dataset MoNuSeg Dataset, transfer the parameters of the network to the U-Net++ network, and input 13 layers of full-layer MR images of T2WI of patients with spinal cord injury in the training set into the network;
[0038] The full-layer T2WI image is input. The full-layer T2WI image contains some layers without ROI areas. The appropriate amount of artificially added noise may be beneficial to the robustness of the network.
[0039] The parameters of the first round of pre-training model were transferred to UCTransnet, and the T2WI MR images of patients with spinal cord injury with ROI areas in the training set were input into the network; formal training was performed based on the initial parameters batch size = 28, learning rate = 1e-4, embedding drop out rate = 0.1, and attention drop out rate = 0.1; the performance of the network was evaluated using the commonly used evaluation indicators of medical semantic segmentation, namely the average dice similarity coefficient mDICE, the average intersection-to-union ratio mIOU, the average specificity mSpecificity, and the average sensitivity mSensitivity; based on the test data, the predicted target area and the real target area were resampled to a one-dimensional array, and then the corresponding evaluation indicators were calculated. The calculation formula is as follows:
[0040]
[0041]
[0042] Among them, p represents the model predicted target, t represents the true target, i represents a single sample, n represents the number of samples, and s is the smoothing added to prevent the divisor from being less than 0, which is 1e-5 here. It is implemented in Python 3.8.15 and runs on a system with Ryzen 5800XCPU, RTX3090 GPU and 128GB memory.
[0043] As a further preferred solution of the intelligent method for MRI-assisted diagnosis of spinal cord injury of the present invention, in step 5, feature extraction and consistency analysis are specifically as follows:
[0044] The open source Python library Pyradiomics was used to extract imaging features from the VOI of each SCI patient. To obtain isotropic voxels, the VOI was resampled to 3 × 3 mm. To reduce imaging differences between different patients, N4 bias field correction and image normalization were performed so that all grayscale values in the image were distributed in the range of 0-600. The extracted features were divided into the following categories: first-order features, two-dimensional features, grayscale co-occurrence matrix GLCM, grayscale dependency matrix GLDM, grayscale size region matrix GLSZM, grayscale run length matrix GLRLM, and neighboring grayscale difference matrix NGTDM. A total of 854 imaging features were extracted from MRI T2WI, and all features were normalized using Z-score before entering the linear model.
[0045] The intraclass correlation coefficient (ICC) was calculated for each feature; features with intra-observer and intra-observer ICC values > 0.70 were retained.
[0046] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0047] 1. The present invention is an intelligent method based on MRI image-assisted diagnosis of spinal cord injury. Spinal cord injury is a very serious disease with serious consequences such as disability and death, so it cannot be missed when diagnosing spinal cord injury. Our specially trained semantic segmentation model for spinal cord injury has a sensitivity of 99.9%, which can prompt doctors to pay attention to MRI images of possible spinal cord injuries, greatly reducing the probability of missed diagnosis.
[0048] 2. The present invention is based on an intelligent method for MRI-assisted diagnosis of spinal cord injury. The semantic segmentation model of spinal cord injury has a specificity of 89.5% while maintaining extremely high sensitivity, indicating that the model is both sensitive and accurate;
[0049] 3. The present invention is an intelligent method for MRI-assisted diagnosis of spinal cord injury. The overlap rate between the MRI image spinal injury range determined by the model and the actual injury range reaches 77.7% (mDICE). Considering the sensitivity and specificity of the model, the loss of mDICE is partly due to false positives. In spinal cord injury, false positives are necessary because although false positives may indicate a larger range than the actual injury range, they can attract more attention from doctors and reduce the missed diagnosis rate.
[0050] 4. The present invention is an intelligent method for MRI-assisted diagnosis of spinal cord injury. The ASIA score is scored by the physician according to the degree of neurological damage of the patient, and the prognosis of the patient is judged based on clinical experience. This method of evaluating the degree of injury of the patient is obviously subjective and is affected by factors such as the individual conditions of the patient and the experience of the physician, resulting in the possibility of inaccurate ASIA score. The accuracy of the ASIA score is very important because the subsequent treatment plan for patients with spinal cord injury will refer to the ASIA score, so it is crucial to accurately and objectively evaluate the degree of injury of the patient, i.e., the ASIA score. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0052] Figure 1 is a schematic diagram of a semantic segmentation model of spinal cord injury of the present invention;
[0053] Figure 2 It is a schematic diagram of feature extraction of the present invention;
[0054] Figure 3 Schematic diagram of decision boundary of the present invention;
[0055] Figure 4 It is a performance schematic diagram of the model of the present invention. DETAILED DESCRIPTION
[0057] The present invention will be further described in detail below in conjunction with the embodiments, but the embodiments of the present invention are not limited thereto. The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. The present invention will be described in detail below according to the drawings and preferred embodiments, and the purpose and effect of the present invention will become clearer. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0058] Patients: This study collected magnetic resonance imaging (MRI) images of patients with spinal cord injury who visited Nantong First People's Hospital from May 2016 to April 2021 (within 48 hours of admission). The sample inclusion criteria are as follows: 1) diagnosis of spinal cord injury confirmed by imaging examination or signs of spinal cord injury and surgery; 2) injury site is cervical spine; 3) T2-weighted MRI images are available within 48 hours of admission; 4) complete and available imaging data, clinical data, including MRI, gender, and age. The exclusion criteria are as follows: 1) fracture accompanied by spinal cord concussion, and no obvious spinal cord abnormalities on MRI; 2) insufficient quality of MRI images or severe motion artifacts. A total of 189 patients with spinal cord injury (150 males and 39 females, aged 52-68 years) were included in the study (Table 1). Table 1 shows the basic information of patients with spinal cord injury.
[0059] Table 1
[0060]
[0061]
[0062] In order to minimize physicians' missed and misdiagnosed spinal cord injury patients, we built an MRI-based semantic segmentation model for spinal cord injury. In the semantic segmentation study, we selected 130 patients with typical MRI manifestations from 189 patients, and randomly divided the patients into a training set (104 patients), a validation set (13 patients), and a test set (13 patients) in a ratio of 8:1:1. Although the semantic segmentation model is not our original creation, we innovatively used transfer learning to preheat the model, and in subsequent training, we made special adjustments for spinal cord injury, so that the model has excellent performance.
[0063] Excellent performance is reflected in:
[0064] 1. Spinal cord injury is a very serious disease with serious consequences (disability, death, etc.), so it cannot be missed when diagnosing spinal cord injury. Our specially trained semantic segmentation model for spinal cord injury has a sensitivity of 99.9%, which can prompt doctors to pay attention to the possible damaged spinal cord parts (MRI images), greatly reducing the probability of missed diagnosis.
[0065] 2. The spinal cord injury semantic segmentation model has a specificity of 89.5% while maintaining extremely high sensitivity, indicating that the model is both sensitive and accurate
[0066] 3. The overlap rate between the MRI spinal injury range judged by the model and the actual injury range reached 77.7% (mDICE). Considering the sensitivity and specificity of the model, part of the mDICE loss comes from false positives. In spinal cord injuries, false positives are necessary because although false positives may indicate a larger range than the actual injury range, this can attract more attention from doctors and reduce the missed diagnosis rate.
[0067] In order to improve the accuracy of physicians in judging the severity of spinal cord injury patients, we developed an original ensemble learning model for intelligently evaluating the ASIA score. In the ensemble learning study, we selected 183 patients with an ASIA score greater than E (because the ASIA score of E means that the patient has no symptoms of neurological damage, so they were excluded) from 189 patients, and randomly divided them into a training set (a total of 146 patients, specifically: 34 patients with A score, 40 patients with B score, 28 patients with C score, and 44 patients with D score) and a validation set (a total of 37 patients, specifically: 10 patients with A score, 6 patients with B score, 10 patients with C score, and 11 patients with D score) in an 8:2 ratio.
[0068] MRI machine and ROI delineation
[0069] MRI images were obtained using a 1.5T MRI scanner (Siemens Symphony Tim 1.5T) (Table 2). All patients suspected of spinal cord injury were routinely scanned with sagittal T1WI (T1-weighted), T2WI (T2-weighted), and axial T2WI. In this study, we chose sagittal T2WI. The original MR image format DICOM was converted into the desensitized image format Nifti (Nii) and used for subsequent image feature extraction. For semantic segmentation studies, all images were converted from the preprocessed Nii to PNG format.
[0070] Based on python (Version: 3.10.6), the original MR images in DICOM format were converted to Nii format and then loaded into MRIcroGL open source software (Version: 12.2). Three senior radiologists (with 20, 23, and 31 years of experience in spinal MRI, respectively, and the expert with 31 years of experience in spinal MRI was also the referee) manually delineated the region of interest (ROI) of the lesion layer by layer to form a three-dimensional (3D) volume of interest (VOI). After the senior radiologists completed the drawing of the injured spinal cord, the referee checked the quality of the ROI and made some adjustments. Table 2 shows the parameters of the MRI machine.
[0071] Table 2
[0072]
[0073] Architecture of attention neural network: U-Net backbone has become a common solution for medical image segmentation tasks. However, in the traditional U-Net structure, the connection between the encoder and decoder is single, which may lose some important features. In the optimization scheme of U-Net structure, such as U-Net++, in some cases, shallower features with less semantic information may damage the final performance through simple skip connections due to the semantic gap between the shallower encoder and decoder. The Transformer backbone originated from natural language processing (NLP) has excellent global connectivity, so we chose the Transformer-based U-Net optimization scheme. We implemented UCTransnet in python (version: 3.8.15) based on the pytorch framework (version: 1.11.0) and trained it for semantic segmentation of injured spinal cord in MRI. The input of the network is PNG images of each layer of T2WI. After N4 bias field correction and Z-score normalization, we resampled the input images to 224×224×3 to provide consistent input for the neural network.
[0074] The network consists of 4 layers, each with 3 modules. The first module has a convolutional layer with a kernel size of 3×3 and a stride of 1. The second module is batch normalization and rectified linear unit. The third module is Channel-wise Cross Fusion Transformer (CCT) between the vanilla U-Net encoder and decoder. In CCT, there are 4 tokens (Ti) for search and 1 concatenated token (Tc) for integration. The keys and values of Multi-head cross-attention are Qi=TiWQi, K=TcWk, V=TcWv, where WQi, Wk, and Wv are weights of different inputs. The spinal cord injury (SCI) site occupies a smaller part in the MR image, and the size of the injured spinal cord of each patient is not consistent, and there is an imbalance in the foreground and background and the segmentation content. In order to better guide the feature extraction and information filtering of the network, we determined the final BCE-DICE loss function (BDL) based on Binary Cross Entropy Loss (BCE) and Dicesimilarity coefficient (DICE):
[0075]
[0076] In the above loss function formula, p represents the model prediction value, t represents the label value, w represents the readjusted weight of the loss of each batch element, which is [0.5, 0.5] here, i represents the batch element, n represents the number of samples, and s is the smoothing value to prevent loss explosion, which is 1e-5 here.
[0077] Pre-training of the semantic segmentation model of spinal cord injury based on T2-weighted MRI images: Optimization of the traditional U-Net model U-Net++ communicates the encoder and decoder channels by connecting each adjacent neuron. Although simple skip connections may damage the final performance, this also retains information to a large extent, so we used the U-Net++ network for the first round of pre-training. First, we obtained the pre-trained network of the public dataset MoNuSeg Dataset (https: / / github.com / McGregorWwww / UCTransNet.git), migrated the parameters of the network to the U-Net++ network, and input the full-layer MR images (13 layers) of T2WI of spinal cord injury patients in the training set into the network. In order to obtain better migration parameters for subsequent training, we input the full-layer images of T2WI. The full-layer images of T2WI contain some layers without ROI areas. The appropriate amount of noise artificially added may be beneficial to the robustness of the network.
[0078] Subsequently, we migrated the parameters of the first round of pre-trained models to UCTransnet, and input the T2WI MR images of patients with spinal cord injury with ROI areas in the training set into the network. Formal training was performed based on the initial parameters batch size = 28, learning rate = 1e-4, embedding drop out rate = 0.1, and attention drop out rate = 0.1. We used the commonly used evaluation indicators of medical semantic segmentation, mean(m)DICE, mean intersection over union (mIOU), mSpecificity, and mSensitivity, to evaluate the performance of the network. Based on the test data, we first resampled the predicted target area and the true target area to a one-dimensional array, and then calculated the corresponding evaluation indicators. The calculation formula is as follows:
[0079]
[0080] In the above formula, p represents the model predicted target, t represents the real target, i represents a single sample, n represents the number of samples, and s is the smoothing added to prevent the divisor from being less than 0, which is 1e-5 here. Our research was implemented in Python 3.8.15 and ran on a system with a Ryzen 5800X CPU, RTX3090 GPU, and 128GB of memory.
[0081] Feature extraction and consistency analysis:
[0082] The open source Python library Pyradiomics (https: / / pypi.org / project / pyradiomics / ) was used to extract imaging features from the VOI of each SCI patient. To obtain isotropic voxels, the VOI was resampled to 3 × 3 mm. To reduce imaging differences between different patients, N4 bias field correction and image normalization were performed so that all grayscale values in the image were distributed in the range of 0-600. The extracted features were divided into the following categories: first-order features, two-dimensional features, gray-level co-occurrence matrix (GLCM), gray-level dependency matrix (GLDM), gray-level size region matrix (GLSZM), gray-level run length matrix (GLRLM), and neighboring gray-level difference matrix (NGTDM). A total of 854 imaging features were extracted from MRI T2WI, and all features were normalized using Z-score before entering the linear model.
[0083] To avoid subjective differences in lesion segmentation and ensure reproducibility, we calculated the intraclass correlation coefficient (ICC) for each feature. Features (235) with intra-observer and intra-observer ICC values > 0.70 were retained.
[0084] Original algorithm for evaluating ASIA score: ASIA score has four class labels (A, B, C, D score), so this is a multi-classification problem. As we all know, tree models perform well in multi-classification problems, so we first use LASSO regression based on L1 regularization for feature selection, and then select random forest (RF), extreme boosting tree (XGBoost), and lightweight gradient boosting machine (LGBM) for training. However, we found that the above models have uncorrectable overfitting, which indicates that the model has obtained a local optimal solution, and also suggests that there may be a linear correlation between features and labels. We then constructed classic linear models, including: support vector machine (SVM) and multivariate linear regression (MLR), and found that linear models cannot accurately predict ASIA scores.
[0085] Therefore, in order to accurately evaluate the ASIA score, we developed an original algorithm. Our original algorithm is divided into two parts: feature engineering and model fusion.
[0086] Feature Engineering: Based on L1 regularized logistic regression, we constructed an embedded feature engineering algorithm. At the same time, in order to prevent the model from getting local optimality, we introduced a simulated annealing algorithm. Next, we divided the ASIA scores into two groups, with A, B, and C scores as the ASIA-high group and D score as the ASIA-low group, and recoded the binary ASIA score labels. In summary, we obtained the binary labels (ASIA-high, ASIA-low) and four-category labels (A, B, C, D scores) of the ASIA scores. Next, the embedded feature engineering algorithm and the simulated annealing algorithm were used to extract strong features for each of the two and four categories, and these filtered features were used as the input of the fusion model. In addition, in order to evaluate the impact of strong features on the model, we calculated the SHAP value of each strong feature and visualized it using matplotlib.
[0087] Model fusion part: First, we built a binary logistic regression model for ASIA score, named Em-2Class, with labels ASIA-high and ASIA-low. If the model predicts ASIA-low, the output result is D score. The model can accurately judge the D score in ASIA score. Then, after excluding the samples with D score, binary logistic regression models are built for the three ASIA scores (A, B, C). We found that the generalization performance of the simple logistic regression model based on the score classification A score is weak. In order to improve the robustness of the model, we first built 15 different decision tree models, and then used the bagging method for model fusion. Finally, we obtained an A score prediction model with better accuracy and robustness. The prediction results of the above binary classification models are embedded in the standardized image features, and the simulated annealing algorithm is used to select strong features. Based on the strong features after screening, a decision tree model is built, named Em-3Class, with labels A, B, and C scores. The model can accurately judge the A, B, and C scores in ASIA score. The inputs of the above models are all training sets. The models Em-2Class and Em-3Class are fused in series and named Em-En. The labels are A, B, C, and D scores. The model can accurately judge the A, B, C, and D scores in the ASIA score. In order to clarify the decision logic of the model, we use the Python library matplotlib to visualize the decision boundary.
[0088] We used the receiver operating characteristic (ROC) curve to evaluate the comprehensive performance and generalization ability of the integrated model. The precision-recall (PR) curve was used to evaluate the robustness of the model. In order to clarify the actual prediction performance and generalization performance of the model, we used the Python library matplotlib to draw a confusion matrix heat map. Based on the confusion matrix, we calculated true positive (TP), true negative (TN), false positive (FP), and false negative (FN). Then the Accuracy, Specificity, Sensitivity, and F1-score of Em-En were calculated using the following formula:
[0089]
[0090]
[0091] In the above formula, C represents the number of multi-classifications of the model, which is 4 here. At the same time, the ROC curve was used to compare the prediction performance and generalization performance of multiple models, including: random forest (RF), extreme boosting tree (XGBoost), lightweight gradient boosting machine (LGBM), support vector machine (SVM), multivariate linear regression (MLR), Em-En, and the clinical decision curve (DCA) was used to compare the clinical decision benefits of multiple models.
[0092] Statistical analysis: All statistical tests were performed using Python 3.10.6 and Python 3.8.15 (https: / / www.python.org / ). Continuous and categorical variables were expressed as standard deviation and count ± mean, respectively. The normality of the distribution of continuous data was tested using the Kolmogorov-Smirnov test. Univariate continuous variable analysis was performed using ANOVA, Mann–Whitney U test, and Kruskal–Wallis test algorithms. Categorical variables were compared using the chi-square test or Fisher's exact test. P values less than 0.05 were considered statistically significant. Pearson correlation analysis was performed to assess the correlation between continuous variables, and if pvalue < 0.05, there was a correlation between the variables.
[0093] Pre-training of the semantic segmentation model for spinal cord injury based on MRI images: Pre-training using full-layer T2WI MR images took 140 hours on the RTX 3090 graphics processing unit (GPU) (a total of 5 full trainings, using dropout and early stopping to confirm the optimal model). The networks with the best performance in the 5 trainings were applied to the test set, and the mean (m) DICE, specificity, and sensitivity of these networks were calculated (Table 3). The results showed that the network had a specificity of 79.0%, a sensitivity of 99.5%, and an mDICE of 76.1%, indicating that the semantic segmentation logic was conservative and unbalanced. The network took 0.048 seconds to apply to the test data of a layer of T2WI MR images. In summary, the intelligent reading process of a single patient can be completed within 0.63 seconds.
[0094] Transfer learning of attention neural network: After transfer learning using MR images with ROI regions of T2WI of patients with spinal cord injury in the training set (a total of 5 complete trainings, based on RTX 3090 GPU), the resulting network was applied to the test data to produce average DICE, specificity and sensitivity (Table 3). We found that the sensitivity of the UCTransnet network after transfer learning was improved compared with the pre-trained model (99.5% --> 99.9%), and the sensitivity was greatly improved (79.0% --> 89.5%). This is due to the positive role of the CCT module in channel-wise connection and global vision. It also suggests that the loss function BDL corrects the imbalance of foreground and background and segmentation content. At the same time, the network has also improved mDICE compared with the pre-trained model (76.1% --> 77.7%). The UCTransnet network is more lightweight than the U-Net++ network, which is also confirmed by our test results. The network takes only 0.024 seconds to apply to the test data of a layer of MR images, and the entire segmentation process of a patient can be completed in 0.31 seconds. This will be conducive to the final deployment of the network.
[0095] In order to confirm the actual segmentation performance of the network, we randomly selected two patients in the test group for prediction. Figure 2As shown, the actual prediction performance of the network is excellent and has good robustness (Figure 2A, B, C, D, E, G). In order to further clarify the segmentation logic of the network, we developed a hook algorithm to obtain the attention weights and visualize them in the form of a heat map. We found that the network's attention field is a rectangle surrounding the injury site, whose area is smaller than the input image, and the weights of the spinous processes and interspinous spaces near the two ends of the injury site are significantly higher than other locations (Figure 2F, G). This suggests that the network first locates the rectangular fuzzy range of the injury site, then determines the edge and length of the spinal canal containing the injury site based on the spinous processes and interspinous spaces, and finally completes the segmentation of the injured spinal cord.
[0096] Table 3 shows the performance of the semantic segmentation model of spinal cord injury based on MRI images.
[0097] Table 3
[0098]
[0099] Results of feature extraction and selection:
[0100] First, we used the Python library Pyradiomics to extract 854 imaging features for each patient from each layer of VOI. Based on the ASIA four-classification labels (A, B, C, D), we used LASSO regression and z score normalization, cleaned all features, and selected all features with non-zero coefficients to build a classification model using a five-fold cross-test (Figure 3A). We used the 88 features selected by LASSO regression as input and the ASIA four-classification as labels to build RF, XGBoost, LGBM, SVM, and MLR models. We found that these models performed poorly in predicting the accuracy, sensitivity, and specificity of patients' ASIA scores, and the clinical decision-making benefits (DCA curves) were also small (Figure 5E, F).
[0101] Subsequently, we used an embedded feature selection algorithm based on L1 regularized logistic regression and a simulated annealing algorithm to obtain the strong features of each category of the ASIA score according to the optimal learning curve and optimal termination temperature of logistic regression. We obtained a total of 51 strong features for the ASIA binary labels (ASIA-high, ASIA-low), 50 strong features for the C score, 26 strong features for the B score, 18 strong features for the A score, and 221 strong features for the fusion model. Co-expression analysis was then used to clarify the co-expression between these features. We found that the strong features of each category of the ASIA score are specific, which indicates that the MRI imaging manifestations of patients with different ASIA scores vary greatly (Figure 3B). The 88 features selected by LASSO regression do not cover the characteristics of each ASIA score well, which once again proves that the specificity of patients with different ASIA scores is high and a single model cannot accurately evaluate the ASIA score. At the same time, we calculated the SHAP value of each strong feature to further clarify the impact pattern of each feature on the model decision (Figure 3C-D). Feature extraction as Figure 2 shown.
[0102] Performance of the fusion model: We developed an original fusion model, which uses model fusion to solve the problem of high specificity of strong features in each category of the ASIA score mentioned above. First, we built an MLR model and named it Em-2Class, whose input is the strong features of 51 ASIA binary classification labels (ASIA-high, ASIA-low), and its labels are ASIA-high and ASIA-low respectively. The model can accurately distinguish between ASIA-high and ASIA-low spinal cord injury patients, and has excellent robustness (Table 4). In order to further clarify the decision logic and fit of the model, we calculated the decision boundary of Em-2Class and visualized it (Figure 4A,B). The model has excellent fit, and there is no underfitting or overfitting. Next, we continued to build three models for feature reconstruction in the patients in the ASIA-high group, including two MLRs and one integrated model, and named them Em-C, Em-B, and Em-A. Their inputs were: strong features of C score, strong features of B score, and strong features of A score, and their labels were binary recoded A, B, and C scores, respectively. Subsequently, we input the reconstructed features into the decision tree model and named it Em-3Class, with its labels A, B, and C scores (Table 4). By calculating the decision boundary of Em-3Class, we found that the model has clear decision logic, excellent fitting degree, and excellent robustness (Figure 4C,D). Finally, Em-2Class and Em-3Class were fused in series to obtain the integrated model Em-En (Table 4). The evaluation indicators of all the above models are based on the validation data. Table 4 shows the performance of the original fusion model.
[0103] Table 4
[0104]
[0105] The decision boundary diagram is as follows Figure 3 As shown in Figure 5E,F, Em-En is significantly ahead of other models in terms of sensitivity, specificity, accuracy, and clinical decision-making benefits (Figure 5E,F). In addition, Em-En not only has excellent predictive performance, but also has excellent comprehensive performance and generalization ability (Figure 5A-D). Figure 4 shown.
[0106] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.
Claims
1. An intelligent method for diagnosing spinal cord injury based on MRI images, characterized in that; The specific steps include: Step 1: construct a semantic segmentation model of spinal cord injury based on MRI; Step 2: Develop an original integrated learning model for intelligent evaluation of ASIA scoring; Step 3, MRI machine and ROI delineation; Step 4, architecture of attention neural network; Step 5: Pre-training of the semantic segmentation model of spinal cord injury based on T2-weighted MRI images; Step 6: Feature extraction and consistency analysis.
2. The intelligent method for diagnosing spinal cord injury based on MRI images according to claim 1, characterized in that; In step 2, an original algorithm is used to evaluate the ASIA score; the original algorithm includes two parts: feature engineering part and model fusion part; The feature engineering part is as follows: based on L1 regularized logistic regression, an embedded feature engineering algorithm is constructed; in order to prevent the model from reaching the local optimum, a simulated annealing algorithm is introduced; The ASIA scores were divided into two groups, with scores A, B, and C as the ASIA-high group and score D as the ASIA-low group, and the binary ASIA score labels were recoded; We obtained the binary and quadrilateral labels of the ASIA score. The binary labels are ASIA-high and ASIA-low. The quadrilateral labels are the four levels of ASIA score (A, B, C, D). The embedded feature engineering algorithm and simulated annealing algorithm were used to extract strong features for each of the two-class and four-class categories, and the filtered features were used as the input of the fusion model; the SHAP value of each strong feature was calculated and visualized using matplotlib; The model fusion part is as follows: a binary logistic regression model of the ASIA score is constructed, named Em-2Class, with labels ASIA-high and ASIA-low. If the model predicts an ASIA-low score, the output result is the D score. The model can accurately judge the D score in the ASIA score. After excluding samples with D score, binary logistic regression models were constructed for the three ASIA scores, including A, B, and C scores; First, 15 different decision tree models were built, and then the bagging method was used to fuse the models. We obtained an A score prediction model with good accuracy and robustness. The prediction results of the above two-classification model were embedded in the standardized image features, and the simulated annealing algorithm was used to screen strong features. Based on the screened strong features, a decision tree model was built, named Em-3Class, with labels A, B, and C scores. This model can accurately judge the A, B, and C scores in the ASIA score. The inputs of the above models are all training sets. The models Em-2Class and Em-3Class are fused in series, named Em-En, with labels A, B, C, and D scores. This model can accurately judge the A, B, C, and D scores in the ASIA score. In order to clarify the decision logic of the model, the Python library matplotlib was used to visualize the decision boundary. The receiver operating characteristic (ROC) curve was used to evaluate the comprehensive performance and generalization ability of the integrated model; the precision-recall (PR) curve was used to evaluate the robustness of the model; In order to clarify the actual prediction performance and generalization performance of the model, the confusion matrix heat map was drawn using the Python library matplotlib; based on the confusion matrix, the true positive TP, true negative TN, false positive FP, and false negative FN were calculated. Then the Accuracy, Specificity, Sensitivity, and F1-score of Em-En were calculated using the following formula: In the formula, C represents the number of multi-classifications of the model, which is 4 here. At the same time, the ROC curve was used to compare the prediction performance and generalization performance of multiple models, including: random forest RF, extreme boosting tree XGBoost, lightweight gradient boosting machine LGBM, support vector machine SVM, multivariate linear regression MLR, Em-En. The clinical decision curve DCA was used to compare the clinical decision benefits of multiple models.
3. The intelligent method for diagnosing spinal cord injury based on MRI images according to claim 1, characterized in that; In step 3, MRI images were obtained using a 1.5T MRI scanner; all patients suspected of spinal cord injury were routinely scanned with sagittal T1WI (T1-weighted), T2WI (T2-weighted), and axial T2WI; sagittal T2WI was selected; the original MR image format DICOM was converted into the desensitized image format Nifti (Nii) and used for subsequent image feature extraction; for For semantic segmentation study, all images were converted from pre-processed Nii to PNG format; Based on python version: 3.10.
6. The original MR images in DICOM format were converted into Nii format and then loaded into MRIcroGL open source software Version 12.
2. Three senior radiologists manually drew the lesion region of interest (ROI) layer by layer to form a three-dimensional volume of interest (VOI). After the senior radiologists completed the drawing of the injured spinal cord, the referees checked the quality of the ROI and made adjustments.
4. The intelligent method for diagnosing spinal cord injury based on MRI images according to claim 1, characterized in that; In step 4, the Transformer-based U-Net optimization scheme was implemented in python version 3.8.15 based on the pytorch framework version 1.11.0, and the semantic segmentation of injured spinal cord in MRI was trained. The input of the network was PNG images of each layer of T2WI; after N4 bias field correction and Z-score normalization, the input image was resampled to 224×224×3 to provide a consistent input for the neural network; The network consists of 4 layers, each with 3 modules. The first module has a convolutional layer with a kernel size of 3×3 and a stride of 1. The second module is a batch normalization and rectified linear unit. The third module is a channel cross-melting converter CCT between the original U-Net encoder and decoder. In CCT, there are 4 tokens (Ti) for search and 1 cascade token (Tc) for integration. The keys and values of the multi-head cross attention mechanism are Qi=TiWQi, K=TcWk, V=TcWv, where WQi, Wk, and Wv are weights of different inputs. The spinal cord injury (SCI) site occupies a smaller part in the MR image, and the size of the injured spinal cord of each patient is not consistent, and there is an imbalance in the foreground and background and the segmentation content. The final BCE-DICE loss function BDL is determined based on the binary cross entropy loss BCE and the dice similarity coefficient DICE: Among them, p represents the model prediction value, t represents the label value, w represents the readjusted weight of the loss of each batch element, here the value is [0.5, 0.5], i represents the batch element, n represents the number of samples, and s is the smooth value to prevent the loss from exploding, which is 1e-5 here.
5. The intelligent method for diagnosing spinal cord injury based on MRI images according to claim 1, characterized in that; In step 5, the pre-training of the semantic segmentation model of spinal cord injury based on T2-weighted MRI images is as follows: Obtain the pre-trained network of the public dataset MoNuSeg Dataset, transfer the parameters of the network to the U-Net++ network, and input 13 layers of full-layer MR images of T2WI of patients with spinal cord injury in the training set into the network; The full-layer T2WI image is input. The full-layer T2WI image contains some layers without ROI areas. The appropriate amount of artificially added noise may be beneficial to the robustness of the network. The parameters of the first round of pre-training model were transferred to UCTransnet, and the T2WI MR images of patients with spinal cord injury with ROI areas in the training set were input into the network; formal training was performed based on the initial parameters batch size = 28, learning rate = 1e-4, embedding drop out rate = 0.1, and attention drop out rate = 0.1; the commonly used evaluation indicators of medical semantic segmentation, such as the average dice similarity coefficient mDICE, the average intersection-to-union ratio mIOU, the average specificity mSpecificity, and the average sensitivity mSensitivity evaluates the performance of the network; based on the test data, the predicted target area and the actual target area are resampled to a one-dimensional array, and then the corresponding evaluation index is calculated. The calculation formula is as follows: Among them, p represents the model predicted target, t represents the true target, i represents a single sample, n represents the number of samples, and s is the smoothing added to prevent the divisor from being less than 0, which is 1e-5 here. It is implemented in Python 3.8.15 and runs on a system with Ryzen5800X CPU, RTX3090 GPU and 128GB memory.
6. The intelligent method for diagnosing spinal cord injury based on MRI images according to claim 1, characterized in that; In step 5, feature extraction and consistency analysis are performed as follows: The open source Python library Pyradiomics was used to extract imaging features from the VOI of each SCI patient. To obtain isotropic voxels, the VOI was resampled to 3 × 3 mm. To reduce imaging differences between different patients, N4 bias field correction and image normalization were performed so that all grayscale values in the image were distributed in the range of 0-600. The extracted features were divided into the following categories: first-order features, two-dimensional features, grayscale co-occurrence matrix GLCM, grayscale dependency matrix GLDM, grayscale size region matrix GLSZM, grayscale run length matrix GLRLM, and neighboring grayscale difference matrix NGTDM. A total of 854 imaging features were extracted from MRI T2WI, and all features were normalized using Z-score before entering the linear model. The intraclass correlation coefficient (ICC) was calculated for each feature; features with intra-observer and intra-observer ICC values > 0.70 were retained.