Diagnosis and Treatment Effect of Convolutional Neural Network-Based Magnetic Resonance Image Features on Severe Stroke and Mental State

The purpose of this paper is to explore the impact of magnetic resonance imaging (MRI) image features based on convolutional neural network (CNN) algorithm and conditional random field on the diagnosis and mental state of patients with severe stroke. 208 patients with severe stroke who all received MRI examination were recruited as the research objects. According to cerebral small vascular disease (CSVD) score, the patients were divided into CSVD 0∼4 groups. The patients who completed the three-month follow-up were classified into cognitive impairment group (124 cases) and the noncognitive impairment group (84 cases) according to the cut-off point of the Montreal cognitive assessment (MOCA) scale score of 26. A novel image segmentation algorithm was proposed based on U-shaped fully CNN (U-Net) and conditional random field, which was compared with the fully CNN (FCN) algorithm and U-Net algorithm, and was applied to the MRI segmentation training of patients with severe stroke. It was found that the average symmetric surface distance (ASSD) (3.13 ± 1.35), Hoffman distance (HD) (28.71 ± 9.05), Dice coefficient (0.78 ± 1.35), accuracy (0.74 ± 0.11), and sensitivity (0.85 ± 0.13) of the proposed algorithm were superior to those of FCN algorithm and U-Net algorithm. There were significant differences in the MOCA scores among the five groups of patients from CSVD 0 to CSVD 4 in the three time periods (0, 1, and 3 months) (P < 0.05). Differences in cerebral microhemorrhage (CMB), perivascular space (PVS), and number of cavities, Fazekas, and total CSVD scores between the two groups were significant (P < 0.05). Multivariate regression found that the number of PVS, white matter hyperintensity (WMH) Fazekas, and total CSVD score were independent factors of cognitive impairment. In short, MRI images based on deep learning image segmentation algorithm had good application value for clinical diagnosis and treatment of stroke and can effectively improve the detection effect of brain domain characteristics and psychological state of patients after stroke.


Introduction
Severe stroke is a cerebrovascular disease with high morbidity, disability, and mortality. Studies showed that the prevalence of cognitive impairment in patients with severe stroke was abnormally as high as 37% to 80%, and severe cases can be fatal [1,2]. erefore, the early diagnosis of severe stroke is particularly important. Generally, doctors perform magnetic resonance imaging (MRI) to diagnose severe stroke lesions, but it takes a long time to artificially segment severe stroke lesions and this process consumes manpower, material, and financial resources. e most severe problem is that it is affected by the subjective consciousness of medical staff [3]. erefore, it is very necessary to propose a high-efficiency and high-accuracy image segmentation algorithm. So far, convolutional neural network (CNN) algorithms have been widely used in medical image processing and lesion segmentation and have achieved remarkable results. Not only can they automatically extract the features in the data but also they have objectivity and efficiency compared with machine learning algorithms. Puri and Cox [4] proposed U-Net, which combines low-level information with high-level information to obtain an ideal segmentation effect. To make better use of the deep information of the three-dimensional image, the CNN can be adopted to propose an algorithm that can quickly and accurately segment the MRI images of patients with severe stroke, which will be helpful for medical workers to diagnose and treat patients with severe stroke early.
Cerebral small vascular disease (CSVD) is a common cerebrovascular disease that plagues the elderly. It can cause lacunar infarction, cerebral hemorrhage, and so forth, accounting for 20% of symptomatic strokes. 35% of Alzheimer's disease is closely related to CSVD [5,6]. Studies showed that patients with severe stroke often have different degrees of imaging features, which can lead to cognitive impairment and affect their later living conditions [7,8]. To reflect its impact on the brain, Nylander et al. [9] proposed the concept of "total CSVD score." Many studies revealed that the total CSVD score can well reflect the overall impact of imaging features on the brain and was closely related to the cognitive impairment of stroke patients. However, there are few reports on the characteristics of cerebrovascular disease in patients with CSVD and the impact of CSVD score on cognitive impairment after severe stroke. erefore, a new image segmentation algorithm was proposed based on U-Net algorithm and conditional random field algorithm, which was compared with FCN algorithm and U-Net algorithm. en, it was applied to MRI diagnosis of 208 patients with severe stroke in our hospital to study the relationship between MRI image features and CSVD score and cognitive impairment after severe stroke. It aimed to decrease the occurrence of cognitive impairment in severe stroke patients and perform early detection and early diagnosis, thereby alleviating the cognitive impairment in severe stroke patients.

