Preprint
Article

This version is not peer-reviewed.

Blood Cell Imaging Analysis for Multiple Sclerosis Classification Using Leave-One-Subject-Out Study with Deep Neural Networks

Submitted:

20 July 2026

Posted:

24 July 2026

You are already at the latest version

Abstract
Multiple sclerosis (MS) is a chronic neurological disease whose diagnosis typically relies on resource-intensive and partly invasive procedures such as MRI and spinal fluid analysis. This study explores whether deep learning can be used to identify RBC-related changes in MS to help understand the disease process better and identify new treatment modalities. An augmented dataset of 1,944 images, comprising samples from 13 subjects (healthy controls and MS-affected), was used. Four deep learning architectures, VGG16, DenseNet201, MobileNetV2, and the Swin Transformer, were evaluated using subject-level Leave-One-Out Cross-Validation (LOOCV). The Swin Transformer achieved the highest mean accuracy of 73.53%, followed by the fully fine-tuned VGG16 at 71.02%, though a paired t-test indicated no statistically significant difference between them (p = 0.66). Explainable AI techniques (Grad-CAM and SWTformer-v1) revealed that VGG16 focused on broader structural patterns in cell groupings, while the Swin Transformer attended to more localized regions. These findings suggest that deep learning can detect subtle morphological patterns in RBCs associated with MS, and model interpretability shows that MS-related disease cues may reside in cell clustering rather than in individual cell morphology.
Keywords: 
;  ;  ;  ;  ;  ;  ;  ;  ;  

1. Introduction

Multiple sclerosis (MS) is a chronic inflammatory and neurodegenerative condition of the central nervous system, causing a broad range of symptoms, including sensory and motor difficulties, coordination problems, and cognitive impairment. It is a leading cause of neurological disability in the young adult population[1]. There has been considerable progress in the relapsing-remitting forms of the condition. Treatment options for progressive forms of MS, however, remain restricted by an incomplete understanding of disease processes [2]. A large body of research has investigated the role of immunological factors in MS [2]. An area of growing research interest in MS is red blood cells (RBCs)[3]. RBCs bind and transport oxygen to tissues and are therefore crucial to the survival of cells throughout the body. To do this, they contain large amounts of hemoglobin, which is neurotoxic when it escapes from RBCs and enters brain tissue [4]. A number of changes in RBCs in MS have been described, including increased osmotic fragility, enzymatic alterations, and morphological changes [3,4,5,6,7]. Most studies, however, involve relatively small sample sizes because techniques such as osmotic fragility testing and morphological analysis are labor-intensive. This makes it difficult to study a condition like MS conclusively, which is characterized by substantial inter-individual variability in disease course, inflammatory activity, and progression.
In recent years, deep learning has shown considerable promise in medical image classification, achieving strong results in areas such as radiology [8,9], pathology [10], and blood cell analysis [11,12]. Convolutional neural networks (CNNs) are particularly well suited to microscopy tasks because they learn relevant visual features directly from pixel data, removing the need for manual feature engineering [13]. Transformer-based architectures, such as the Swin Transformer, have further expanded the toolbox by introducing attention mechanisms that capture both local detail and broader spatial context within an image [14].
This exploratory study aims to determine whether automated image analysis using four distinct deep learning architectures can identify morphological alterations in red blood cells (RBCs) in individuals with progressive multiple sclerosis (MS) and healthy controls. Automated image analysis not only enables examination of larger cohorts but also enables a systematic, data-driven, and unbiased investigation of a broad spectrum of potential differences between MS and healthy RBCs, rather than restricting analysis to predetermined features.
This study examines the performance of four deep learning architectures, VGG16, DenseNet201, MobileNetV2, and the Swin Transformer, in terms of their ability to classify RBC microscopy images into Healthy Control (HC) and MS-affected (MS) categories. The study used 1,944 images after applying data augmentation and various preprocessing techniques discussed in Section 3. All four models are evaluated using subject-level Leave-One-Out Cross-Validation (LOOCV) across 13 subjects, ensuring that no subject data appeared in both the training and testing sets. Additionally, explainable AI methods such as Grad-CAM and SWTformer-v1 are used to visualize which image regions influenced each model’s predictions, providing interpretable feedback for medical professionals.
The paper is organized as follows. Section 2 covers related work in blood cell classification and deep learning for medical imaging. Section 3 presents the dataset, preprocessing pipeline, model architectures, and evaluation strategy. Section 4 reports the experimental results. Section 5 presents conclusions and future research directions.

3. Materials and Methods

3.1. Dataset

The dataset used in this study consisted of blood film images captured with a high-resolution microscope (4032 × 1960 pixels) by RR Mechatronics, a company specializing in laboratory automation and hematology instrumentation [27]. The blood samples came from 13 volunteers recruited to the NOII study at the University of Southampton, with informed consent (research ethical committee and institutional approval numbers 11/SC/0204 and 41084.A1, respectively), including healthy individuals and those with progressive multiple sclerosis.
The initial dataset contained 629 images, split into 220 healthy control (HC) images and 409 MS-affected (MS) images. Upon inspection, several images were found to be unusable due to chemical treatment of the blood samples (e.g., CDNB, CHP, Diamide) or duplication. These were removed to ensure the model would learn only from natural morphological features. The dataset comprises 13 individual subjects, forming the basis for the subject-level cross-validation strategy described in Section 3.4.

