Print

发布时间: 2020-10-25
摘要点击次数:
全文下载次数:
DOI: 10.11834/jig.200232
2020 | Volume 25 | Number 10




    研究应用    




  <<上一篇 




  下一篇>> 





密集挤压激励网络的多标签胸部X光片疾病分类
expand article info 张智睿, 李锵, 关欣
天津大学微电子学院, 天津 300072

摘要

目的 X射线光片是用于诊断多种胸部疾病常用且经济的方法。然而,不同疾病的位置及病灶区域大小在X光片上差异较大且纹理表现存在多样性,是胸部疾病分类任务面临的主要挑战。此外,样本数据类别不平衡进一步增加了任务的困难。针对以上挑战以及目前算法识别精度有待提升的问题,本文采用深度学习方法提出一种基于密集挤压激励网络的多标签胸部疾病分类算法。方法 将挤压激励模块同样以密集连接的方式加入密集连接网络中作为特征通道高度注意模块,以增强对于网络正确判断疾病有用信息的传递同时抑制无用信息的传递;使用非对称卷积块增强网络的特征提取能力;采用焦点损失函数,增加难识别疾病的损失权重而减小易识别疾病的损失权重,以增强网络对难识别样本的学习。结果 在ChestX-ray14数据集上的实验结果表明,本文算法对14种胸部疾病的分类精度较目前3种经典及先进算法有所提升,平均AUC(area under ROC curve)值达到0.802。另外本文将算法模型在诊断时依据的病灶区域进行可视化,其结果进一步证明了模型的有效性。结论 本文提出的基于密集挤压激励网络的多标签分类算法,在胸部疾病识别上的平均AUC值较高,适用于胸部X光片的疾病分类。

关键词

胸部X光片; 多标签分类; 密集连接网络; 疾病诊断; 医学图像处理

Multilabel chest X-ray disease classification based on a dense squeeze-and-excitation network
expand article info Zhang Zhirui, Li Qiang, Guan Xin
School of Microelectronics, Tianjin University, Tianjin 300072, China
Supported by: National Natural Science Foundation of China(61471263);Tianjin Municipal Natural Science Foundation(16JCZDJC31100)

Abstract

Objective The task of classification of chest diseases is an important part in the field of medical image processing. Its purpose is to assist professional doctors to make accurate diagnosis and treatment through a computer automatic recognition system, which has important significance and role in clinical medicine. Medical image technologies play an important role in the recognition of chest diseases. They can provide doctors with clear internal textural and structural information. X-ray is a common and economical method for the diagnosis of various chest diseases. However, the main challenges in chest disease classification are that the location and size of the focus area of various diseases are different on X-ray films and the texture performance is diverse. The imbalance of sample data categories increases the task difficulty. Visual fatigue and other problems caused by long-term work, even for trained professional doctors, missed diagnosis, and misdiagnosis are also inevitable. Therefore, determining how to classify chest diseases automatically and accurately has become a popular topic in the field of medical image processing. At present, researchers mainly use the deep learning method to train a convolutional neural network to identify chest diseases automatically, but the overall recognition accuracy is inadequately high. Most methods cannot utilize the information on the feature channel. In view of the abovementioned challenges and the necessity to improve the recognition accuracy of current algorithms, this paper proposes a multilabel classification algorithm for chest diseases based on a dense squeeze-and-excitation network by using the deep learning method. Method First, to utilize the information on the channel of the feature map, we add a squeeze-and-excitation module to DenseNet densely as the high-attention module of the feature channel; hence, the network can fully consider the feature information of each disease. In the process of network propagation, the network can enhance the transmission of useful information for the correct judgment of disease types and inhibit the transmission of useless information. Second, given that the parameters on the convolution kernel skeleton, i.e., the central cross position, are important and the ordinary square convolution kernel is random at the time of initialization, the ordinary square convolution kernel may be optimized in a direction that is not to strengthen the skeleton parameters. We use an asymmetric convolution block to replace the ordinary square convolution kernel, highlight the role of the parameters on the central cross position of the convolution kernel, and improve the feature extraction capability of the entire network. Lastly, considering that each disease sample data in the data set is relatively different and the learning difficulty also differs, this paper adopts the focal loss function to increase the loss weight of difficult-to-identify diseases and reduce the loss weight of easy-to-identify diseases. The network will pay more attention to the learning of the difficult-to-identify samples by using the focal loss function to improve the learning capability of the network for the types of difficult-to-identify diseases, improve the overall recognition accuracy of the network for chest diseases, and reduce the accuracy differences. Result We conduct experiments on the large multilabel dataset ChestX-ray14, which was published by National Institutes of Health(NIH). The experimental results show that the average recognition accuracy of the proposed algorithm for 14 chest diseases is higher than that of three existing classic and advanced algorithms, and the average area under ROC curve(AUC) value is 0.802. Meanwhile, the recognition accuracy of this algorithm is improved to some extent for some difficult-to-identify chest diseases. In accordance with the gradient-weighted class activation mapping algorithm, we can generate the heat map of the focus area and visualize the focus area of the chest disease classification algorithm model in the process of disease diagnosis. Comparison demonstrates that the positioning of the focus area in the hot map is basically consistent with the marking frame given by professional doctors. This finding proves the validity of the model, provides a visual explanation for disease diagnosis, and helps gain the trust of professional doctors for auxiliary diagnosis. Conclusion In this paper, a multilabel classification algorithm based on a dense squeeze-and-excitation network is proposed for the recognition and classification of chest diseases. The experimental results show that our model is superior to several state-of-the-art approaches, with a higher average AUC value and stronger ability to diagnose some diseases that are difficult to identify. Our model is suitable for the classification of diseases and the recognition of chest X-ray images.