Research Objects.
A total of 208 severe stroke patients who were admitted to the hospital from January 2017 to October 2020 were selected, 129 males and 79 females, aged 40-80 years. According to the total CSVD score, patients were rolled into CSVD 0-4 groups. Montreal cognitive assessment (MOCA) scale score of 26 was the cut-off point. e patients who received the 3-month follow-up were rolled into cognitive impairment group (124 cases) and noncognitive impairment group (84 cases). e study had been approved by the Medical Ethics Committee of the Hospital, and an informed consent form had been signed.
Inclusion criteria were as follows: (i) the definition of severe stroke being 21 points ≤ National Institutes of Health Stroke Scale (NIHSS) scores ≤ 42 points according to the diagnostic criteria and confirmed by imaging examination as cerebral infarction [10]; (ii) age ≥18 years; (iii) those who can cooperate with medical staff to perform scale scoring and MRI examination; (iv) the basic information being complete, and the most important thing was that the patient was willing to cooperate with the follow-up; and (v) patients who signed the informed consent.
Exclusion criteria were as follows: (i) patients with central nervous system disease; (ii) patients with history of drug abuse and alcohol abuse; (iii) patients who had a family history of dementia; (iv) patients with poor compliance; (v) patients who withdrew during the experiments; (vi) patients who cannot undergo imaging examination due to surgical implantation of organs; (vii) recurrence and death that occurred during the follow-up; and (viii) patients with anxiety and depression [11]. e scanning parameters were as follows: layer thickness of 5 mm, layer spacing of 1.5 mm, field of view (FOV) of 240 × 240 mm, and matrix of 310 × 246. e coronal and horizontal axis positions of TIWI and T2WI and the horizontal axis positions of T2-FLAIR, DWI, and SWI were collected. Two experienced radiologists and neurologists were selected for review.
MRI features included white matter hyperintensity (WMH) that may be vascular origin, cerebral microhemorrhage (CMB), perivascular space (PVS), and lacuna that may be of vascular origin. e image features and scoring criteria are shown in Table 1.

Image Segmentation Algorithm Based on U-Net and
Conditional Random Field. CNN developed based on neural networks has very superior performance in medical image processing. A new image segmentation algorithm was proposed in this research based on the U-Net and fully connected conditional random field. e U-Net network architecture consists of an encoding path and a decoding path. e encoding path can obtain spatial information, which is composed of multiple convolutional layers and downsampling layers. e decoding path can restore the input resolution and performs subconvolution and upsampling of these features. e convolution process is as follows: a n j � f i∈M j a n−1 In equation (1), k is the convolution kernel, n is the number of layers, k n ij is the weight, b is the bias value, and a n−1 j is the output of the previous layer. e sampling expression in the pooling layer is as follows: Contrast Media & Molecular Imaging a n j � f β n j down a n−1 In equation (2), down(·) is the downsampling function, while β and b denote the multiplicative bias and additive bias, respectively.
e algorithm proposed has an extra clipping layer and a multiloss structure, which can segment images of any size and solve the disappearance of gradients. In addition, the 1 × 1 convolution layer and softmax function of the convolution kernel are added, whose weights are 0.8 and 0.2, respectively. e fully connected layer is expressed as follows: a n � f w n a n− 1 + b n . (3) In equation (3), w n is the weight coefficient, a n− 1 is the output of the previous layer, and b n is the bias term. Softmax can finish more than two types of classification tasks. e calculation equation is as follows: In equation (4), c i ∈ R is the input sample, normalization, the total probability value is 1, and the loss function value of softmax is minimized through training sample T. e expression is as follows: e binary potential in fully connected CRF is used to improve the accuracy of segmentation. In this algorithm, the Gibbs distribution is expressed as follows: In equation (6), I is the final output of U-Net, Y � Y 1 , . . . , Y N is the category label, and −E(c | I) is the energy function.
e binary potential energy function is defined as follows: In equation (8), p i is the coordinate position of i, I i is the intensity of i, |I i − I j | is the gray value difference, ω 1 and ω 2 are the model weights, and σ α , σ β , and σ c are the standard deviation parameters. en, the segmentation results are postprocessed as follows: pre(a, b, c) is the voxel (health area: pre(a, b, c) � 0, stroke area: pre(a, b, c) � 1), and mean TTP (n) is the average gray value. First, the n-th three-dimensional connected domain of mean TTP (n) > ω 1 is removed, where pre(a, b, c) � 0 and ω 1 � 100. Second, whether it is a lesion area is determined according to the volume of the coarsely segmented lesion. v(n) represents the volume of the n-th connected Contrast Media & Molecular Imaging domain in pre, and V max is the volume of the largest connected domain.
From this, a new image segmentation algorithm is constructed, and the algorithm flow is shown in Figure 1.