3.2. Data Preprocessing

To further increase dataset diversity and improve model generalization, various image processing techniques were applied independently to each original image, producing multiple enhanced versions of each sample. This process of expanding the dataset by applying different transformations is known as data augmentation. For this study, a greyscale version of each original image was produced, i.e., a single-channel intensity representation that preserves cell morphology while removing color-related noise from staining and illumination variation [28]. Images were stored as three-channel RGB to maintain compatibility with pre-trained architectures. To enhance the visibility of structural details, the HSV color space variant of each image is obtained by multiplying the value (V) channel by a factor of 1.6 to maximize edge visibility without introducing noise [28]. To help the model focus on morphological features rather than memorize specific color patterns, Hue and saturation scaling were applied by shifting the hue channel and multiplying the saturation channel by 1.5, thereby increasing color diversity [28].
Morphological closing and opening operations are also applied to augment the dataset, e.g., closing estimates and subtracting the image background using a 51 × 51 elliptical kernel to remove shadows and lighting inconsistencies, producing cleaner cell boundaries [29]. While opening removes small bright artifacts using a 15 × 15 elliptical kernel, complementing the closing operation to normalize lighting variation across the dataset [29]. Furthermore, to enhance local contrast and sharpen subtle morphological details, CLAHE (Contrast Limited Adaptive Histogram Equalization) was applied using a tile size of 8 × 8 pixels and a clip limit of 2 [30].
Figure 1. Image preprocessing techniques.
Figure 1. Image preprocessing techniques.
Preprints 224156 g001
This step of data augmentation expanded the dataset to 1,944 images (984 HC, 960 MS), including both original and enhanced representations of each sample. The second preprocessing step was image resizing and normalization. The original images were resized to evaluate the effect of input resolution on model performance. Three resolutions were tested: 224 × 224, 1024 × 512, and 560 × 272 pixels. Resizing was performed using Lanczos interpolation, a high-quality resampling method that preserves edges and fine details [31]. The 560 × 272 resolution was selected for all subsequent experiments based on the best balance between classification accuracy and computational efficiency (see Section 4). All images were normalized using the ImageNet mean ([0.485, 0.456, 0.406]) and standard deviation ([0.229, 0.224, 0.225]) to align the input distributions with the pre-trained model weights.

3.3. Models

Four deep learning architectures were selected for evaluation based on their demonstrated effectiveness in medical image and blood cell classification tasks [11,12,19,25].

3.3.1. VGG16

VGG16 is a deep convolutional neural network introduced by Simonyan and Zisserman [22] from the Visual Geometry Group at the University of Oxford. The architecture, as shown in Figure 2, consists of 16 learnable layers: 13 convolutional layers organized into five blocks, followed by 3 fully connected layers. A defining characteristic of VGG16 is its exclusive use of small 3 × 3 convolutional filters throughout the network. While individually these filters capture only small local patterns, stacking multiple 3 × 3 layers achieves the same effective receptive field as larger filters (e.g., two 3 × 3 layers cover the same area as one 5 × 5 filter) while using fewer parameters and introducing additional non-linearity through the activation functions between layers.
The five convolutional blocks progressively increase the number of filters: 64 in the first, 128 in the second, 256 in the third, and 512 in both the fourth and fifth blocks. Each block is followed by a max-pooling layer with a 2 × 2 window, which halves the spatial dimensions at each stage. This design creates a characteristic funnel shape where spatial resolution decreases while feature depth increases, transitioning from fine-grained local features in the early layers to higher-level abstract representations in the deeper layers.
After the convolutional blocks, the feature maps are flattened and passed through two fully connected layers of 4,096 neurons each, followed by the output layer, as shown in Figure 2. VGG16 was trained under three training settings to examine how the degree of adaptation to the RBC dataset affects classification performance, and these are:
Feature extraction (FE): All convolutional layers were frozen with pre-trained ImageNet weights, and only the classifier head was trained. This tests whether generic image features are sufficient for RBC classification.
Partial fine-tuning (PFT): The final convolutional block (block 5) was unfrozen along with the classifier head, allowing the network to adapt its highest-level feature representations to the dataset while retaining general low-level features from ImageNet.
Full fine-tuning (FFT): All network layers were made trainable, giving the model maximum flexibility to learn dataset-specific features at every level of the hierarchy.

3.3.2. DenseNet201

DenseNet201 (Densely Connected Convolutional Network), as shown in Figure 3, introduces a fundamentally different connectivity pattern from sequential architectures such as VGG16 [32]. Within each dense block, every layer receives the feature maps of all preceding layers as input and passes its own feature maps to all subsequent layers. This is achieved through concatenation rather than summation, meaning feature maps accumulate as they pass through the block. This dense connectivity encourages feature reuse across the network and helps maintain strong gradient flow during training, reducing the risk of vanishing gradients in very deep networks [29].
The DenseNet201 architecture consists of four dense blocks, each separated by a transition layer. Within each dense block, feature map spatial dimensions remain constant to allow direct concatenation. The transition layers between blocks serve two purposes: a 1 × 1 convolution compresses the accumulated channel depth, and an average pooling operation halves the spatial dimensions to maintain computational efficiency.
Despite having 201 layers, the dense connectivity and channel compression through transition layers keep the parameter count manageable. For this study, the original classifier head was replaced with a 2-output head for binary classification. DenseNet201 was evaluated solely for feature extraction.