Key words

chest X-ray; multi-label classification; densely connected network; disease diagnosis; medical image processing

0 引言

常见胸部疾病如肺炎、肺结节和肺癌等威胁着大量人口的生命安全。每年大约有数百万人被诊断为患有胸部疾病(Baemani等,2008)。其中就肺炎而言,影响人数约4.5亿(占人口总数的7%),每年约有400万人死于肺炎(Ruuskanen等,2011)。而肺结节有可能是癌症的前兆,对于有潜在恶性肿瘤的患者,它也可能是癌症已经扩散到肺部的证据(Fischbach等,2003)。此外,胸腔积液、肺实变、浸润和胸膜增厚等异常也是某些严重疾病的症状(Khobragade等,2016)。这些疾病或异常的早期诊断和治疗可以有效降低死亡率。因此,能够准确检测辨别出这些疾病和异常对于后期的治疗非常重要。X射线胸片(chest X-ray,CXR)是诊断胸部疾病最常用的放射学检查类型之一,同时也是常规体检项目。但是CXR图像存在易受过厚软组织影响导致不透明度增加的问题,导致误诊在人工诊断中不可避免。其中,就肺结节一种疾病大约有20%~50%被漏诊或误诊(Chen等,2015)。因此,计算机辅助诊断(computer aided diagnosis,CAD)常被用于辅助放射科医生进行高效诊断。医学图像处理主要包括分类识别、图像分割和目标检测等任务,其中分类识别又包括二分类、多分类以及多标签分类,本文所研究的胸部疾病分类属于较为复杂的多标签分类任务。

大量研究(Shen等,2017Ker等,2018)表明,以卷积神经网络(convolutional neural network,CNN)为主的深度学习技术已经广泛应用于医学图像处理领域,例如乳腺癌识别(Kiymet等,2019)、肺结节检测(Winkels和Cohen,2019)、糖尿病视网膜病变检测(Doshi等,2016)和脑肿瘤分割(任璐等,2018)等。在胸片分类任务上也有较多研究(Guan和Huang,2018Wang等,2017)。Yao等人(2017)在不使用预训练的前提下,使用浅层的DenseNet(Huang等,2017)作为图像编码器(encoder)并使用长短期记忆网络(long-short term memory networks,LSTM)作为解码器(decoder),利用目标标签之间的依赖性预测14种胸部疾病,但该方法从有限训练集中学习到的疾病间的依赖关系不够精确,有偏见。Wang等人(2017)以弱监督的方式采用经过ImageNet(Deng等,2009)预训练的全卷积网络作为特征提取器而仅训练过渡层和分类层的方法,比较了4种卷积神经网络模型对病变区域的分类和定位性能,有效利用了ImageNet预训练结果,但是训练时使用经典网络独立处理多个特征图忽略了特征通道间的相关性。Yao等人(2018)还提出了一种结合ResNet(He等,2016)和DenseNet构建的在多分辨率下学习且训练模型进行定位的结构,模型还采用了更具优势的下限自适应Log-Sum-Exp池化函数,该方法在生成分辨率高的病灶区定位图上表现突出,但是由于缺乏对特征通道信息的关注因此诊断精度不够。Ma等人(2019)提出一种多注意网络进行分类,该网络以ResNet-101作为主干网络,并在其中加入挤压激励(squeeze-and-excitation,SE)模块(Hu等,2018)来建模通道间的依赖关系,其次还配备了空间注意模块(space attention module)以融合全局和局部信息,同时使用错分样例注意模块(hard example attention module)将分类错误的阳性病例与原始数据集结合起来训练网络,以缓解类失衡问题,但是其中错分样例注意模块将易分错样本加入训练集的方法并不能真正提升模型本身的性能。

针对上述方法存在的不足,同时为进一步提升胸部疾病诊断的精度,本文提出一种基于密集挤压激励网络(dense squeeze-and-excitation network,DSENet)的胸部疾病分类算法,该算法主要有3方面的改进:1)由于CXR图像的病灶区纹理及特征的辨识度远低于自然图像,因此为了更进一步关注特征通道信息的重要程度,本文在密集连接网络DenseNet-121中加入挤压激励模块且将其进行密集连接, 形成一个特征通道高度注意模块来选择性增强与病理高度相关的特征,同时压缩无用特征信息;2)将网络中的3×3普通方形卷积核替换为非对称卷积块(asymmetric convolution block,ACB)(Ding等,2019),用于增强对提取特征信息更重要的卷积核中央交叉位置上的参数;3)本文采用焦点损失函数(focal loss,FL)(Lin等,2020),以解决数据不平衡以及不同疾病其特征和纹理信息大不相同带来的学习难易程度存在差异的问题。

1 基于DSENet的分类算法

本文胸部疾病分类算法DSENet整体框架如图 1所示,图中只展示了由输入层经过卷积层和最大池化层后进入第1个密集挤压激励(dense squeeze-and-excitation,DSE)块中的一个卷积单元后再经过第1个过渡层的部分以及最后的全连接层(fully-connected,FC)和输出层。其中,第1个DSE块实际包括了6个同样的卷积单元,且图中略去重复操作的部分包括了3个DSE块(包含的卷积单元个数分别为12、24、16)和另外两个过渡层,图中conv、pool和FC分别表示卷积、池化、全连接。表 1更详细地给出了网络整体结构的组成。本节将详细介绍算法的具体架构,包括:密集连接的挤压激励网络、非对称卷积块(asymmetric convolution block,ACB)以及焦点损失函数(focal loss,FL)的实现。

图 1 胸部疾病诊断网络架构图
Fig. 1 The network architecture of chest disease diagnosis

