南京大学学报(自然科学版) ›› 2023, Vol. 59 ›› Issue (4): 580–589.doi: 10.13232/j.cnki.jnju.2023.04.005

• • 上一篇    下一篇

基于特征类内紧凑性的不平衡医学图像分类方法

孟元, 张轶哲(), 张功萱, 宋辉   

  1. 南京理工大学计算机科学与工程学院,南京,210094
  • 收稿日期:2023-06-19 出版日期:2023-07-31 发布日期:2023-08-18
  • 通讯作者: 张轶哲 E-mail:zhangyizhe@njust.edu.cn
  • 基金资助:
    国家自然科学基金(62272232);江苏省自然科学基金(BK20220949)

Imbalanced medical image classification based on intra⁃class compactness of features

Yuan Meng, Yizhe Zhang(), Gongxuan Zhang, Hui Song   

  1. School of Computer Science and Engineering,Nanjing University of Science and Technology,Nanjing,210094,China
  • Received:2023-06-19 Online:2023-07-31 Published:2023-08-18
  • Contact: Yizhe Zhang E-mail:zhangyizhe@njust.edu.cn

摘要:

近些年,基于深度学习的算法和模型在各种图像分析任务中都取得了显著的成功,与常见的自然图像相比,医学图像数据集依然面临高度不平衡的问题,不平衡数据会导致特征空间里的决策边缘倾向样本多的类别,导致分类效果的下降.为了解决该问题,提出一种基于卷积神经网络考虑特征类内紧凑性的不平衡医学图像分类方法(Z?Score Compactness?based Convolutional Neural Network,ZC3NC).首先,从一个卷积神经网络的最后一层卷积层提取训练集样本与测试集样本的特征图,随后引入一个新的Z分数来度量测试集数据的特征图相对训练集每个类在特征空间上的偏离度,偏离度的度量基于类内的紧凑度,其主要关注样本的分布特性,对各类样本数量的不平衡性不敏感.最终,根据计算的偏离度,对测试集的数据进行分类.在DermaMNIST数据集上的实验表明,在不对数据和神经网络模型做任何额外增强的情况下,该方法的平衡准确率比原卷积神经网络模型平均提高11.15%,最多提高14.08%,证明提出的分类方法能有效地提高多种卷积神经网络对不平衡医学图像数据的分类性能.此外,和最先进的不平衡分类方法Under?Bagging KNN相比,该方法的性能平均提升了2.36%.

关键词: 卷积神经网络, 类别不平衡, 医学图像, 特征, 分类

Abstract:

In recent years,algorithms and models based on deep learning have achieved significant success in various image analysis tasks. However,compared to common natural images,medical image datasets often face highly imbalanced problems,which lead to decreased classification performance. Imbalanced data causes decision boundaries in the feature space to tend towards the class with more samples. To solve this problem,this paper proposes an imbalanced medical image classification method based on convolutional neural networks considering intra?class compactness of features (Z?Score Compactness?based Convolutional Neural Network,ZC3NC). First,feature maps of training and testing set samples are extracted from the last convolutional layer of a convolutional neural network. Then,we introduce a new Z?score based measure to test the deviation of the testing set data feature maps relative to each class of the training set in the feature space. The measure of deviation is based on intra?class compactness,which focuses on the distribution characteristics of the samples and is insensitive to the imbalance of the number of samples in each class. Finally,based on the calculated deviation,we classify the testing set data. Experiments on the DermaMNIST dataset show that without any additional data or neural network model enhancements,the balanced accuracy of the proposed method increases by an average of 11.15% compared to the original convolutional neural network model,with a maximum increase of 14.08%. This verifies that the proposed classification method effectively improves the classification performance of various convolutional neural networks for imbalanced medical image data. Furthermore,compared to the state?of?the?art imbalanced classification method,Under?bagging KNN,the average improvement of ZC3NC is 2.36%

Key words: convolutional neural network, class imbalance, medical image, feature, classification

中图分类号: 

  • TP391.4

图1

DermaMNIST数据集中各类别的数量"

图2

卷积神经网络的结构"

图3

基于特征类内紧凑性的不平衡医学图像分类方法框架"

图4

在DermaMNIST上训练的ResNet18模型的倒数第二层中提取的特征的二维表示"