3.3.3. MobileNetV2

MobileNetV2 is designed for computational efficiency, making it suitable for resource-constrained environments without sacrificing classification performance [33]. The key innovation is the use of depthwise separable convolutions, which decompose a standard convolution into two separate operations: a depthwise convolution that applies a single filter per input channel (capturing spatial patterns), followed by a 1 × 1 pointwise convolution that combines information across channels. This factorization dramatically reduces the number of computations and parameters compared to standard convolutions.
The architecture, as shown in Figure 4, is built around inverted residual blocks, which follow an expansion-projection pattern. Each block first expands the input to a higher-dimensional feature space using a 1 × 1 convolution (allowing the model to learn complex patterns), applies a depth-wise convolution for spatial filtering, and then projects back to a compact lower-dimensional representation with another 1 × 1 convolution. Residual connections link the input and output of each block when their dimensions match, enabling efficient gradient flow. The expansion and projection steps use ReLU6 activation, while the final projection uses a linear activation to prevent information loss in the low-dimensional bottleneck.

3.3.4. Swin Transformer

The Swin Transformer, as shown in Figure 5, departs from CNN-based approaches by using a self-attention mechanism rather than convolutions to model relationships between image regions [14,24]. Unlike standard Vision Transformers, which compute attention across the entire image at once — a computationally expensive step for high-resolution inputs — the Swin Transformer restricts attention to local windows and gradually integrates information across the image through a hierarchical design.
The input image is first divided into non-overlapping 4 × 4-pixel patches, which are flattened and projected into feature vectors via a linear embedding layer. These patch tokens are then processed through four sequential stages. Between stages, patch-merging layers concatenate groups of 2 × 2 neighboring patches and project them into a higher-dimensional vector, reducing the total number of tokens by a factor of 4 while increasing feature depth. This creates a hierarchy in which early stages operate on high-resolution representations that capture fine details, and later stages operate on compact representations that encode broader structure—similar to multi-scale feature extraction in CNNs.
Within each stage, self-attention is computed independently over local 7 × 7 patch windows. Each patch token is projected into query (Q), key (K), and value (V) representations:
Q   =   X W Q ,     K   =   X W K ,     V   =   X W V    
Attention is then computed as shown in equation (2)
A t t e n t i o n ( Q ,   K ,   V ) = s o f t m a x ( Q K T d )   V        
where d is the feature dimension. This operation determines how strongly each patch should attend to its neighbors within the same window. Multi-head self-attention runs several of these operations in parallel, with each head learning different types of relationships (e.g., fine textures vs. broader shapes). The outputs of all heads are concatenated to produce a rich local feature representation.
To enable information flow between adjacent windows, the Swin Transformer alternates between regular and shifted window partitions across consecutive layers. In shifted layers, the window grid is offset by half the window size, allowing patches at window boundaries to interact with their neighbors in the adjacent window. This mechanism provides cross-window connectivity while preserving the computational efficiency of local attention.
The Swin-T (Tiny) variant is used in this study, configured with 96 initial channels, a block configuration of {2, 2, 6, 2} across four stages, and approximately 28 million parameters (Table 1). Its smaller size relative to the Swin-S, Swin-B, and Swin-L variants makes it suitable for training on limited datasets.
After the final stage, the output feature maps are globally average-pooled into a fixed-length vector and passed through a linear classifier head with 2 output neurons for binary classification.

3.4. Setup and Strategy

All four architectures were initialized with weights pre-trained on ImageNet [22]. During fine-tuning, the convolutional or patch embedding layers initially retained their pre-trained weights. At the same time, the classification head was replaced and trained from scratch for the binary HC vs. MS task. For VGG16 under partial and full fine-tuning, deeper layers were progressively unfrozen to adapt the pre-trained features to the microscopy dataset.
For smaller or imbalanced datasets, leave-one-out cross-validation (LOOCV) is often recommended. In LOOCV, k = n , where n   is the number of samples in the dataset, meaning that all samples except one are used for training in each iteration. Because the model must be trained n   times, LOOCV is computationally demanding. As a result, it is generally not suitable for very large datasets or for models with computationally expensive training procedures [34].
A subject-level LOOCV strategy was used to evaluate model performance. In each fold, images from one of the 13 subjects were held out as the test set, while images from the remaining 12 subjects were used for training. This process was repeated for all 13 subjects, ensuring that no subject’s data appeared in both the training and test sets within the same fold. LOOCV is well-suited to small datasets as it maximizes the available training data in each iteration [35]. All models were implemented in PyTorch, with architectures accessed through the timm library. CNN models under feature extraction were trained for 10 epochs, while fine-tuned CNNs and the Swin Transformer were trained for up to 20 epochs. Early stopping with a patience of 5 epochs was applied based on validation accuracy, using 15% of the training data as a validation set. The AdamW optimizer [36] was used with cross-entropy loss [37] for all experiments.