表 1 DSENet-121网络结构
Table 1 DSENet-121 network structure

下载CSV
输出尺寸 DSENet-121
卷积 112×112 7×7卷积, 步长为2
池化 56×56 3×3最大池化, 步长为2
DSE块(1) 56×56 $\left\{ {\begin{array}{*{20}{c}} {池化, 全连接 \times 2}\\ {1 \times 1卷积}\\ {3 \times 3{\rm{ACB}}} \end{array}} \right\} \times 6$
过渡层(1) 56×56 1×1卷积
28×28 3×3平均池化, 步长为2
DSE块(2) 28×28 $\left\{ {\begin{array}{*{20}{c}} {池化, 全连接 \times 2}\\ {1 \times 1卷积}\\ {3 \times 3{\rm{ACB}}} \end{array}} \right\} \times 12$
过渡层(2) 28×28 1×1卷积
14×14 3×3平均池化, 步长为2
DSE块(3) 14×14 $\left\{ {\begin{array}{*{20}{c}} {池化, 全连接 \times 2}\\ {1 \times 1卷积}\\ {3 \times 3{\rm{ACB}}} \end{array}} \right\} \times 24$
过渡层(3) 14×14 1×1卷积
7×7 3×3平均池化, 步长为2
DSE块(4) 7×7 $\left\{ {\begin{array}{*{20}{c}} {池化, 全连接 \times 2}\\ {1 \times 1卷积}\\ {3 \times 3{\rm{ACB}}} \end{array}} \right\} \times 16$
分类层 1×1 7×7全局平均池化, 步长为2
14维全连接

1.1 密集连接的挤压激励网络

1.1.1 密集连接网络DenseNet-121

DenseNet是由Huang等人(2017)提出的一种新的CNN结构,在目标识别的基准任务中,其性能超过了当时最先进的结果达到最优。其核心思想是建立所有层之间的互联,将前面所有层的直接连接作为当前层的输入,因此网络不同层之间达到了最大的信息流。如图 2所示,是一个具有5个卷积层${x_1}$${x_2}$${x_3}$${x_4}$${x_5}$和4个过渡层${H_1}$${H_2}$${H_3}$${H_4}$的密集连接网络块。DenseNet是由多个这样的密集网络块(dense block)和过渡层(transiton layer)组合而成的,一个${L}$层的密集连接网络有$L \times \left({L + 1} \right)/2$个连接。

图 2 一个5层的密集连接块(Huang等,2017)
Fig. 2 A five-layer dense connection block(Huang et al., 2017)

ResNet是通过将每个残差块中的一些层与前面的某层通过对应通道上元素级别的相加实现短路连接(skip connection),从而支持网络在前向传播时不断学习新的特征。而DenseNet网络是将每一层与前面的所有层在通道(channel)维度上相连后作为下一层的输入,实现网络的特征重用。DenseNet能在参数量和计算成本更低的同时获得比ResNet更优异的性能,因此本文采用DenseNet作为基础网络进行网络架构的设计。

本文采用的DenseNet-121网络由4个不同大小的密集网络块组成,其中每个密集网络块由不同个数的卷积单元组成,每个卷积单元包含一个1×1卷积和一个3×3卷积以及相应的批归一化处理和ReLU激活函数。密集网络块之间的层是过渡层,其作用是对特征图进行下采样,DenseNet-121共包含3个过渡层。

1.1.2 挤压激励模块

SE模块作用于通道的原理图如图 3所示。$\mathit{\boldsymbol{U = }}\left[ {{\mathit{\boldsymbol{u}}_1}, {\mathit{\boldsymbol{u}}_2}, \cdots, {\mathit{\boldsymbol{u}}_C}} \right]$为经过卷积操作输出的多通道特征图,特征图的宽为$W$, 高为$H$,通道数为$C$$\mathit{\boldsymbol{X = }}\left[ {{{\mathit{\boldsymbol{\tilde x}}}_1}, {{\mathit{\boldsymbol{\tilde x}}}_2}, \cdots, {{\mathit{\boldsymbol{\tilde x}}}_C}} \right]$为特征图$\mathit{\boldsymbol{U}}$经过挤压激励操作后输出的加权特征图,通道数同为$C$。以下将介绍具体的操作过程。

图 3 挤压激励模块原理图
Fig. 3 Schematic diagram of squeeze-and-excitation module

首先, 挤压操作通过对$C$通道特征图$\mathit{\boldsymbol{U}}$进行全局平均池化(global average pool),将$H \times W \times C$的特征图$\mathit{\boldsymbol{U}}$压缩为$1 \times 1 \times C$的向量$\mathit{\boldsymbol{Z}}$

$ {\mathit{\boldsymbol{z}}_e} = {\mathit{\boldsymbol{F}}_{{\rm{sq}}}}\left({{\mathit{\boldsymbol{u}}_c}} \right) = \frac{1}{{W \times H}}\sum\limits_{i = 1}^W {\sum\limits_{j = 1}^H {{\mathit{\boldsymbol{u}}_c}(i, j)} } $ (1)

式中,${\mathit{\boldsymbol{u}}_c}\left({c = 1, 2, \cdots, C} \right)$为特征图$\mathit{\boldsymbol{U}}$中第$c$通道的特征图,${\mathit{\boldsymbol{z}}_c}\left({c = 1, 2, \cdots, C} \right)$为向量$\mathit{\boldsymbol{Z}}$$c$通道的特征向量。经过挤压操作,向量$\mathit{\boldsymbol{Z}}$集合了特征图的全局信息,其维度等同于特征图$\mathit{\boldsymbol{U}}$的通道数$C$

