Breast cancer is the second leading cause of mortality in women globally, with Invasive Ductal Carcinoma being the most dominant subtype that requires accurate diagnosis to increase patient life expectancy. Conventional diagnosis based on manual histopathological examinations is time-consuming, prone to misinterpretation, and exhibits significant inter-observer variability. This study implemented the Swin Transformer V2 architecture for the automatic classification of Invasive Ductal Carcinoma on 277,524 histopathological images, each measuring 50×50 pixels, which were resized to 256×256 pixels with geometric augmentation. The model was trained using AdamW optimization with a learning rate of 1 × 10⁻⁴, weight decay of 1 × 10⁻⁴, a batch size of 16, and mixed precision (FP16) for five epochs at a 70:20:10 data sharing ratio. The data augmentation includes a 50% probability of a random horizontal flip and a maximum of 10 degrees of random rotation to improve the model's generalization capabilities. Evaluation of 27,754 independent test samples resulted in an accuracy of 92.82%, an accuracy of 88.48%, a recall of 86.05%, an F1-score of 87.25%, and an AUC of 0.91. A hierarchical window attention-shifted mechanism with residual post-normalization has been shown to be effective in extracting local and global features from complex microscopic images. The results show that Swin Transformer V2 has significant potential as a diagnostic aid system to enhance the efficiency and accuracy of early breast cancer detection in clinical pathology practice.
Copyrights © 2025