4. Results

The training process was carried out in three phases. During the first phase, three pretrained CNN models were used to extract features by freezing their convolutional bases. Table 2 summarizes the patient-wise LOOCV accuracies for each model.
Among the three CNN models, VGG16 achieved the highest mean LOOCV accuracy at 60.44%, followed by MobileNetV2 at 53.16% and DenseNet201 at 43.57%. Based on this result, VGG16 was selected for further experiments with partial and full fine-tuning. Among the three CNN models, VGG16 achieved the highest mean LOOCV accuracy at 60.44%, followed by MobileNetV2 at 53.16% and DenseNet201 at 43.57%. Based on this result, VGG16 was selected for further experiments with partial and full fine-tuning. The results of that phase are presented in Table 3. Partial fine-tuning improved the mean accuracy to 65.62%, while full fine-tuning further increased it to 71.02%. This indicates that allowing the model to adapt its learned features to the RBC dataset yields better classification performance, albeit at the cost of increased training time.
In the third phase, the Swin Transformer was evaluated at three input resolutions to determine the optimal balance between image detail and computational cost. Table 4 summarizes the results. The 560 × 272 resolution achieved the highest mean accuracy of 73.53%, outperforming both the 224 × 224 (66.14%) and 1024 × 512 (59.60%) configurations. The smaller resolution likely discarded too much morphological detail, while the larger resolution may have introduced excessive complexity that hindered learning. All subsequent experiments used a resolution of 560 × 272.
Table 5 presents a side-by-side comparison of the best-performing configurations: the Swin Transformer (560 × 272) and fully fine-tuned VGG16. Both were trained using the same input resolution and evaluation setup.
The Swin Transformer slightly outperformed VGG16 in mean accuracy (73.53% vs. 71.02%). Both models achieved strong results for subjects such as MS_J36, MS_J38, and MS_J40, but struggled with MS_J42. The performance gap between the two models varied considerably across individual subjects.
A paired t-test was conducted to determine whether the difference in subject-wise accuracies between the Swin Transformer and VGG16 (FFT) was statistically significant. The resulting p-value was 0.66, well above the significance threshold of α = 0.05. This indicates that the two models perform comparably on this dataset, with no statistically meaningful advantage for either architecture.

5. Discussion

The results of this study demonstrate that deep learning models can detect patterns in red blood cell microscopy images that distinguish healthy individuals from those with MS, though with notable variability among subjects. The Swin Transformer achieved the highest mean LOOCV accuracy of 73.53%, marginally outperforming the fully fine-tuned VGG16 at 71.02%. The progression from feature extraction to full fine-tuning in VGG16 (60.44% → 65.62% → 71.02%) suggests that the pre-trained ImageNet features, while useful, are not fully sufficient for this task. Allowing deeper layers to adapt to the specific characteristics of RBC microscopy images yielded meaningful gains. This is consistent with broader findings in medical imaging, where domain-specific fine-tuning typically outperforms fixed feature extraction [10,23].
Among the CNN models under feature extraction, DenseNet201 performed the weakest (43.57%), despite its architectural advantages of dense connectivity and feature reuse. This may be attributed to its larger parameter count relative to the small dataset size, making it more prone to overfitting even with a frozen backbone. MobileNetV2 performed moderately (53.16%), suggesting that its lightweight design, while efficient, may lack the capacity to capture the subtle morphological differences relevant to this task.
Figure 6 displays the confusion matrices for two top-performing models, showing that both VGG16 and Swin Transformer performed well in differentiating Multiple Sclerosis (MS) samples from healthy controls (HC). This indicates that blood cell images contain relevant discriminative features for disease classification. Nonetheless, the Swin Transformer consistently surpassed VGG16 in most evaluation metrics. From the confusion matrices, the Swin Transformer correctly identified 684 HC samples and 742 MS samples, while VGG16 correctly identified 678 HC and 705 MS. Importantly, the Swin Transformer made fewer false negatives for MS (218 vs. 255), reflecting a higher sensitivity to the presence of MS. Although differences in healthy control accuracy were minor, the Swin Transformer showed a more balanced performance across both classes.
Subject-wise analysis reveals substantial variability across individuals, as shown in Figure 7 and Figure 8. While both models achieve high accuracy for certain subjects (e.g., MS_J38), performance drops significantly for others (e.g., MS_J42). These results suggest that inter-subject variability in red blood cell morphology has a stronger impact on classification performance than the choice of model architecture.
The comparable performance of both models can be attributed to their distinct feature-extraction mechanisms. VGG16, a convolutional neural network pretrained on ImageNet, relies on hierarchical convolutional filters to extract local texture and shape information.
To interpret the models’ performance, Grad-CAM and SWTformer-v1 were used. When fine-tuned on red blood cell images, Grad-CAM visualizations show relatively broad and spatially coherent activation regions, suggesting that the model relies on larger structural patterns for classification. The two test images from the MS class were chosen because the confidence scores for both models were at their maximum. Figure 9 and Figure 10 show that VGG16 highlights broad and spatially coherent regions of attention. In contrast, the Swin Transformer employs a shifted-window self-attention mechanism to model both local and global dependencies. The corresponding SWTformer-v1 visualizations in the study highlight more localized and fragmented regions of attention. While this indicates that the model focuses on specific image regions, the resulting heatmaps are less spatially consistent and do not always align with established medical knowledge [24].
This suggests that although the Swin Transformer is designed to capture broader contextual relationships, its explainability in this application is less intuitive than that of CNN-based approaches. Therefore, interpretability methods for transformer-based architectures may require further refinement. Despite these differences in visual explanations, the paired t-test indicates no statistically significant difference in overall classification performance between the two architectures.
The findings are consistent with recent studies showing that transformer-based architectures perform competitively in both medical and non-medical image analysis tasks. In non-medical domains such as deepfake detection, transformer-based models have been shown to match or outperform CNN-based architectures in capturing subtle visual inconsistencies [38].
In medical imaging applications such as glaucoma classification, comparative results between VGG16 and Swin Transformer (among others) show that VGG16 achieved the highest overall accuracy. In contrast, Swin Transformer achieved higher recall for the positive class, indicating a trade-off between sensitivity and overall accuracy rather than a clear dominance in performance [39]. In blood cell classification tasks, shifted-window transformer architectures have been shown to outperform CNN-based architectures and standard Vision Transformers [24].
In blood cell classification, shifted-window transformer architectures have demonstrated performance comparable to state-of-the-art convolutional neural networks, including VGG16. These findings suggest that transformer-based models such as the Swin Transformer are effective at capturing complex spatial dependencies in medical image data. However, these advantages are not always reflected in statistically significant improvements in overall accuracy.
A key limitation is that the discriminative signal in this cohort may reflect factors other than MS itself, such as those associated with chronic inflammation or treatment-related changes. Confirming disease-intrinsic detection specific to MS would require a larger cohort to control for factors such as age, sex, and disease activity, as well as a healthy control group including participants with other inflammatory conditions.