其次,激励操作是将具有全局信息的向量$\mathit{\boldsymbol{Z}}$经过两个全连接层,通过自适应学习相应的权重参数矩阵${\mathit{\boldsymbol{W}}_1}$${\mathit{\boldsymbol{W}}_2}$得到新的$1 \times 1 \times C$向量$\mathit{\boldsymbol{S}}$, 即

$ \begin{array}{*{20}{c}} {\mathit{\boldsymbol{S}} = {F_{{\rm{ex}}}}(\mathit{\boldsymbol{Z}}, \mathit{\boldsymbol{W}}) = \sigma (g(\mathit{\boldsymbol{Z}}, \mathit{\boldsymbol{W}})) = }\\ {\sigma \left({{\mathit{\boldsymbol{W}}_2}\delta \left({{\mathit{\boldsymbol{W}}_1}\mathit{\boldsymbol{Z}}} \right)} \right)} \end{array} $ (2)

式中,$\sigma $为Sigmoid激活函数,$\delta $为ReLU激活函数,${\mathit{\boldsymbol{W}}_1} \in {{\bf{R}}^{\frac{C}{r} \times C}}$是维度缩减参数,${\mathit{\boldsymbol{W}}_2} \in {{\bf{R}}^{C \times \frac{C}{r}}}$是维度增加参数$\mathit{\boldsymbol{W}}$${\mathit{\boldsymbol{W}}_1}$${\mathit{\boldsymbol{W}}_2}$的总体表示,$r$是缩减因子。${{F_{{\rm{ex}}}}\left(\cdot \right)}$为加权函数,经过激励操作,向量$\mathit{\boldsymbol{S}}$包含了各通道重要程度的信息。

最后,根据激励操作后的向量$\mathit{\boldsymbol{S}}$进行特征重标定,具体方式为将$1 \times 1 \times C$的向量$\mathit{\boldsymbol{S}}$$C$个权重因子${s_c}\left({c = 1, 2, \cdots, C} \right)$$C$通道特征图$\mathit{\boldsymbol{U}}$进行逐通道加权,得到加权特征图${\mathit{\boldsymbol{\tilde X}}}$,即

$ {\mathit{\boldsymbol{\tilde x}}_c} = {F_{{\rm{scale }}}}\left({{\mathit{\boldsymbol{u}}_c}, {s_c}} \right) = {s_c}{\mathit{\boldsymbol{u}}_c} $ (3)

式中,${{\mathit{\boldsymbol{\tilde x}}}_c}\left({c = 1, 2, \cdots, C} \right)$为加权特征图${\mathit{\boldsymbol{\tilde X}}}$中第$c$通道的特征图,函数${F_{{\rm{scale}}}}\left({{\mathit{\boldsymbol{u}}_c}, {s_c}} \right)$将权重因子${{s_c}}$与特征图${{\mathit{\boldsymbol{u}}_c}}$在通道维度上相乘,乘积即为${{\mathit{\boldsymbol{\tilde x}}}_c}$。最后得到的加权特征图${\mathit{\boldsymbol{\tilde X}}}$的每个通道被赋予不同权重,以表达特征信息的重要程度,在网络中增强有用信息而抑制无用信息传递。

1.1.3 特征通道高度注意模块

密集连接网络DenseNet中不同卷积单元之间连接方式的结构如图 4(a)所示,借鉴Wu(2019)提出的网络结构,本文在密集连接网络DenseNet-121中以一种密集连接的方式加入挤压激励模块,生成的新网络结构DSENet如图 4(b)所示,图中BN表示批归一化处理、ReLU表示ReLU激活函数。

图 4 密集连接网络和密集挤压激励网络结构图
Fig. 4 Structure of DenseNet and DSENet
((a)DenseNet; (b)DSENet)

与改进前的网络DenseNet直接将前面所有卷积单元在通道维度相连后作为当前单元的输入不同,改进后的网络DSENet将前面所有卷积单元的特征图在通道维度相连后先进行加权,即挤压激励操作,之后再作为当前卷积单元的输入,从而形成了特征通道高度注意模块。因此通过学习网络能够高度地关注X光图像特征图不同通道的重要程度,从而抑制对疾病诊断无用信息的表达,促进有用信息的表达,以此来增强网络对胸部疾病的分类性能。

1.2 非对称卷积块

非对称卷积块的结构是在普通方形卷积核中加入了水平卷积和垂直卷积,其原理如图 5所示。使用ACB结构,如图 5(a)所示训练时并行进行3×3、1×3和3×1卷积,然后将3路的输出叠加起来得到新的输出,但是推理时如图 5(b)所示将3×3、1×3和3×1卷积核转换为1个新的卷积核进行卷积操作得到输出,由图 5(a)(b)两种方式得到的输出特征图等价的。ACB能够匹配各种网络结构以提升其性能,同时由于不会引入额外的超参数,因此不增加推理时间计算负担。

图 5 非对称卷积块原理图
Fig. 5 Schematic diagram of asymmetric convolution block
((a)during training; (b)during testing)

研究表明,3×3卷积核中的9个参数重要程度并不相同,在中央交叉位置即卷积核骨架上的5个参数更加重要,而边角的4个参数影响较小。普通方形卷积核在初始化时是随机的,因此可能导致它向着非强化骨架参数的方向优化。通过采用非对称卷积块将水平卷积和垂直卷积加到卷积核骨架上能够起到强化骨架上参数的作用。

本文算法采用的DSENet-121网络结构中有大量3×3普通方形卷积核,网络的每1个卷积单元都包含1层卷积核大小为3×3的卷积层。为了使网络更加重视卷积核骨架上的参数,增强网络的特征提取能力,本文将DSENet-121网络结构中所有的3×3普通方形卷积核全都替换为ACB。