Network Parameter Configuration.
e gradient descent algorithm was adopted for training. In this experiment, the ISLES2015 platform development environment was Matla-b2016aCaffe open-source library + cuda8.0 + cuDNN5.1. e operating systems were Windows 10 and Ubuntu 16.04, and the adaptive optimizer Adam [13] was selected. e parameter settings were as follows: the learning rate was 0.0001, the momentum was 0.9, the regularization coefficient was 0.0005, the maximum number of iterations was 21,000, and all biases were initialized to 0. e collected MRI images of 208 patients were set as training samples, and the algorithm proposed was employed to process the samples. en, the processing results were uploaded to the above platform for evaluation and were compared with those obtained based on FCN algorithm and the U-Net algorithm. Evaluation indicators included Hoffman distance (HD), average symmetric surface distance (ASSD), sensitivity (recall), Dice coefficient, and precision (precision).
In equations (9) and (10), the points on the lesion label and segmentation result are E and F, respectively, and ASD is average surface distance. Euclidean distance of points E and F is D(e, f).

Neuropsychological Evaluation after Severe Stroke.
In this study, the Montreal cognitive assessment (MOCA) scale was used to evaluate the cognitive level of psychology. It is a high-sensitivity and rapid screening scale for cognitive impairment developed by Schellhorn et al. [14] in 2005 with reference to the setting and scoring standards of minimental state evaluation (MMSE) cognitive items, and it is based on clinical experience. e test cognitive domains included attention, visual space and executive function, language, naming, delayed recall, abstraction, and orientation, with a total score of 30. A score of 26 was set as a cut-off point. A score lower than 26 was considered to have cognitive impairment, and a score higher than 26 indicated no cognitive impairment. In the subsequent follow-up, if the MOCA score increased by more than two points, it was considered as a certain degree of improvement in cognitive function. Hamilton anxiety rating scale (HAM-A) scoring and Hamilton depression rating scale (HAM-D) scoring were performed to rule out pseudocognitive disorders caused by anxiety and depression [11]. Follow-up was carried out after one month and three months after the stroke. e patient needed to cooperate with two professional neurologists for evaluation.

Statistical Methods.
e data obtained was analyzed by SPSS 25.0, and the measurement data were expressed as mean ± standard deviation (�x ± s). Single-factor logistic regression analysis, multifactor logistic regression analysis, regression analysis coefficient (R 2 ), and linear regression analysis were utilized.

Comparison of Training Results of
ree Algorithms. Figure 2 shows the comparison of ASSD and HD among the three algorithms. e ASSD obtained by the algorithm proposed in this research was (3.13 ± 1.35) and the HD was (28.71 ± 9.05), which were inferior to the results obtained by the FCN algorithm and the U-Net algorithm. is meant that the algorithm proposed can automatically segment the stroke lesions with the smallest segmentation error and the highest segmentation accuracy. Figure 3 shows the comparison of the Dice coefficient, accuracy, and sensitivity of the three algorithms. e Dice coefficient (0.78 ± 0.1), accuracy (0.74 ± 0.11), and sensitivity (0.85 ± 0.13) obtained by the proposed algorithm were higher than those of the other two algorithms, indicating that the proposed algorithm can automatically segment stroke lesions with the highest segmentation accuracy.

