Automatic Classification Method Based on Swin Transformer for Brain Tumor Images
Aiming at the problem of low accuracy in brain tumor image classification,an improved model based on Swin Transformer is proposed,named Classification Swin Transformer (ClassSwin). The model embeds convolutional Stem in the initial stage to improve the acquisition of local information of the image,and utilize ClassSwin Block to enhance the model 's ability to capture global information. In ClassSwin Block,SCAB is introduced which uses a pair of interdependent branches based on spatial attention and channel attention to effectively learn brain tumor feature information of space and channel. ClassSwin and other classification models were experimentally validated on the Kaggle dataset for brain tumor four classification tasks,with accuracy,precision,recall,specificity,and F1 scores of 99.24%,99.28%,99.18%,99.74% and 99.23%,respectively. The experimental results have proven that this method is helpful for medical experts to accurately diagnose brain tumor types,providing a benchmark for future research in the field of brain tumor classification