图5

在特征空间比较新样本的示意图"

图6

ZC3NC算法的流程图输入:不平衡数据集的训练集Dtrain,测试集未知类图像Dtest.输出:Dtest分类结果."

表1

实验使用的数据集信息"

DatasetsInstancesClassesMajorityMinorityIR
DermaMNIST10015766.95%1.15%58.30
EyePacs88702573.67%2.16%34.14

图7

DermaMNIST数据集的部分示例图片"

图8

Eyepacs数据集的DR分级"

表2

在DermaMNIST数据集上的实验结果"

模型原模型原模型+ZC3NC
Balanced ACCWeighted⁃PBalanced ACCWeighted⁃P
Avg54.32%73.91%60.56%75.63%
ResNet1856.51%74.64%64.46%76.46%
ResNet5045.62%70.46%53.10%72.39%
ResNeXt5053.18%72.84%57.30%75.77%
GoogLeNet61.98%77.71%67.36%77.90%

图9

训练集和部分测试集特征的二维表示"

表3

在EyePacs数据集上的实验结果"

模型原模型原模型+ZC3NC
Balanced ACCWeighted⁃PBalanced ACCWeighted⁃P
Avg47.89%73.16%51.25%73.27%
ResNet1847.19%72.48%51.11%72.54%
ResNet5047.70%73.65%51.92%73.94%
ResNeXt5048.19%73.93%52.34%74.39%
GoogLeNet48.46%72.57%49.63%72.22%

表4

各算法在DermaMNIST数据集上的对比实验结果"

模型SMOTEKMSMOTEUbKNNZC3NC
Balanced ACCWeighted⁃PBalanced ACCWeighted⁃PBalanced ACCWeighted⁃PBalanced ACCWeighted⁃P
Avg57.66%74.35%56.33%73.89%60.24%74.69%60.56%75.63%
ResNet1860.65%73.25%59.00%74.92%64.07%76.12%64.46%76.46%
ResNet5049.87%71.89%47.15%70.71%52.94%72.16%53.10%72.39%
ResNeXt5055.34%73.35%52.60%72.35%57.05%73.84%57.30%75.77%
GoogLeNet64.75%76.92%66.57%77.59%66.91%76.62%67.36%77.90%

表5

各算法在EyePacs数据集上的对比实验结果"

模型SMOTEKMSMOTEUbKNNZC3NC
Balanced ACCWeighted⁃PBalanced ACCWeighted⁃PBalanced ACCWeighted⁃PBalanced ACCWeighted⁃P
Avg46.85%72.24%47.89%72.49%48.71%71.94%51.25%73.27%
ResNet1846.54%70.77%48.09%72.26%48.77%71.05%51.11%72.54%
ResNet5046.02%73.91%46.66%73.01%48.83%72.52%51.92%73.94%
ResNeXt5047.46%74.28%49.72%74.35%48.19%72.78%52.34%74.39%
GoogLeNet47.38%70.00%46.89%70.34%49.05%71.41%49.63%72.22%

图10

各算法在DermaMNIST数据集上对比实验的平均结果"

图11

各算法在EyePacs数据集上对比实验的平均结果"