Comparison of MRI Image Segmentation Effects of ree
Algorithms. Figure 4 shows the comparison of the image segmentation effect among the algorithm based on U-Net and conditional random field, the FCN algorithm, and the U-Net algorithm. e proposed algorithm was compared with the FCN algorithm and the U-Net algorithm and applied to the MRI images of 208 severe stroke patients. According to the general structure, the segmentation effect of FCN algorithm and U-Net algorithm was not particularly outstanding, while the segmentation result based on U-Net and conditional random field algorithms was relatively accurate and fine.

Patient's MRI Image Feature Score and Psychological
Score.
e distribution of MRI features showed that there were 107 cases of WMH (51.4%), 106 cases of CMB (51.2%), 86 cases of lacuna (41.3%), and 87 cases of PVS (41.8%). e distribution of CSVD scores showed that there were CSVD 0 in 25 cases (12%), CSVD 1 in 54 cases (26%), CSVD 2 in 60 cases (28.8%), CSVD 3 in 52 cases (25%), and CSVD 4 in 17 cases (8.2%). Figure 5 shows the MOCA scores of patients in each group. MOCA scores of the five groups of patients from CSVD 0 to CSVD 4 were significantly different in three time periods (0, 1, and 3 months) (P < 0.05). en, the correlation between the MOCA score and the total CSVD score at these three times was analyzed. e results suggested that the MOCA scores of 0 months (r s � −0.675, P � 0.000), 1 month (r s � −0.715, P � 0.000), and 3 months (r s � −0.655, P � 0.000) were all negatively correlated with the total CSVD scores, all with significance (P < 0.05). Figure 6 shows the MRI image of a 65 year-old male patient. Epilepsy occurred, associated with altered states of consciousness, acute aphasia, and right staring. Its distribution characteristics did not conform to vascular distribution, edema and gyri enhancement appeared earlier, and cerebral perfusion was normal or increased. ere was no vascular occlusion, and sometimes there was both limited cortical diffusion and increased subcortical diffusion.

Explanatory Weight of MRI Feature Score in Cognitive Decline after Severe Stroke.
e patients three months after stroke were rolled into cognitive impairment group (59.6%, 124 cases) and noncognitive impairment group (40.4%, 84 cases) for comparison. Figure 7 shows that the differences in the number of CMB, PVS, and lacuna, Fazekas score, and total CSVD scores between the two groups were statistically substantial (P < 0.05).
Linear regression analysis was performed on the variables in Figure 8. Figure 8 shows the explanatory proportions of the number of CMB, PVS, and lacunae, Fazekas score, and total CSVD score to cognitive decline after severe stroke, all of which were significantly correlated with it. Among them, the total CSVD score had the highest explanatory degree (0.702), while the influence of other factors on cognitive decline was generally low. Figure 9 shows the singlefactor binary logistic regression analysis of the P < 0.05 variables of cognitive impairment. With the number of CMB, the number of PVS, the number of cavities, the WMH Fazekas score, and the total CSVD score as independent variables and cognitive impairment after severe stroke as the dependent variable, a single-factor binary logistic regression analysis was performed. e results showed that the number of CMB, the number of PVS, the number of cavities, WMH Fazekas score, and total CSVD score were significantly correlated with cognitive dysfunction (P < 0.05). Figure 10 illustrates the subsequent multivariate binary logistic regression analysis. With the number of CMB, the number of PVS, the number of cavities, the WMH Fazekas score, and the total CSVD score as independent variables and cognitive impairment after severe stroke as the dependent variable, the multivariate binary logistic regression analysis showed that the number of PVS, WMH Fazekas, and total CSVD score were independent factors of cognitive impairment (P < 0.05).   Figure 11, the linear regression model analysis shows that when the risk factors were not adjusted, the MOCA score, visual space and executive function, orientation, attention, and memory were all significantly negatively correlated (P < 0.05). After adjustment of risk

