We address four-class retinal disease classification (normal, diabetic retinopathy, glaucoma, cataract) using the Swin Transformer (Swin-T). Swin adapts the Transformer paradigm to vision with a hierarchical design and windowed self-attention: attention is computed within non-overlapping windows and the partition is shifted in the next block so tokens interact across boundaries. Thus, computation scales roughly linearly with image size while preserving local detail and longer-range structure. In our pipeline, fundus images are patch-embedded (e.g., \(4\times 4\) pixels) and pass through four stages. Between stages, patch merging concatenates each \(2\times 2\) neighborhood and projects it, reducing spatial resolution and increasing channel capacity to form multi-scale feature maps analogous to CNN pyramids. Within each stage, consecutive blocks alternate between regular and shifted windows (typically \(7\times 7\) patches), enabling cross-window communication without global attention. We evaluate on a multi-source Eye Disease Classification (EDC) collection widely used in prior work. Under a held-out test split, Swin-T attains Accuracy \(=95.76\%\) , Precision \(=95.78\%\) , Recall \(=95.76\%\) , F1 \(=95.76\%\) , and AUC \(=0.996\) . These results highlight the effectiveness of Swin-T while remaining computationally efficient. External evaluation on ODIR-5K (four-class) shows similarly strong performance, supporting robustness across datasets. Overall, Swin-T provides a practical accuracy–efficiency trade-off for fundus classification and a solid basis for future multi-center validation.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Transformer-Based Fundus Screening: Swin-Tiny for Retinal Disease Classification

  • Kawtar Naim,
  • Aziz Darouichi

摘要

We address four-class retinal disease classification (normal, diabetic retinopathy, glaucoma, cataract) using the Swin Transformer (Swin-T). Swin adapts the Transformer paradigm to vision with a hierarchical design and windowed self-attention: attention is computed within non-overlapping windows and the partition is shifted in the next block so tokens interact across boundaries. Thus, computation scales roughly linearly with image size while preserving local detail and longer-range structure. In our pipeline, fundus images are patch-embedded (e.g., \(4\times 4\) pixels) and pass through four stages. Between stages, patch merging concatenates each \(2\times 2\) neighborhood and projects it, reducing spatial resolution and increasing channel capacity to form multi-scale feature maps analogous to CNN pyramids. Within each stage, consecutive blocks alternate between regular and shifted windows (typically \(7\times 7\) patches), enabling cross-window communication without global attention. We evaluate on a multi-source Eye Disease Classification (EDC) collection widely used in prior work. Under a held-out test split, Swin-T attains Accuracy \(=95.76\%\) , Precision \(=95.78\%\) , Recall \(=95.76\%\) , F1 \(=95.76\%\) , and AUC \(=0.996\) . These results highlight the effectiveness of Swin-T while remaining computationally efficient. External evaluation on ODIR-5K (four-class) shows similarly strong performance, supporting robustness across datasets. Overall, Swin-T provides a practical accuracy–efficiency trade-off for fundus classification and a solid basis for future multi-center validation.