5. Conclusions

This study investigated whether deep learning models can detect signs of multiple sclerosis from red blood cell microscopy images. Four architectures, VGG16, DenseNet201, MobileNetV2, and the Swin Transformer, were evaluated using subject-level Leave-One-Out Cross-Validation on a dataset of 1,944 images derived from 13 subjects.
The Swin Transformer achieved the highest mean accuracy of 73.53%, followed closely by the fully fine-tuned VGG16 at 71.02%, with no statistically significant difference between them (p = 0.66). The CNN feature extraction experiments identified VGG16 as the strongest performer among the three CNN architectures, and fine-tuning progressively improved its accuracy.
Using a deep learning approach to analyze blood images, a difference in RBC morphology between MS and healthy controls was identified. While these RBC changes are most likely secondary to the MS disease process and may also occur in other chronic diseases, further research is needed to determine whether they may play a role in progression via a positive feedback cycle, rather than merely being an epiphenomenon.
The observed inter-subject variability highlights the challenges associated with developing universally generalizable classifiers from image data alone. Future studies should explore multimodal frameworks that combine morphological features extracted from blood cell images with subject-specific metadata and clinical variables. Such approaches may capture complementary disease-related information and reduce performance variability across individuals. Expanding the dataset to include longitudinal data and a larger, more diverse cohort, including control participants with other conditions, will further facilitate the development of clinically relevant morphological RBC analysis in MS and perhaps other chronic disorders.

Author Contributions

Conceptualization, D.T. and M.B.; methodology, D.T., M.B. and J. Z.; validation, D.T.; formal analysis, D.T.; data curation, I.G., C.J., J.Z. and D.T.; writing—original draft preparation, D.T., M.B. and T. N.; writing—review and editing, D.T., M.B., N. C., J. Z., T. N., I. G. and C. J.; supervision, M.B.

Funding

This research was funded by Regieorgaan SIA, part of the Dutch Research Council (NWO), under the KIEM HighTech 2024–2026 program, Dossier Number HT.KIEM.01.079. The associated grant identifier is https://doi.org/10.61686/NIQZH03450.

Institutional Review Board Statement

The study was conducted in accordance with the Declaration of Helsinki, and the protocol was approved by the research ethical committee and institutional approval numbers 11/SC/0204 and 41084.A1, respectively, on 26 July 2011.

Data Availability Statement