1.3 焦点损失函数

对于ChestX-ray14数据集中的胸片图像,本文令其中的每一张胸片都对应一个14维的向量作为标签(即真实值),该向量为$\mathit{\boldsymbol{y}} = \left[ {{y_1}, {y_2}, \cdots {y_N}} \right]$,其中$N$=14,代表 14种疾病,${y_i}\left({i = 1, 2, \cdots, 14} \right)$的值为1或0,1代表患者患有第$i$种疾病,0代表患者未患第$i$种疾病。同时,网络的14个输出值也可看做一个14维向量,即$\mathit{\boldsymbol{\hat y}} = \left[ {{y_1}, {y_2}, \cdots {y_N}} \right]$,其中${{\hat y}_i}\left({i = 1, 2, \cdots, 14} \right)$代表网络判断第$i$种疾病患病的概率值(即预测值)。多数研究人员在此类任务中都采用二元交叉熵损失函数计算每种疾病的损失,即

$ {L_i} = - {y_i}\ln {\hat y_i} - \left({1 - {y_i}} \right)\ln \left({1 - {{\hat y}_i}} \right) $ (4)

式中,${y_i}$为真实值,${{\hat y}_i}$为真实值为预测值。

但是,在ChestX-ray14数据集中,存在数据不平衡问题,某些疾病的样本较少,不利于网络掌握足够的纹理信息;很多样本中同时包含多种疾病信息,较难训练;不同疾病的病理信息有所不同,导致学习的难易程度不同。针对以上问题,本文训练网络时,采用焦点损失函数(Lin等,2020)计算每种疾病的损失值${{L_i}}$为真实值为

$ \begin{array}{*{20}{c}} {{L_i} = - \alpha {{\left({1 - {{\hat y}_i}} \right)}^\beta }{y_i}\log {{\hat y}_i} - }\\ {(1 - \alpha)\hat y_i^\beta \left({1 - {y_i}} \right)\log \left({1 - {{\hat y}_i}} \right)} \end{array} $ (5)

式中,$\alpha = 0.5$$\beta = 2$为超参数,再将14种疾病的损失值求平均作为网络整体的损失。

由此,整个网络会根据损失函数调整每种疾病的损失值,使得难识别疾病乘以一个较大的权重,易识别疾病乘以一个较小的权重,通过网络反向传播使得网路更加关注对难以识别疾病种类的学习,以得到对疾病分类能力更强的网络模型。

2 实验和讨论

2.1 数据预处理与训练参数设置

实验使用由美国国立卫生研究院(National Institutes of Health, NIH)(Wang等, 2017)整理并公开的大型多标签数据集ChestX-ray14,该数据集是目前公开的最大的胸部X射线光片数据集,包含了30 805个病例的112 120张X线胸片的前视图,原始图像大小为1 024×1 024像素。除去60 361张标签为不患病(no finding)的胸片,数据集中的每幅图像都被赋予一个患有一种或多种常见的14种胸部疾病的标签。数据集中不同疾病的数量分布情况如图 6所示,少数疾病种类的样本数较少,如疝气、肺炎、纤维化等,而浸润、积液等疾病的样本较多。样本数量差异较大导致了训练时类别不平衡,给分类任务带来很大挑战。如图 7(a)(b)两组图分别为数据集中标签是心脏扩大(cardiomegaly)和肺炎(pneumonia)的胸片原图(左)和医生标注图(右),其中医生标注图中的矩形框是本文根据官方公布的由专业医生给出的病灶区矩形框数据描绘而成,数据集中仅有984张胸片图给出了标注框数据,涵盖8种疾病,本文标注图不用于训练。

图 6 ChestX-ray14数据集不同疾病数量分布图
Fig. 6 Distribution of different diseases in ChestX-ray14 dataset
图 7 ChestX-ray14数据集中两种疾病的原图(左)与医生标注图(右)
Fig. 7 Original pictures (left) and doctor's annotation pictures (right) of two diseases in ChestX-ray14 dataset
((a)cardiomegaly; (b)pneumonia)

考虑到ChestX-ray14数据集中有许多患者其多张胸片样本的标签不完全相同。本文采用常见方式,将数据集按照7 :2 :1的比例随机分割为训练集、测试集和验证集,保证同一图像的样本在三部分无交叉。胸片原图是大小为1 024×1 024像素的灰度图,为了减少计算量同时匹配网络模型,将图像缩放至256×256像素,并将其转换为RGB 3通道格式,再随机选取中心点将图像剪裁至224×224像素大小并进行随机水平翻转实现数据增强。最后将胸片转换为向量格式并对其进行像素值归一化处理,将像素值限制在0~255范围以内供网络读取。

实验基于Pytorch框架进行网络搭建和训练,使用Adam优化器进行优化,当验证损失达到稳定时停止训练。在参数设置上,初始学习率为0.001且每10轮乘以0.9,批处理量大小与实验设备显存有关,为充分利用显存,加快训练速度,设置为192。

2.2 性能评价指标

为了客观且全面地评价网络的诊断性能,同时方便与其他算法进行比较,本文采用受试者操作特征曲线(receiver operating characteristics,ROC)来表现算法对每种疾病的识别能力,并计算该曲线下的面积(area under ROC curve, AUC)值进行定量分析和比较。ROC曲线以所有样本的分类结果在不同阈值下的一系列假正例率(false positive rate,FPR)和真正例率(true positive rate,TPR)为横、纵坐标进行描绘。FPR表示所有负样本中分类器错判为正例的概率,TPR表示所有正样本中分类器能正确判为正例的概率,具体计算为