1 Chen X X, Wang X M, Zhang K,et al. Recent advances and clinical applications of deep learning in medical image analysis. Medical Image Analysis2022(79):102444.
2 郑光远,刘峡壁,韩光辉. 医学影像计算机辅助检测与诊断系统综述. 软件学报201829(5):1471-1514.
Zheng G Y, Liu X B, Han G H. Survey on medical image computer aided detection and diagnosis systems. Journal of Software201829(5):1471-1514.
3 Cai L, Gao J Y, Zhao D. A review of the application of deep learning in medical image classification and segmentation. Annals of Translational Medicine20208(11):713.
4 Singh R, Bharti V, Purohit V,et al. MetaMed:Few?shot medical image classification using gradient?based meta?learning. Pattern Recognition2021(120):108111.
5 Yang J C, Shi R, Wei D L,et al. MedMNIST v2:A large?scale lightweight benchmark for 2D and 3D biomedical image classification. Scientific Data202310(1):41.
6 Quellec G, Lamard M, Conze P H,et al. Automatic detection of rare pathologies in fundus photographs using few?shot learning. Medical Image Analysis2020(1):101660.
7 Batista G E A P A, Prati R C, Monard M C. A study of the behavior of several methods for balancing machine learning training data. ACM SIGKDD Explorations Newsletter20046(1):20-29.
8 Hassan A R, Haque M A. An expert system for automated identification of obstructive sleep apnea from single?lead ECG using random under sampling boosting. Neurocomputing2017(235):122-130.
9 Xu Z Z, Shen D R, Nie T Z,et al. A hybrid sampling algorithm combining M?SMOTE and ENN based on random forest for medical imbalanced data. Journal of Biomedical Informatics2020(107):103465.
10 Ghorbani M, Kazi A, Baghshah M S,et al. RA?GCN:Graph convolutional network for disease prediction problems with imbalanced data. Medical Image Analysis2022(75):102272.
11 Frid?Adar M, Diamant I, Klang E,et al. GAN?based synthetic medical image augmentation for increased CNN performance in liver lesion classification. Neurocomputing2018(321):321-331.
12 Li Z W, Liu F, Yang W J,et al. A survey of convolutional neural networks:Analysis,appli?cations,and prospects. IEEE Transactions on Neural Networks and Learning Systems202233(12):6999-7019.
13 Curtis A E, Smith T A, Ziganshin B A,et al. The mystery of the Z?score. Aorta20164(4):124-130.
14 Kirkwood B R, Sterne J A C. Essential medical statistics. New York:John Wiley & Sons,2010:126-128.
15 Wen Y D, Zhang K P, Li Z F,et al. A discriminative feature learning approach for deep face recognition∥The 14th European Conference on Computer Vision. Springer Berlin Heidelberg,2016:499-515.
16 Ali Amirshahi S, Pedersen M, Yu S X. Image quality assessment by comparing CNN features between images. Journal of Imaging Science and Technology201660(1):060410.
17 Abdelzad V, Czarnecki K, Salay R,et al. Detecting out?of?distribution inputs in deep neural networks using an early?layer output. 2019,arXiv:.
18 Narayan A, Berger B, Cho H. Assessing single?cell transcriptomic variability through density?preserving data visualization. Nature Biotechnology202139(6):765-774.
19 McInnes L, Healy J, Melville J. Umap:Uniform manifold approximation and projection for dimension reduction. 2018,arXiv:.
20 Pang T Y, Xu K, Dong Y P,et al. Rethinking softmax cross?entropy loss for adversarial robustness∥The 8th International Conference on Learning Representations. Addis Ababa,Ethiopia:OpenReview.net,2020,arXiv:.
21 Galdran A, Carneiro G, Ballester M A G. Balanced?mixup for highly imbalanced medical image classification∥The 24th International Conference on Medical Image Computing and Computer:Assisted Intervention. Springer Berlin Heidelberg,2021:323-333.
22 Zhu R, Guo Y W, Xue J H. Adjusting the imbalance ratio by the dimensionality of imbalanced data. Pattern Recognition Letters2020(133):217-223.
23 Tschandl P, Rosendahl C, Kittler H. The HAM10000 dataset,a large collection of multi?source dermatoscopic images of common pigmented skin lesions. Scientific Data20185(1):180161.
24 Marcel S, Rodriguez Y. Torchvision the machine?vision package of torch∥Proceedings of the 18th ACM International Conference on Multimedia. Firenze,Italy:ACM,2010:1485-1488.
25 Grandini M, Bagli E, Visani G. Metrics for multi?class classification:An overview. 2020,arXiv:2008. 05756.
26 Flach P A. Performance evaluation in machine learning:The good,the bad,the ugly,and the way forward∥Proceedings of the AAAI Conference on Artificial Intelligence. Honolulu,HI,USA:AAAI Press,2019:9808-9814.
27 Xu H Y, Zhang H, Han K,et al. Learning alignment for multimodal emotion recognition from speech∥Interspeech 2019,the 20th Annual Conference of the International Speech Communication Association. Graz,Austria:ISCA,2019:3569-3573.
28 He K M, Zhang X Y, Ren S Q,et al. Deep residual learning for image recognition∥Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Las Vegas,NV,USA:IEEE,2016:770-778.
29 Xie S N, Girshick R, Dollár P,et al. Aggregated residual transformations for deep neural networks∥Proceedings of 2017 IEEE Conference on Computer Vision and Pattern Recognition. Honolulu,HI,USA:IEEE,2017:5987-5995.
30 Szegedy C, Liu W, Jia Y Q,et al. Going deeper with convolutions∥Proceedings of 2015 IEEE Conference on Computer Vision and Pattern Recognition. Boston,MA,USA:IEEE,2015:1-9.
31 刘娜. 面向非平衡数据的医疗智能诊断与决策支持研究. 博士学位论文. 天津:天津大学,2021.
Liu N. Research on medical intelligent diagnosis and decision support based on imbalanced data. Ph.D. Dissertation. Tianjin:Tianjin University,2021.
32 Douzas G, Bacao F, Last F. Improving imbalanced learning through a heuristic oversampling method based on k?means and SMOTE. Information Sciences2018(465):1-20.
33 Hang H Y, Cai Y C, Yang H F,et al. Under?bagging nearest neighbors for imbalanced classification. The Journal of Machine Learning Research202223(1):118.
[1] 王一宾, 葛文信, 程玉胜, 吴海峰. 基于多维相关性的弱类属属性学习[J]. 南京大学学报(自然科学版), 2023, 59(4): 690-704.
[2] 谭嘉辰, 董永权, 张国玺. SSM: 基于孪生网络的糖尿病视网膜眼底图像分类模型[J]. 南京大学学报(自然科学版), 2023, 59(3): 425-434.
[3] 吕佳, 肖锋. 内存有效的快速双层深度规则分类器[J]. 南京大学学报(自然科学版), 2023, 59(3): 446-459.
[4] 杨京虎, 段亮, 岳昆, 李忠斌. 基于子事件的对话长文本情感分析[J]. 南京大学学报(自然科学版), 2023, 59(3): 483-493.
[5] 宋雨, 肖玉柱, 宋学力. 基于伪标签回归和流形正则化的无监督特征选择算法[J]. 南京大学学报(自然科学版), 2023, 59(2): 263-272.
[6] 冯海, 马甲林, 许林杰, 杨宇, 谢乾. 融合标签嵌入和知识感知的多标签文本分类方法[J]. 南京大学学报(自然科学版), 2023, 59(2): 273-281.
[7] 杨雨佳, 肖庆来, 陈健, 曾松伟. 融合空间和统计特征的CNN⁃GRU臭氧浓度预测模型研究[J]. 南京大学学报(自然科学版), 2023, 59(2): 322-332.
[8] 陈瑞, 徐金东, 刘兆伟, 阎维青, 王璇, 宋永超, 倪梦莹. 基于模糊空谱特征的高光谱图像分类[J]. 南京大学学报(自然科学版), 2023, 59(1): 145-154.
[9] 孙林, 张起峰, 徐久成. 基于互信息的Fisher Score多标记特征选择[J]. 南京大学学报(自然科学版), 2023, 59(1): 55-66.
[10] 张展云, 罗川, 李天瑞, 李红梅, 刘盾. 基于组标签的多标签流特征选择算法[J]. 南京大学学报(自然科学版), 2023, 59(1): 67-75.
[11] 田小瑜, 秦永彬, 黄瑞章, 陈艳平. 基于相关性约束矩阵分解的多标签分类方法[J]. 南京大学学报(自然科学版), 2023, 59(1): 76-84.
[12] 王津, 谭安辉, 顾沈明. 基于弱监督对比学习的弱多标记特征选择[J]. 南京大学学报(自然科学版), 2023, 59(1): 85-97.
[13] 马学森, 马吉, 蒋功辉, 许雪梅, 周天保. 基于注意力机制和多尺度特征融合的绝缘子缺陷检测方法[J]. 南京大学学报(自然科学版), 2022, 58(6): 1020-1029.
[14] 许睿, 刘相阳, 文益民, 沈世铭, 李建. 基于后向气团轨迹的大气污染特征时序混合模型研究[J]. 南京大学学报(自然科学版), 2022, 58(6): 1041-1049.
[15] 张艳莎, 冯夫健, 王杰, 潘凤, 谭棉, 张再军, 王林. 基于张量特征的小样本图像快速分类方法[J]. 南京大学学报(自然科学版), 2022, 58(6): 1059-1069.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!