The dataset used in this study is not publicly available or publicly archived.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Jakimovski, D.; Bittner, S.; Zivadinov, R.; et al. Multiple sclerosis. The Lancet 2023, 403, 183–202. [Google Scholar] [CrossRef]
  2. Attfield, K.E.; Jensen, L.T.; Kaufmann, M.; Friese, M.A.; Fugger, L. The immunology of multiple sclerosis. Nat. Rev. Immunol. 2022, 22, 734–750. [Google Scholar] [CrossRef] [PubMed]
  3. Groen, K.; E Maltby, V.; A Sanders, K.; Scott, R.J.; Tajouri, L.; Lechner-Scott, J. Erythrocytes in multiple sclerosis – forgotten contributors to the pathophysiology? Mult. Scler. J.-Exp. Transl. Clin. 2016, 2. [Google Scholar] [CrossRef] [PubMed]
  4. Laszlo, S. Fragilité osmotique des globules rouges dans la sclérose en plaques. Acta Neurol. Belg. 1964, 64, 529–533. [Google Scholar]
  5. Jacob, C.; Williams, T.E.; Stuart, C.M.; Witkover, A.; Hametner, S.; Lassmann, H.; Bangham, C.R.M.; Chataway, J.; Galea, I. Erythrocyte Fragility in Progressive Multiple Sclerosis. Eur. J. Neurol. 2026, 33, e70595. [Google Scholar] [CrossRef] [PubMed]
  6. Caspary, E.A.; Sewell, F.; Field, E.J. Red blood cell fragility in multiple sclerosis. BMJ 1967, 2, 610–611. [Google Scholar] [CrossRef] [PubMed]
  7. Prineas, J. RED BLOOD CELL SIZE IN MULTIPLE SCLEROSIS. Acta Neurol. Scand. 1968, 44, 81–90. [Google Scholar] [CrossRef] [PubMed]
  8. Latif, J.; Xiao, C.; Imran, A.; Tu, S. Medical Imaging using Machine Learning and Deep Learning Algorithms: A Review. 2019 2nd International Conference on Computing, Mathematics and Engineering Technologies (iCoMET); LOCATION OF CONFERENCE, PakistanDATE OF CONFERENCE; pp. 1–5.
  9. Pa, M.K.; Raja, S.S. Deep Learning Based Image Classification and Abnormalities Analysis of MRI Brain Images. In Proceedings of the 2019 TEQIP III Sponsored International Conference on Microwave Integrated Circuits, Photonics and Wireless Networks (IMICPW), Tiruchirappalli, India, 22–24 May 2019; pp. 427–431. [Google Scholar]
  10. Haouam, K.-D.; Benmalek, M. Machine Learning Algorithms for Early Prediction of Multiple Sclerosis Progression: A Comparative Study. Adv. Artif. Intell. Mach. Learn. 2024, 04, 2027–2051. [Google Scholar] [CrossRef]
  11. Islam, O.; Assaduzzaman; Hasan, Z. An explainable AI-based blood cell classification using optimized convolutional neural network. J. Pathol. Inform. 2024, 15, 100389. [Google Scholar] [CrossRef] [PubMed]
  12. Butt, M.; de Keijzer, A. Using Transfer Learning to Train a Binary Classifier for Lorrca Ektacytometry Microscopic Images of Sickle Cells and Healthy Red Blood Cells. Data 2022, 7, 126. [Google Scholar] [CrossRef]
  13. Dipto, S.M.; Reza, T.; Mim, N.T.; Ksibi, A.; Alsenan, S.; Uddin, J.; Samad, A. An analysis of decipherable red blood cell abnormality detection under federated environment leveraging XAI incorporated deep learning. Sci. Rep. 2024, 14, 1–18. [Google Scholar] [CrossRef] [PubMed]
  14. Liu, Z.; Lin, Y.; Cao, Y.; Hu, H.; Wei, Y.; Zhang, Z.; Lin, S.; Guo, B. Swin Transformer: Hierarchical Vision Transformer Using Shifted Windows. 2021 IEEE/CVF International Conference on Computer Vision (ICCV), Montreal, QC, Canada, 2021; pp. 9992–10002. [Google Scholar]
  15. Patil, D.N.; Khot, U.P. Image Processing-Based Abnormal Blood Cells Detection. Int. J. Tech. Res. Appl. 2017, 31, 37–43. [Google Scholar]
  16. Akrimi, J.A.; Suliman, A.; George, L.E.; Ahmad, A.R. Classification red blood cells using support vector machine. 2014 International Conference on Information Technology and Multimedia (ICIMU); LOCATION OF CONFERENCE, MalaysiaDATE OF CONFERENCE; pp. 265–269.
  17. Maity, M.; Mungle, T.; Dhane, D.; Maiti, A.K.; Chakraborty, C. An Ensemble Rule Learning Approach for Automated Morphological Classification of Erythrocytes. J. Med. Syst. 2017, 41, 1–14. [Google Scholar] [CrossRef] [PubMed]
  18. Chy, T.S.; Rahaman, M.A. A Comparative Analysis by KNN, SVM & ELM Classification to Detect Sickle Cell Anemia. 2019 International Conference on Robotics,Electrical and Signal Processing Techniques (ICREST); LOCATION OF CONFERENCE, BangladeshDATE OF CONFERENCE; pp. 455–459.
  19. Alzubaidi, L.; Al-Shamma, O.; Fadhel, M.A.; Farhan, L.; Zhang, J. Classification of Red Blood Cells in Sickle Cell Anemia Using Deep Convolutional Neural Network. International Conference on Intelligent Systems Design and Applications; LOCATION OF CONFERENCE, IndiaDATE OF CONFERENCE; pp. 550–559.
  20. Xu, M.; Papageorgiou, D.P.; Abidi, S.Z.; Dao, M.; Zhao, H.; Karniadakis, G.E. A deep convolutional neural network for classification of red blood cells in sickle cell anemia. PLoS Comput. Biol. 2017, 13, e1005746–e1005746. [Google Scholar] [CrossRef] [PubMed]
  21. Yao, X.; Sun, K.; Bu, X.; Zhao, C.; Jin, Y. Classification of white blood cells using weighted optimized deformable convolutional neural networks. Artif. Cells Nanomed. Biotechnol. 2021, 49, 147–155. [Google Scholar] [CrossRef] [PubMed]
  22. Simonyan, K.; Zisserman, A. Very Deep Convolutional Networks for Large-Scale Image Recognition. In Proceedings of the International Conference on Learning Representations (ICLR), San Diego, CA, USA, 7–9 May 2015. [Google Scholar]
  23. Purwono, P.; Ma'ARif, A.; Rahmaniar, W.; Fathurrahman, H.I.K.; Frisky, A.Z.K.; Haq, Q.M.U. Understanding of Convolutional Neural Network (CNN): A Review. Int. J. Robot. Control. Syst. 2022, 2, 739–748. [Google Scholar] [CrossRef]
  24. Chen, S.; Lu, S.; Wang, S.; Ni, Y.; Zhang, Y. Shifted Window Vision Transformer for Blood Cell Classification. Electronics 2023, 12, 2442. [Google Scholar] [CrossRef]
  25. Selvaraju, R.R.; Cogswell, M.; Das, A.; Vedantam, R.; Parikh, D.; Batra, D. Grad-CAM: Visual Explanations from Deep Networks via Gradient-Based Localization. arXiv 2016, arXiv:1610.02391. [Google Scholar]
  26. Ahmadi, R.; Kasaei, S. Leveraging Swin Transformer for Local-to-Global Weakly Supervised Semantic Segmentation. 2024 13th Iranian/3rd International Machine Vision and Image Processing Conference (MVIP); LOCATION OF CONFERENCE, IranDATE OF CONFERENCE; pp. 1–7.
  27. Mechatronics, R.R. About Us. Available online: https://rrmechatronics.com/about-us/ (accessed on 29 October 2025).
  28. Salvi, M.; Acharya, U.R.; Molinari, F.; Meiburger, K.M. The impact of pre- and post-image processing techniques on deep learning frameworks: A comprehensive review for digital pathology image analysis. Comput. Biol. Med. 2021, 128, 104129. [Google Scholar] [CrossRef] [PubMed]
  29. Gautam, A.; Bhadauria, H. Classification of white blood cells based on morphological features. 2014 International Conference on Advances in Computing, Communications and Informatics (ICACCI), LOCATION OF CONFERENCE, IndiaDATE OF CONFERENCE; pp. 2363–2368.
  30. Singh, B.B.; Patel, S. Efficient Medical Image Enhancement Using CLAHE Enhancement and Wavelet Fusion. Int. J. Comput. Appl. 2017, 167, 1–5. [Google Scholar] [CrossRef]
  31. Jahnavi, M.; Rao, D.R.; Sujatha, A. A Comparative Study Of Super-Resolution Interpolation Techniques: Insights For Selecting The Most Appropriate Method. Procedia Comput. Sci. 2024, 233, 504–517. [Google Scholar] [CrossRef]
  32. Huang, G.; Liu, Z.; Van Der Maaten, L.; Weinberger, K.Q. Densely Connected Convolutional Networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; pp. 4700–4708. [Google Scholar]
  33. Sandler, M.; Howard, A.; Zhu, M.; Zhmoginov, A.; Chen, L. MobileNetV2: Inverted Residuals and Linear Bottlenecks. In in Proceedings of the IEEE conference on computer vision and pattern recognition, Salt Lake City, UT, USA, Jun. 2018; IEEE; pp. 4510–4520. [Google Scholar] [CrossRef]
  34. Wong, T.-T. Performance evaluation of classification algorithms by k-fold and leave-one-out cross-validation Pattern Recognition 2015, 48(9), 2839–2846. [CrossRef]
  35. Lumumba, V.W.; Kiprotich, D.; Mpaine, M.L.; Makena, N.G.; Kavita, M.D. Comparative Analysis of Cross-Validation Techniques: LOOCV, K-folds Cross-Validation, and Repeated K-folds Cross-Validation in Machine Learning Models. Am. J. Theor. Appl. Stat. 2024, 13, 127–137. [Google Scholar] [CrossRef]
  36. Loshchilov, I.; Hutter, F. Decoupled Weight Decay Regularization. In Proceedings of the International Conference on Learning Representations (ICLR), New Orleans, LA, USA, 6–9 May 2019. [Google Scholar]
  37. Mao, A.; Mohri, M.; Zhong, Y. Cross-Entropy Loss Functions: Theoretical Analysis and Applications. arXiv 2023, arXiv:2304.07288. [Google Scholar]
  38. Xi, A. J.; Chen, E. Classifying deepfakes using Swin Transformers. arXiv. 2025. Available online: https://arxiv.org/abs/2501.15656.
  39. Guntreddi, V.; V, S. Deep learning based glaucoma detection using majority voting ensemble of ResNet50, VGG16, and Swin Transformer. Results Eng. 2025, 28. [Google Scholar] [CrossRef]