$ FPR = \frac{{FP}}{{FP + TN}} $ (6)

$ TPR = \frac{{TP}}{{TP + FN}} $ (7)

式中,$FR$为假正例,$TN$为真负例,$TP$为真正例,$FN$为假负例。ROC曲线描述了真阳性(纵坐标)和假阳性(横坐标)之间的博弈,由此,曲线越靠近左上角,即AUC值越大,值越接近于1,则算法的分类性能越好。

2.3 结果与分析

图 8ROC曲线描绘了本文算法在ChestX-ray14数据集上对14种疾病的分类表现,曲线整体位于左上角,表明算法整体分类性能良好。

图 8 ChestX-ray14数据集上的ROC曲线和AUC值
Fig. 8 ROC curves and AUC results on ChestX-ray14 dataset

表 2将本文算法的分类AUC值与前人工作(Wang等,2017Yao等,2018Ma等,2019)在ChestX-ray14数据集上的结果进行比较。结果表明,本文方法对14种疾病的识别准确率的平均值超过了对比方法,平均AUC值达到了0.802 0,有较大提升。就每种疾病的AUC值看,心脏扩大、渗透、肺气肿、纤维化以及疝气5种疾病的准确率相比较低。这是由于渗透的样本量太大,是所有疾病中样本数最多的,导致网络对其产生了一定程度的过拟合,而另外4种疾病则是由于样本量较小,使得网络无法通过训练掌握足够的疾病特征。本文方法对剩余9种疾病的识别准确率均高于其他3种方法。其中,肺不张的AUC值为0.785 0,较Ma等人(2019)方法提升了2%,而积液的AUC值达到0.862 8,较Ma等人(2019)方法提升了4%。对于疾病较为严重时才能在X光片上显示的疾病如气胸、肺实变和水肿,本文方法较Ma等人(2019)方法有1%~4%的提升,其AUC值分别为0.842 6、0.784 6、0.872 7。另外,在病灶区域相对较小的疾病如肿块、肺结节和胸膜增厚的诊断上,本文方法测得的AUC值分别是0.804 0、0.729 9、0.756 3,与前者方法相差不大但略有提升。而对于病理特征较为复杂的疾病如肺炎的识别,本文方法较Yao等人(2018)方法也提升了3%,AUC值达到了0.742 3,提升较大。综上所述,本文算法能较好地学习难识别疾病种类的特征,且总体来看,本文方法对胸部疾病识别的平均AUC值有一定提升,总体分类性能较好。

表 2 不同胸部疾病多标签分类方法在ChestX-ray14数据集上的比较
Table 2 Comparison of multi-label classification methods of different chest diseases on ChestX-ray14 dataset

下载CSV
疾病种类 方法
Wang等人(2017) Yao等人(2018) Ma等人(2019) 本文
肺不张(atelectasis) 0.700 3 0.733 0.762 7 0.785 0
心脏扩大(cardiomegaly) 0.810 0 0.865 0.883 5 0.876 6
积液(effusion) 0.758 5 0.806 0.815 9 0.862 8
渗透(infiltration) 0.661 4 0.673 0.678 6 0.673 0
肿块(mass) 0.693 3 0.718 0.801 2 0.804 0
肺结节(nodule) 0.668 7 0.777 0.729 3 0.729 9
肺炎(pneumonia) 0.658 0 0.684 0.709 7 0.742 3
气胸(pneumothorax) 0.799 3 0.805 0.837 7 0.842 6
肺实变(consolidation) 0.703 2 0.711 0.744 3 0.784 6
水肿(edema) 0.805 2 0.806 0.841 4 0.872 7
肺气肿(emphysema) 0.833 0 0.842 0.883 6 0.858 0
纤维化(fibrosis) 0.785 9 0.743 0.800 7 0.775 4
胸膜增厚(pleural Thickening) 0.683 5 0.724 0.753 6 0.756 3
疝气(hernia) 0.871 7 0.775 0.876 3 0.864 5
平均(mean) 0.745 1 0.761 0.794 1 0.802 0
注:加粗字体表示每行最优结果。

2.4 消融实验与分析

为了评估模型每个模块或组件的有效性,本文在ChestX-ray14数据集上进行了消融实验。将本文算法视为完整模型分别进行了移除SE模块、移除非对称卷积块(ACB)而采用普通方形卷积核、移除焦点损失函数(FL)而采用二元交叉熵损失函数以及去除SE模块且同时采用普通方形卷积核以及二元交叉熵损失函数的基准模型共4组实验,测得每个模型对胸部疾病的分类AUC值与本文模型进行对比,如表 3所示。

表 3 消融实验结果对比
Table 3 Comparison of ablation results

下载CSV
疾病种类 模型
基准模型 移除SE模块 移除ACB 移除FL 本文模型
肺不张(atelectasis) 0.771 1 0.773 9 0.782 0 0.777 8 0.785 0
心脏扩大(cardiomegaly) 0.868 0 0.877 0 0.884 6 0.877 3 0.876 6
积液(effusion) 0.872 1 0.858 4 0.866 5 0.868 8 0.862 8
渗透(infiltration) 0.670 4 0.666 4 0.678 2 0.673 3 0.673 0
肿块(mass) 0.797 2 0.798 1 0.805 8 0.809 2 0.804 0
肺结节(nodule) 0.712 9 0.715 5 0.717 1 0.722 2 0.729 9
肺炎(pneumonia) 0.724 7 0.718 6 0.718 5 0.724 8 0.742 3
气胸(pneumothorax) 0.832 9 0.837 9 0.849 9 0.837 0 0.842 6
肺实变(consolidation) 0.783 0 0.781 2 0.788 8 0.782 6 0.784 6
水肿(edema) 0.872 1 0.872 5 0.867 2 0.867 0 0.872 7
肺气肿(emphysema) 0.852 7 0.843 4 0.849 0 0.844 8 0.858 0
纤维化(fibrosis) 0.764 4 0.763 7 0.755 1 0.752 7 0.775 4
胸膜增厚(pleural thickening) 0.755 8 0.756 3 0.761 4 0.767 2 0.756 3
疝气(hernia) 0.834 0 0.852 9 0.827 2 0.883 4 0.864 5
平均(mean) 0.792 2 0.794 0 0.796 5 0.798 9 0.802 0
注:加粗字体表示每行最优结果。