Discussion
Stroke is a cerebrovascular disease with high morbidity, disability, and mortality. As revealed by research, the prevalence of cognitive impairment in patients with severe stroke was as high as 37% to 80%, and severe cases can be fatal [15]. MRI is widely used in the inspection and diagnosis of CSVD and has significant advantages. However, it will be affected by objective factors such as patient's breathing rate and doctor's operation in actual operation. e quality of the final MRI image is poor, so it is imperative to select a suitable image segmentation processing algorithm [16]. erefore, a new image segmentation algorithm was proposed based on U-Net algorithm and conditional random field algorithm and was compared with FCN algorithm and U-Net algorithm. It was found that the ASSD (3.13 ± 1.35), HD (28.71 ± 9.05), Dice coefficient (0.78 ± 1.35), accuracy (0.74 ± 0.11), and sensitivity (0.85 ± 0.13) of this algorithm were superior to those of the other two algorithms. Such results suggested that the algorithm can automatically segment the stroke lesions, and it had the smallest segmentation error and the highest segmentation accuracy. en, the image segmentation algorithm based on U-Net and conditional random field was applied to the MRI diagnosis of 208 patients with severe stroke in our hospital to explore its impact on the mental state of patients with severe stroke. e Spearman rank correlation analysis revealed that the MOCA scores of 0 months (r s � −0.675, P � 0.000), 1 month (r s � −0.715, P � 0.000), and 3 months (r s � −0.655, P � 0.000) were negatively correlated with the total CSVD score, all with considerable significance (P < 0.05). After linear regression analysis, it was found that there was a significant negative correlation between the total CSVD score and the MOCA score, and the explanation had the highest proportion (0.702). However, the proportion of individual scores explaining cognitive impairment was generally low. Such result was the same as that of Del Brutto et al. [17] on the correlation between cognitive impairment and CSVD score. Single-factor binary logistic regression analysis of cognitive impairment group in severe stroke patients showed that the number of CMB, PVS, lacuna, WMH Fazekas score, and total CSVD scores all had a significant correlation (P < 0.05). Multivariate binary logistic regression analysis showed that the number of PVS, WMH Fazekas score, and total CSVD score were independent factors of cognitive impairment in severe brain, which was consistent with the results of the Sivakumar et al. [18], indicating that patients with severe stroke combined with the CSVD scores of the above items were relatively more likely to have cognitive impairment after stroke. After linear regression model analysis and correcting for risk factors, it was found that only the MOCA score, visual space and executive function, attention, and memory were significantly negatively correlated (P < 0.05), which was basically consistent with the research results of Liang et al. [19] on the correlation between total MRI cerebrovascular disease and cognitive impairment, indicating that it mainly affected attention, memory, and visual space and executive function.

Conclusion
In this research, a novel image segmentation algorithm was proposed based on the U-Net algorithm and the conditional random field algorithm and was compared with the FCN algorithm and the U-Net algorithm. en, the image segmentation algorithm based on U-Net and conditional   Contrast Media & Molecular Imaging random field was applied to the MRI diagnosis of 208 patients with severe stroke in our hospital to explore the impact of cerebrovascular burden on the mental state of patients with severe stroke. It was found that the proposed algorithm can automatically segment stroke lesions with the smallest segmentation error and the highest segmentation accuracy. In addition, the number of PVS, WMH Fazekas score, and total CSVD score were independent factors of severe cognitive impairment after severe stroke, which mainly affected attention, memory, and visual space and executive function. e overall CSVD score explained cognitive decline after severe stroke in a significantly higher proportion than the CSVD alone. erefore, clinicians should pay close attention to patients' CSVD when treating patients with severe stroke. Moreover, follow-up of cognitive function should be carried out, so as to realize early awareness and early intervention for patients with cognitive impairment as far as possible. However, there are still some problems to be solved in this study. ere are too few training samples for the MRI image segmentation algorithm, and its performance and possible shortcomings need to be further discussed in the future. Moreover, there are few indicators to evaluate the characteristics of brain domains in stroke patients, which also requires more in-depth analysis. In conclusion, this study provides a scientific theoretical basis for clinical diagnosis and treatment and psychological nursing intervention of patients with severe stroke.

Data Availability
No data were used to support this study.

Conflicts of Interest
e authors declare that they have no conflicts of interest.