摘要
出血量是脑出血疾病分级、治疗方案确定和预后判断的重要指标。但由于大脑结构的复杂性、血肿形态和位置的多样性,在CT影像中准确可靠地分割血肿和测量出血量极为困难。本文提出一种基于自注意力机制深度学习网络的脑血肿分割和出血量测量算法。首先,为克服大脑结构的复杂性,弥补卷积模块只能进行线性运算和提取局部特征的缺点,在分割网络编码器末端引入自注意力模块,通过高阶运算,提取图像全域的特征关联特性,从全局角度提取血肿;然后引入通道和空间注意力模块,通过训练学习得到各个通道和特征区域上的权重,通过该权重突出有用信息,抑制无用信息;最后,根据脑出血患者多层CT影像切片的血肿分割结果,计算出血量。在真实脑出血CT影像数据集上的实验结果表明,本文算法在多种情况下的脑血肿分割和出血量测量上均取得了较好的效果,即使在形状不规则或贴近颅骨的情况下,本文算法仍然较为有效。
脑出血(Intracranial hemorrhage,ICH)是指人脑部动脉、静脉和毛细血管破裂导致的出血,现已成为导致患者死亡和残疾的最主要疾病之
很多研究人员尝试使用图像分割的方法实现脑血肿分割和出血量测量。Soroushmehr
随着深度学习技术被广泛应用于自然语言处理、计算机视觉和模式识别等领域并取得了优异的成绩,一些研究人员通过全卷积网络 (Fully convolutional networks,FCN
和传统图像分割方法相比,深度学习网络能够根据样本数据,端到端地学习到深层的特征表示,在一定程度上提升了分割效果,但由于大脑结构的复杂性、血肿形态和位置的多样性,现有方法准确性和可靠性尚不能满足临床要求。卷积神经网络对底层低级特征具有良好的提取能力,但受卷积核限制,只能进行线性运算和提取局部特征。文献[
本文将徐州市中心医院提供的452例脑出血患者7 600张CT的影像切片作为研究对象,包括脑实质出血、脑室出血、硬膜下出血和硬膜外下出血等。其中男性患者为286例,女性患者为166例,年龄区间为37~73岁。采用专业扫描装置DiscoveryNM/CT670获取CT数据并将原始数据转换成尺寸为512×512的PNG格式图像。每个像素的取值范围为0~255。同时由医院的资深影像专家进行真值标签标注和出血量标注,标签标注工作使用专业的图像标注工具Labelme来保证标签图像的准确性,出血量标注由3名专业医师分别记录血肿的最长直径、最短直径和层厚并根据多田氏公式计算出血量,最后取其平均值作为出血量真值。全部数据采用完全随机法分为训练集412例(6 940张切片)和测试集40例(660张切片)。采用水平和垂直方向上的移动和翻转数据增强方法以减少脑部出血区域的样本类别不平衡问题带来的干扰,增强有效样本和泛化能力。本文对医学数据的使用得到了徐州市中心医院的批准,符合伦理要求和管理规范。
为了克服大脑复杂结构的血肿多样性对分割和出血量测量效果的影响,本文采用多种注意力机制改进现有的编解码网络。整体的网络框架如

图1 网络结构
Fig.1 Network structure
自注意力机制源于自然语言处理领域提出Transformer模
(1) |
式中:Q为查询矩阵,K为键矩阵,V为值矩阵,A为注意力系数矩阵。
如
本文实验使用NVIDA RTX 2060显卡,运行内存为16 GB,同时使用Pytorch作为深度学习框架,采用交叉熵损失函
本文采用二值法(血肿像素值为1,非血肿像素值为0)对血肿进行分类,并使用3种经典评估指标评估网络分割性能,分别为体素相对误差(Relative volume difference,Rvd
为了直观比较4种网络模型的分割性能,

图2 4种网络模型分割结果二值图
Fig.2 Binary graph of segmentation results of four network models
本文分割结果均为二值图,因此血肿面积等于像素值为1的总和。然后根据分辨率对像素点进行点和英寸的转换。最后计算得到出血量,计算公式
(2) |
式中:H为每层CT切片的厚度,N为切片数量,Sn为第n片切片的血肿面积。出血量测量性能方面,本文采用均方根误差(Root mean square error,RMSE)和平均绝对误差(Mean absolute error,MAE)作为评估指标。

图3 4种网络模型出血量测量值曲线
Fig.3 Volume measurement curves of four network models

图4 4种网络模型出血量测量误差曲线
Fig.4 Error curves of four network models
为了验证本文方法对于不同类型血肿病例的鲁棒性,选取2种分割困难的血肿类型(不规则形状的血肿和靠近颅骨的血肿各20例)在U‑Net和本文网络模型下做血肿分割和出血量测量的性能对比。如

图5 2种网络模型对不规则血肿分割结果二值图
Fig.5 Binary graph of segmentation results of irregular hematoma by two network models

图6 2种网络模型对靠近颅骨血肿分割结果二值图
Fig.6 Binary graph of segmentation results of hematoma near skull by two network models
为了验证本文方法中各模块的有效性,
本文提出了一种基于自注意力机制深度学习网络的脑血肿分割和出血量测量算法。该算法在经典U‑Net结构的基础上引入自注意力模块并保留卷积操作来同时提取局部低级特征和全局上下文特征。同时着眼于编码器高分辨率特征通过跳跃连接与解码器特征的拼接过程,引入通道和空间注意力模块进一步过滤非必要信息。实验结果表明,本文方法在徐州市中心医院提供的脑部数据集上获得了较好的准确性和鲁棒性。
参考文献
ZHAO W, WU C, STONE C, et al. Treatment of intracerebral hemorrhage current approaches and future directions[J]. Journal of the Neurological Sciences, 2020, 416: 117020. [百度学术]
FEIGIN V L, FOROUZANFAR M H, KRISHNAMURTHI R, et al. Global and regional burden of stroke during 1990—2010: Findings from the global burden of disease study 2010[J]. The Lancet, 2014, 383(9913): 245-254. [百度学术]
SOROUSHMEHR S M R, BAFNA A, SCHLOSSER S, et al. CT image segmentation in traumatic brain injury[C]//Proceedings of the 37th Annual International Conference of the IEEE Engineering in Medicine and Biology Society.[S.l.]: IEEE, 2015: 2973-2976. [百度学术]
BARDERA A, BOADA I, FEIXAS S, et al. Semi-automated method for brain hematoma and edema quantification using computed tomography[J]. Computerized Medical Imaging and Graphics, 2009, 33(4): 304-311. [百度学术]
LIAO C C, XIAO F, WONG J M, et al. Computer-aided diagnosis of intracranial hematoma with brain deformation on computed tomography[J]. Computerized Medical Imaging and Graphics, 2010, 34(7): 563-571. [百度学术]
LONG J, SHELHAMER E, DARRELL T. Fully convolutional networks for semantic segmentation[EB/OL]. (2015-03-08)[2022-04-28]. http://arxiv.Org/abs/1411.4038v2. [百度学术]
BADRINARAYANAN V, KENDALL A, CIPOLLA R. SegNet: A deep convolutional encoder-decoder architecture for image segmentation[EB/OL]. (2016-10-10)[2022-04-28]. http://arxiv.Org/abs/1511.00561. [百度学术]
RONNEBERGER O, FISCHER P, BROX T. U-Net: Convolutional networks for biomedical image segmentation[C]//Proceedings of the 17th International Conference on Medical Image Computing and Computer-Assisted Intervention. [S.l.]: Springer, 2015: 234-241. [百度学术]
IRONSIDE N, CHEN C J, MUTASA S, et al. Fully automated segmentation algorithm fort hematoma volumetric analysis in spontaneous intracerebral hemorrhage[J]. Stroke, 2019, 50(12): 3416-3423. [百度学术]
ARAB A, CHINDA B, MEDVEDEV G, et al. A fast and fully-automated deep-learning approach for accurate hemorrhage segmentation and volume quantification in non-contrast whole-head CT[J]. Scientific Reports, 2020, 10(1): 1-12. [百度学术]
YAO H, WILLIAMSON C, GRYAK J, et al. Automated hematoma segmentation and outcome prediction for patients with traumatic brain injury[J]. Artificial Intelligence in Medicine, 2020, 107: 101910. [百度学术]
ZHANG G, CHO P C, CHEN K, et al. Lesion synthesis to improve intracranial hemorrhage detection and classification for CT images[J]. Computerized Medical Imaging and Graphics, 2021, 90: 101929. [百度学术]
DOSOVITSKIY A, BEYER L, KOLESNIKOV A, et al. An image is worth 16×16 words: Transformers for image recognition at scale[EB/OL]. (2021-06-03)[2022-04-28]. http://arxiv.Org/abs/2010.11929. [百度学术]
GIRDHAR R, CARREIRA J, DOERSCH C, et al. Video action transformer network[C]//Proceedings of 2019 IEEE Conference on Computer Vision and Pattern Recognition. [S.l.]: IEEE, 2019: 244-253. [百度学术]
BILKHU M, WANG S Y, DOBHAL T. Attention is all you need for videos: Self-attention based video summarization using universal transformers[EB/OL]. (2019-06-06)[2022-04-28]. http://arxiv.Org/abs/1906.02792. [百度学术]
ZHOU D, SHI Y, KANG B, et al. Refiner: Refining self-attention for vision transformers[EB/OL]. (2021-06-07)[2022-04-28]. http://arxiv.Org/abs/2106.03714. [百度学术]
HE K M, ZHANG X Y, REN S Q, et al. Deep residual learning for image recognition[C]//Proceedings of 2016 IEEE Conference on Computer Vision and Pattern Recognition. [S.l.]: IEEE, 2016: 770-778. [百度学术]
VASWANI A, SHAZEER N, PARMAR N, et al. Attention is all you need[EB/OL]. (2017-12-06)[2022-04-28]. http://arxiv.Org/abs/1706.03762. [百度学术]
RUDER S. An overview of gradient descent optimization algorithms[EB/OL]. (2017-06-15)[2022-04-28]. http://arxiv.Org/abs/1609.06747. [百度学术]
JADON S. A survey of loss functions for semantic segmentation[C]//Proceedings of 2020 IEEE Conference on Computational Intelligence in Bioinformatics and Computational Biology. [S.l.]: IEEE, 2020: 1-7. [百度学术]
QIN X X, ZHU Y, ZHENG B B. Automated segmentation based on residual u-net model for mr prostate images[C]//Proceedings of the 11th International Congress on Image Signal Processing, BioMedical Engineering and Informatics. [S.l.]: IEEE, 2018: 1-6. [百度学术]
ZHU M D, LI M, GENG Z, et al. Dice coefficient matching-based sparsity adaptive matching pursuit algorithm for the digital predistortion model pruning[C]//Proceedings of 2018 IEEE 18th International Conference on Communication Technology. [S.l.]: IEEE, 2018: 1032-1035. [百度学术]
Yuan Y D, Chao M, Lo Y C. Automatic skin lesion segmentation using deep fully convolutional networks with jaccard distance[J]. IEEE Transactions on Medical Imaging, 2017, 36(9): 1876-1886. [百度学术]
Hidayatullah R R, Sigit R, Wasista S. Segmentation of head CT-scan to calculate percentage of brain hemorrhage volume[C]//Proceedings of 2017 International Electronics Symposium on Knowledge Creation and Intelligent Computer. [S.l.]: IEEE, 2017: 301-306. [百度学术]