表 3可以看出,通过在基准模型上增加模块或组件,本文模型较基准模型平均AUC值提升了接近1个百分点。就每个模块或组件来看,首先,在本文模型上移除SE模块,模型的平均AUC值由0.802 0下降至0.794 0,证明SE模块的确能够提升特征通道的信息表达能力。其次,将本文模型中的ACB替换为普通方形卷积核后,模型的平均AUC值下降了0.55%,说明ACB对于增强网络的特征提取能力有一定效果。最后,当使用二元交叉熵损失函数而非焦点损失函数时,模型的平均AUC值下降至0.798 9,下降不明显,但也能表明焦点损失函数对于提升模型性能的有效性。另外,移除SE模块后模型AUC值下降最多,但仍优于基线模型的平均AUC值0.792 2。通过比较,表明本文采用的3个模块或组件对于模型性能提升确实有效。

2.5 诊断依据的病灶区可视化定位

在对模型分类性能进行定量分析的基础上,本文又对模型进行了定性分析。通过梯度加权类激活映射(gradient-weighted class activation mapping,Grad-CAM)生成了弱监督的病灶区定位热图,用于可视化解释网络在判断疾病时所依据的病灶区域,并通过与专业医生给出的标注框数据所产生的病灶区标注图进行对比以验证该依据的准确性。Grad-CAM算法能够通过加载模型参数,对特征图权重进行梯度的加权平均从而生成热图,因此能够将网络诊断时所依赖的病灶区域可视化。本文热图通过加载模型最后一个卷积层的参数生成,图 9展示了8种疾病的医生标注图(左)和热图(右),热图中红色高亮部分为诊断依据的主要区域,且生成的医生标注框图不用于模型训练。经观察,无论是病灶区较大疾病(如图 9(b)心脏扩大、图 9(c)积液等)还是病灶区较小的疾病(如图 9(a)肺不张、图 9(f)肺结节等),热图所定位的病灶区都能很好地吻合医生给出的病灶区标注框,进一步验证了网络在进行诊断时所依据的特征信息是准确和有效的。另外,将病灶区域可视化,在临床应用中,能够为专业医生在依据计算机辅助诊断时提供更好的视觉支撑,取得医生信赖,帮助医生进行快速而精确的诊断。

图 9 8种胸部疾病的病灶区定位热图(右)与专业医生病灶区标注图(左)对比
Fig. 9 Comparison of the heat map (right) of the focus area of eight kinds of chest diseases with the annotation image (left) of the focus area of professional doctors((a)atelectasis; (b)cardiomegaly; (c)effusion; (d)infiltration; (e)mass; (f)nodule; (g)pneumonia; (h)pneumothorax)

3 结论

针对目前胸部疾病分类算法对胸部疾病识别精度不够高的问题,本文提出一种基于密集挤压激励网络的多标签胸部疾病分类算法。主要内容包括:1)改进密集连接网络,在其中以密集方式加入SE模块形成DSENet,增强了特征通道的信息表达能力;2)采用非对称卷积块,在不增加推理时间计算负担的同时提升网络分类性能;3)采用焦点损失函数平衡网络对不同疾病的识别差异,增强了模型对难识别疾病的学习能力。在ChestX-ray14数据集上的实验结果表明,本文方法对胸部疾病识别精度较高,且可视化结果进一步证明了模型的有效性。通过与目前较为经典和先进的方法对比发现,本文方法不仅总体识别精度高且对部分难识别疾病种类的识别能力较强。

由于实验所采用的数据集样本数量较大,且一张胸片图可能同时包含多种胸部疾病,疾病间的关系十分复杂,因此本文方法还未考虑胸部疾病之间的关系。如何将标签之间的相关性和依赖性融入到网络的学习中,使得网络精准地学习到疾病间的相关程度尚待进一步研究。在后续工作中将对标签间的协同关系进行建模,以根据疾病间的关系进一步提升算法对胸部疾病的诊断能力。

参考文献

  • Baemani M J, Monadjemi A, Moallem P. 2008. Detection of respiratory abnormalities using artificial neural networks. Journal of Computer Science, 4(8): 663-667 [DOI:10.3844/jcssp.2008.663.667]
  • Chen H, Shen C Y, Qin J, Ni D, Shi L, Cheng J C Y and Heng P A. 2015. Automatic localization and identification of vertebrae in spine CT via a joint learning model with deep neural networks//Proceedings of the 18th International Conference on Medical Image Computing and Computer-Assisted Intervention. Munich, Germany: Springer: 515-522[DOI:10.1007/978-3-319-24553-9_63]
  • Deng J, Dong W, Socher R, Li L J, Li K and Li F F. 2009. ImageNet: a large-scale hierarchical image database//Proceedings of 2009 IEEE Conference on Computer Vision and Pattern Recognition. Miami, USA: IEEE: 248-255[DOI:10.1109/CVPR.2009.5206848]
  • Ding X H, Guo Y C, Ding G G and Han J G. 2019. ACNet: strengthening the kernel skeletons for powerful CNN via asymmetric convolution blocks[EB/OL].[2020-05-01]. https://arxiv.org/pdf/1908.03930.pdf[DOI:10.1109/ICCV.2019.00200]
  • Doshi D, Shenoy A, Sidhpura D and Gharpure P. 2016. Diabetic retinopathy detection using deep convolutional neural networks//Proceedings of 2016 International Conference on Computing, Analytics and Security Trends. Pune: IEEE: 261-266[DOI:10.1109/CAST.2016.7914977]
  • Fischbach F, Knollmann F, Griesshaber V, Freund T, Akkol E, Felix R. 2003. Detection of pulmonary nodules by multislice computed tomography:improved detection rate with reduced slice thickness. European Radiology, 13(10): 2378-2383 [DOI:10.1007/s00330-003-1915-7]
  • Guan Q J, Huang Y P. 2018. Multi-label chest X-ray image classification via category-wise residual attention learning. Pattern Recognition Letters, 130: 259-266 [DOI:10.1016/j.patrec.2018.10.027]
  • He K M, Zhang X Y, Ren S Q and Sun J. 2016. Deep residual learning for image recognition//Proceedings of 2016 IEEE Conference on Computer Vision and Pattern Recognition. Las Vegas: IEEE: 770-778[DOI:10.1109/CVPR.2016.90]
  • Hu J, Shen L and Sun G. 2018. Squeeze-and-excitation networks//Proceedings of 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Salt Lake City: IEEE: 7132-7141[DOI:10.1109/CVPR.2018.00745]
  • Huang G, Liu Z, van der Maaten L and Weinberger K Q. 2017. Densely connected convolutional networks//Proceedings of 2017 IEEE Conference on Computer Vision and Pattern Recognition. Honolulu: IEEE: 2261-2269[DOI:10.1109/CVPR.2017.243]
  • Ker J, Wang L P, Rao J, Lim T. 2018. Deep learning applications in medical image analysis. IEEE Access, 6: 9375-9389 [DOI:10.1109/ACCESS.2017.2788044]
  • Khobragade S, Tiwari A, Patil C Y and Narke V. 2016. Automatic detection of major lung diseases using chest Radiographs and classification by feed-forward artificial neural network//Proceedings of the 1st IEEE International Conference on Power Electronics, Intelligent Control and Energy Systems. Delhi: IEEE: 1-5[DOI:10.1109/ICPEICES.2016.7853683]
  • Kiymet S, Aslankaya M Y, Taskiran M and Bolat B. 2019. Breast cancer detection from thermography based on deep neural networks//Proceedings of 2019 Innovations in Intelligent Systems and Applications Conference. Izmir: IEEE: 1-5[DOI:10.1109/ASYU48272.2019.8946367]
  • Lin T Y, Goyal P, Girshick R, He K M, Dollár P. 2020. Focal loss for dense object detection. IEEE Transactions on Pattern Analysis and Machine Intelligence, 42(2): 318-327 [DOI:10.1109/TPAMI.2018.2858826]
  • Ma Y B, Zhou Q H, Chen X S, Lu H H and Zhao Y. 2019. Multi-attention network for thoracic disease classification and localization//Proceedings of 2019 IEEE International Conference on Acoustics, Speech, and Signal Processing. Brighton: IEEE: 1378-1382[DOI:10.1109/ICASSP.2019.8682952]
  • Ren L, Li Q, Guan X, Ma J. 2018. Three-dimensional segmentation of brain tumors in magnetic resonance imaging based on improved continuous max-flow. Laser and Optoelectronics Progress, 55(11): 111011 (任璐, 李锵, 关欣, 马杰. 2018. 改进的连续型最大流算法脑肿瘤磁核共振成像三维分割. 激光与光电子学进展, 55(11): 111011) [DOI:10.3788/LOP55.111011]
  • Ruuskanen O, Lahti E, Jennings L C, Murdoch D R. 2011. Viral pneumonia. The Lancet, 377(9773): 1264-1275 [DOI:10.1016/S0140-6736(10)61459-6]
  • Shen D G, Wu G R, and Suk H I. 2017. Deep learning in medical image analysis. Annual Review of Biomedical Engineering, 19: 221-248 [DOI:10.1146/annurev-bioeng-071516-044442]
  • Wang X S, Peng Y F, Lu L, Lu Z Y, Bagheri M and Summers R M. 2017. Chestx-ray8: hospital-scale chest x-ray database and benchmarks on weakly-supervised classification and localization of common thorax diseases//Proceedings of 2017 IEEE Conference on Computer Vision and Pattern Recognition. Honolulu: IEEE: 3462-3471[DOI:10.1109/CVPR.2017.369]
  • Winkels M, Cohen T S. 2019. Pulmonary nodule detection in CT scans with equivariant CNNs. Medical Image Analysis, 55: 15-26 [DOI:10.1016/j.media.2019.03.010]
  • Wu Y. 2019. Deep convolutional neural network based on densely connected squeeze-and-excitation blocks. AIP Advances, 9(6) [DOI:10.1063/1.5100577]
  • Yao L, Poblenz E, Dagunts D, Covington B, Bernard D and Lyman K. 2017. Learning to diagnose from scratch by exploiting dependencies among labels[EB/OL].[2020-05-19]. https://arxiv.org/pdf/1710.10501.pdf
  • Yao L, Prosky J, Poblenz E, Covington B and Lyman K. 2018. Weakly supervised medical diagnosis and localization from multiple resolutions[EB/OL].[2020-05-19]. https://arxiv.org/pdf/1803.07703.pdf