Optics and Precision Engineering, Volume. 31, Issue 18, 2752(2023)

Spatial-spectral Transformer for classification of medical hyperspectral images

Yuan LI1... Xu SHI1, Zhengchun YANG2, Qijuan TAN3,* and Hong HUANG1,* |Show fewer author(s)
Author Affiliations
  • 1Key Laboratory of Optoelectronic Technology and Systems of the Education Ministry of China, Chongqing University, Chongqing 400044, China
  • 2Women and Children’s Hospital of Chongqing Medical University, Chongqing 401147, China
  • 3Department of Radiology, Chongqing University Cancer Hospital & Chongqing Cancer Institute & Chongqing Cancer Hospital, Chongqing 40000, China
  • show less
    Figures & Tables(13)
    Flowchart of spatial-spectral self-attention transformer
    Structure of spatial-spectral transformer encoder
    Visualization of spatial and spectral information on Brain and BloodCell HSI Dataset
    Parameter analysis on Brain and BloodCell HSI datasets
    Analysis of multi-view predictions fusion
    Classification maps of different methods on Brain HSI Dataset
    Classification maps of different methods on BloodCell HSI Dataset
    • Table 1. Model parameter of S3AT

      View table
      View in Article

      Table 1. Model parameter of S3AT

      Layer nameParameter
      Linear_1Linear, 81×81
      Spectral-wise DownsamplingConv2D, 3×3, 80, stride 1, padding 1
      Linear_2Linear, 81×384
      Conv2D (Spatial Attention)Conv2D, kernel_size×kernel_size, 1, stride 1, padding 1
      MLP (Spectral Attention)Conv2D, 3×3, 160, stride 1, padding 1
      Conv2D, 3×3, 80, stride 1, padding 1
      Conv3D_1Conv3D, 3×3×3, 2, stride 1, padding 1
      Conv3D_2Conv3D, 3×3×3, 2, stride 1, padding 1
      Conv2D_1Conv2D, 3×3, 80, stride 1, padding 1
      Conv2D_2Conv2D, 3×3, 80, stride 1, padding 1
      Linear_3Linear, 128×144
      Linear_4Linear, 80×4
    • Table 2. Experimental setup on Brain and BloodCell HSI datasets

      View table
      View in Article

      Table 2. Experimental setup on Brain and BloodCell HSI datasets

      Setting ItemDataset
      Brain HSIBloodCell HSI
      Training Set50% of patientsBloodCell1-3
      Valid Set
      Test Set50% of patientsBloodCell2-2
      Training Samples30 samples/class
      Valid Samples10 samples/class
      Test SamplesAll samples
      Loss FunctionCross Entropy Loss
      Epoch300
      Batchsize128
      OptimizerAdamw
      Python Version3.7
      Deep Learning FrameworkPaddle
      GPUTesla V100 (32 G)
      Computing PlatformBaidu AI Studio
    • Table 3. Ablation analysis of the proposed S3AT with a combination of different components

      View table
      View in Article

      Table 3. Ablation analysis of the proposed S3AT with a combination of different components

      NVS3AMetrics
      OA/%AA/%KC/%
      1×72.8372.4962.88
      176.2276.9373.23
      279.0977.6469.92
      380.6278.3774.96
      479.3378.0071.61
      576.4376.4267.80
    • Table 4. Classification results of different algorithms on Brain HSI Dataset

      View table
      View in Article

      Table 4. Classification results of different algorithms on Brain HSI Dataset

      ClassCNN-based MethodsTransformer-based Methods
      HybridSNSSRNDBDAViTCTMixerSSFTTS3AT

      Background

      Normal

      Tumor

      61.64±5.2672.76±2.0167.29±6.7662.63±9.9571.42±3.8560.53±4.5077.27±9.97
      31.73±9.7537.32±9.6135.28±9.0415.90±4.5935.25±9.3223.08±5.2673.00±9.99
      84.02±4.7084.25±3.5982.51±1.4667.45±12.3783.09±1.8383.84±0.8783.48±2.15
      Blood98.95±2.12100.00±0.0095.12±10.2269.22±16.4599.99±0.0399.55±0.9395.35±7.88
      OA68.32±3.7572.25±2.6768.99±3.9851.75±5.9371.07±2.7765.66±1.3582.25±2.88
      AA69.08±3.2973.58±2.1570.05±3.7953.80±5.0772.44±2.2866.75±1.2082.27±3.03
      KC58.15±4.7963.13±3.4758.87±5.3036.72±7.4261.76±3.5254.65±1.7476.17±3.86
    • Table 5. Classification results of different algorithms on BloodCell HSI Dataset

      View table
      View in Article

      Table 5. Classification results of different algorithms on BloodCell HSI Dataset

      ClassCNN-based MethodsTransformer-based Methods
      HybridSNSSRNDBDAViTCTMixerSSFTTS3AT

      RedBloodCell

      Background

      WhiteBloodCell

      87.16±1.2185.35±3.0785.60±1.2170.79±3.0888.52±1.4888.39±3.5989.22±2.69
      96.71±1.4696.82±3.7995.54±1.6193.77±4.1996.59±3.9395.67±1.2998.64±3.79
      61.67±3.6884.60±2.6083.44±1.8376.50±3.3955.35±3.2647.32±2.5580.90±2.93
      OA89.21±3.8888.71±2.4088.25±3.4577.13±3.1990.45±1.6189.50±1.3991.74±2.79
      AA81.85±1.3289.26±1.7588.19±0.8580.35±2.0180.37±1.6477.13±1.4888.97±1.75
      KC77.06±2.8976.66±3.0275.53±1.4457.78±3.3678.34±0.7777.06±2.3281.86±2.19
    • Table 6. Parameters, FLOPs and inference time comparison of different algorithms

      View table
      View in Article

      Table 6. Parameters, FLOPs and inference time comparison of different algorithms

      Parameters/(×106

      FlOPs/

      (×109

      Inference Time/s
      HybridSN14.338.150.055 6
      SSRN1.2620.780.096 4
      DBDA2.3132.200.169 1
      ViT18.8254.120.179 3
      CTMixer0.611.630.018 8
      SSFTT3.633.320.027 6
      S3AT2.007.000.045 6
    Tools

    Get Citation

    Copy Citation Text

    Yuan LI, Xu SHI, Zhengchun YANG, Qijuan TAN, Hong HUANG. Spatial-spectral Transformer for classification of medical hyperspectral images[J]. Optics and Precision Engineering, 2023, 31(18): 2752

    Download Citation

    EndNote(RIS)BibTexPlain Text
    Save article for my favorites
    Paper Information

    Category: Information Sciences

    Received: Jan. 23, 2023

    Accepted: --

    Published Online: Oct. 12, 2023

    The Author Email: TAN Qijuan (hhuang@cqu.edu.cn), HUANG Hong (jiangliao2000@163.com)

    DOI:10.37188/OPE.20233118.2752

    Topics