Enhancing medical image classification via ConvKC-ViT: a hybrid vision transformer model integrating convolutional insights and K-class mean clustering
摘要
In the realm of medical image classification, Vision Transformers (ViTs) have demonstrated robust global modeling capabilities but often struggle to capture local subtle lesion features, particularly in datasets with limited medical images. To address this, we introduce ConvKC-ViT, a hybrid model that integrates convolutional information, K-class mean clustering, and cross-attention mechanisms. The ConvKC-ViT model utilizes multi-scale feature pyramids and K-means pathological prototypes, and employs cross-attention deep fusion of local and global features for pathological image analysis. Experiments on gastrointestinal disease and glaucoma classification datasets demonstrate the model’s excellent performance, achieving 96.09% accuracy, 94.74% recall, and 94.33% precision in gastrointestinal disease classification, and 97.25% accuracy with 95.11% recall and 94.33% precision in glaucoma classification. These superior results demonstrate ConvKC-ViT’s exceptional capability in capturing critical diagnostic features and its strong generalization across medical domains, providing a robust solution for accurate clinical image analysis. We have published this article on improving the model’s GitHub source code and corresponding comment files https://github.com/icecream1024/ConvKC-ViT-The-visual-computer.