Figure 2. Architecture of the VGG16 model.
Figure 2. Architecture of the VGG16 model.
Preprints 224156 g002
Figure 3. Architecture of DenseNet.
Figure 3. Architecture of DenseNet.
Preprints 224156 g003
Figure 4. Architecture of MobileNetV2.
Figure 4. Architecture of MobileNetV2.
Preprints 224156 g004
Figure 5. Basic Architecture of Swin Transformer (Tiny).
Figure 5. Basic Architecture of Swin Transformer (Tiny).
Preprints 224156 g005
Figure 6. Confusion Matrices a) confusion matrix for Swin Transformer b) confusion matrix for VGG16.
Figure 6. Confusion Matrices a) confusion matrix for Swin Transformer b) confusion matrix for VGG16.
Preprints 224156 g006
Figure 7. Subject-wise accuracy for HC subjects comparing Swin Transformer and VGG16.
Figure 7. Subject-wise accuracy for HC subjects comparing Swin Transformer and VGG16.
Preprints 224156 g007
Figure 8. Subject-wise accuracy for MS subjects comparing Swin Transformer and VGG16.
Figure 8. Subject-wise accuracy for MS subjects comparing Swin Transformer and VGG16.
Preprints 224156 g008
Figure 9. GRAD-Cam and SwTformer-v1 visualizations on test image 1.
Figure 9. GRAD-Cam and SwTformer-v1 visualizations on test image 1.
Preprints 224156 g009
Figure 10. GRAD-Cam and SwTformer-v1 visualizations on test image 2.
Figure 10. GRAD-Cam and SwTformer-v1 visualizations on test image 2.
Preprints 224156 g010
Table 1. Swin Transformer variants and configurations.
Table 1. Swin Transformer variants and configurations.
Model Initial Channels (C) Block Configuration Parameters (M)
Swin-T (Tiny) 96 {2, 2, 6, 2} 28M
Swin-S (Small) 96 {2, 2, 18, 2} 50M
Swin-B (Base) 128 {2, 2, 18, 2} 88M
Swin-L (Large) 192 {2, 2, 18, 2} 197M
Table 2. LOOCV performance of pretrained models for feature extraction.
Table 2. LOOCV performance of pretrained models for feature extraction.
Subject DenseNet201 (FE) MobileNetV2 (FE) VGG16 (FE)
HC_J01 16.15 40.62 51.04
HC_J04 3.65 6.25 34.9
HC_J07 36.31 52.38 53.57
HC_J23 22.02 56.55 65.48
HC_J24 80.21 97.92 71.88
HC_J25 61.9 73.81 76.19
MS_J34 81.67 92.78 84.44
MS_J35 72.22 81.25 96.53
MS_J36 58.93 45.24 58.93
MS_J38 75 76.85 94.44
MS_J40 20.83 26.67 43.33
MS_J41 35.19 32.41 36.11
MS_J42 2.27 8.33 18.94
Mean LOOCV Acc. 43.57 53.16 60.44
Table 3. LOOCV accuracies for VGG16 under three training configurations.
Table 3. LOOCV accuracies for VGG16 under three training configurations.
Subject VGG16 (FE) VGG16 (PFT) VGG16 (FFT)
HC_J01 51.04 70.83 68.23
HC_J04 34.90 90.10 86.98
HC_J07 53.57 47.02 67.86
HC_J23 65.48 42.26 41.07
HC_J24 71.88 46.88 75
HC_J25 76.19 55.95 74.40
MS_J34 84.44 68.89 81.67
MS_J35 96.53 98.61 88.19
MS_J36 58.93 89.88 88.10
MS_J38 94.44 87.04 99.07
MS_J40 43.33 58.33 86.67
MS_J41 36.11 80.56 62.96
MS_J42 18.94 16.67 3.03
Mean LOOCV Acc. 60.44 65.62 71.02
Table 4. Swin Transformer LOOCV accuracies across input resolutions.
Table 4. Swin Transformer LOOCV accuracies across input resolutions.
Subject Acc 224×224 (%) Acc 1024×512 (%) Acc 560×272 (%)
HC_J01 69.79 39.06 68.75
HC_J04 84.9 9.38 92.71
HC_J07 26.79 41.67 20.24
HC_J23 72.02 46.43 82.14
HC_J24 56.25 85.42 70.83
HC_J25 66.67 82.14 79.76
MS_J34 83.89 97.78 81.11
MS_J35 11.11 100 80.56
MS_J36 95.83 84.52 91.07
MS_J38 90.74 80.56 91.67
MS_J40 80 51.67 96.67
MS_J41 62.04 50.93 85.19
MS_J42 59.85 5.3 15.15
Mean Accuracy 66.14 59.60 73.53
Table 5. Subject-wise LOOCV accuracies (%) for Swin Transformer and VGG16 (FFT).
Table 5. Subject-wise LOOCV accuracies (%) for Swin Transformer and VGG16 (FFT).
Subject Swin Transformer VGG16 (FFT)
HC_J01 68.75 68.23
HC_J04 92.71 86.98
HC_J07 20.24 67.86
HC_J23 82.14 41.07
HC_J24 70.83 75
HC_J25 79.76 74.40
MS_J34 81.11 81.67
MS_J35 80.56 88.19
MS_J36 91.07 88.10
MS_J38 91.67 99.07
MS_J40 96.67 86.67
MS_J41 85.19 62.96
MS_J42 15.15 3.03
Mean LOOCV Acc. 73.53 71.02
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

© 2026 MDPI (Basel, Switzerland) unless otherwise stated

Accessibility

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings