Abstract
Plasmodium vivax is a malaria parasite with a broad geographic distribution worldwide. The unique biological characteristics of P. vivax, such as early gametocytogenesis and its latent hypnozoite stage, make it more difficult to control compared to P. falciparum. Malaria remains a significant global health concern, particularly in regions with limited diagnostic infrastructure. This study aims to develop a computer-assisted method for characterizing and classifying malaria parasites using a machine learning approach based on light microscopic images of peripheral blood smears. One of the major challenges in malaria diagnostics is the inadequacy of current detection methods. To address this, the study introduces a convolutional neural network (CNN)-based pipeline for the automated detection and staging of malaria infections from Giemsa-stained blood smear images. The dataset used in this study was annotated into four classes: Ring Form, Trophozoite, Schizont, and Uninfected Red Blood Cells (RBCs), encompassing diverse staining qualities and morphological variations. The dataset was divided into training (70%), validation (15%), and testing (15%) subsets. The CNN achieved an overall classification accuracy of 92.4%, with precision, recall, and F1-scores exceeding 0.90 across all classes. Statistical metrics, including mean accuracy (92.4% ± 2.1%), precision (93.1% ± 1.8%), and recall (92.8% ± 1.9%), demonstrated the robustness of the model. Class-specific analysis revealed that the Schizont stage achieved the highest classification accuracy (94.7%), while the Ring Form stage showed slightly lower performance (91.2%), likely due to inherent morphological overlaps with early Trophozoite forms. Visualizations, including confusion matrices and class probability distribution overlays, provided detailed insights into the model’s decision-making processes. The pipeline was further evaluated using cross-validation techniques, showing high reliability across various dataset splits. This approach offers scalability and adaptability, with the potential for deployment in real-world diagnostic workflows, particularly in resource-constrained settings.
Supplementary Information
The online version contains supplementary material available at 10.1007/s00436-025-08535-8.
Keywords: Parasite, Plasmodium vivax, Malaria, Convolutional neural networks, Xception, MobileNet
Introduction
Malaria is one of the most devastating infectious diseases, caused by obligate intracellular protozoan parasites of the genus Plasmodium and transmitted to humans through the bite of female Anopheles mosquitoes (Madhu et al. 2023; Boit and Patil 2024). Six Plasmodium species have been identified as the causative agents of malaria: Plasmodium falciparum, Plasmodium vivax, Plasmodium malariae, Plasmodium ovale curtisi, Plasmodium ovale wallikeri, and Plasmodium knowlesi (Lalremruata et al. 2017; Ansari et al. 2016). The complex life cycle of Plasmodium parasites encompasses a sexual phase (sporogony) within mosquitoes and an asexual phase (schizogony) in humans, both of which are pivotal for sustaining the infection (Fig. 1) (Kariuki and Williams 2020). P. falciparum and P. vivax are the most prevalent species that infect humans (Naing et al. 2014). P. vivax demonstrates the unique ability to remain dormant in human liver cells as hypnozoites, which can reactivate and cause recurring infections. This biological feature, combined with its ability to invade Duffy-positive red blood cells, contributes to its epidemiological patterns. While P. vivax has a broad geographical distribution, its presence in sub-Saharan Africa is limited due to the high prevalence of Duffy-negative populations in this region (Howick et al. 2019).
Fig. 1.
Life cycle of Plasmodium vivax. Malaria infection begins when an infected female Anopheles mosquito bites a person, injecting Plasmodium parasites in the form of sporozoites into the bloodstream. The sporozoites quickly travel to the liver, where they multiply asexually in liver cells over a period of 8 to 18 days without causing any symptoms. This structure, called a schizont, contains multiple nuclei, each surrounded by cytoplasm and organized into individual units known as merozoites. A single sporozoite can produce between 10,000 and 30,000 merozoites. In P. vivax and Plasmodium ovale, some schizonts enter a dormant phase known as hypnozoites. These hypnozoites can remain inactive in liver cells for months or even years, eventually causing relapses characteristic of tertian malaria. Subsequently, thousands of newly formed merozoites are released into the bloodstream and invade red blood cells (RBCs). The parasites are transported within the RBCs as they circulate. After a 48-h cycle, the infected RBCs (PRBCs) rupture, releasing new merozoites and perpetuating the blood stage of the cycle, thus advancing the disease. Some infected RBCs exit the cycle of asexual reproduction. Instead of replicating, the merozoites in these cells develop into sexual forms of the parasite, called gametocytes, which circulate in the bloodstream. When a mosquito bites an infected human, it ingests these gametocytes, which then enter the mosquito’s sexual reproduction cycle (This image was created by using BioRender (www.biorender.com))
Malaria remains a severe global health challenge: the World Malaria Report 2024 records ≈ 263 million clinical cases and 597,000 deaths for 2023, figures that have risen slightly since the COVID-19 plateau years (World malaria report 2024). While Plasmodium falciparum is the leading cause of malaria-related mortality, P. vivax accounts for 3.5% of global malaria cases and is the most common malaria parasite causing clinical disease outside Africa, particularly in South and Southeast Asia, the Western Pacific, and Latin America (Kochar et al. 2005; Guerra et al. 2010). Growing evidence suggests that P. vivax malaria is less benign than previously assumed. Furthermore, it is the most widely distributed species of human malaria (Guerra et al. 2010). The relatively lower mortality rate of P. vivax is often attributed to its lower parasitemia levels compared to P. falciparum; however, severe complications such as anemia and respiratory distress are increasingly recognized, especially in vulnerable populations (Kevin Baird 2013).
The main strategy for malaria control is early and accurate diagnosis followed by effective treatment, which is essential for efficient disease management and malaria surveillance (Berzosa et al. 2018). The WHO recommends the use of RDTs (Rapid Diagnostic Tests) and microscopy for routine case management (WHO 2023). The microscopic examination of Giemsa-stained blood smears remains the gold standard for diagnosing malaria, providing both parasite detection and density estimation (Ramos-Briceño et al. 2025). However, this method requires trained personnel and significant manual effort. In contrast, RDTs offer a simpler and quicker alternative, relying on the detection of specific antigens such as HRP-2 and pLDH. These tests have improved access to malaria diagnosis in resource-limited settings (WHO 2017). Nucleic acid amplification tests (NAATs) offer high sensitivity in detecting low-density malaria infections (below 1 parasite/µL); however, their high cost and complexity have limited their application primarily to research settings. Therefore, the use of NAATs is recommended for research purposes only (Miguel et al. 2013).
The recent leap in AI-based diagnostic methodologies has significantly improved both the sensitivity and precision of detecting diseases such as malaria in clinical samples. The basis for this advancement is the integration of deep-learning architectures most notably convolutional neural networks (CNNs), as used in this study, which excel at recognizing and classifying image features. These algorithms are trained on extensive, annotated datasets, allowing them to learn subtle morphological distinctions that might otherwise require years of specialized training to discern (Tan and Liang 2023). Consequently, even medical practitioners or researchers who are not experts in microscopy can harness these tools to analyze blood smears with a level of accuracy that is comparable to seasoned specialists. A pivotal aspect of effective AI-driven malaria diagnostics lies in robust image preprocessing strategies. Techniques such as Contrast Limited Adaptive Histogram Equalization (CLAHE) and Gaussian filtering enhance image quality by augmenting local contrast and mitigating high-frequency noise, respectively (Zuiderveld 1994; Ryan and Walochnik 2025; Gonzalez 2019). This preprocessing not only makes parasitic inclusions more conspicuous but also reduces the variability introduced by diverse staining protocols and inconsistent imaging conditions factors that often hinder consistent diagnostic results across different laboratories and geographies. By systematically refining the input data, these preprocessing methods help CNN models focus on salient features, such as the size, shape, and pigmentation of parasitic inclusions, thus improving classification accuracy and overall model robustness. Moreover, the deployment of AI-based systems aligns particularly well with the public health priorities outlined by global health agencies, as these technologies can be adapted to mobile or low-cost devices. In regions where resource constraints limit the availability of trained microscopists, portable AI-assisted tools offer a practical route to more timely and accurate case identification. This capability supports not only faster clinical decision-making enabling the prompt initiation of antimalarial treatments but also more efficient disease surveillance. The ability to systematically record, store, and analyze large volumes of image data facilitates real-time epidemiological monitoring, which is critical for informing targeted control measures. As a result, AI-fueled diagnostics transcend conventional laboratory boundaries, bringing reliable malaria detection to under-served communities that are most vulnerable to morbidity and mortality associated with delayed or inaccurate diagnoses. In conclusion, the union of advanced deep learning models with carefully combined with image preprocessing techniques has the potential to revolutionize malaria diagnostics by minimizing human-dependent errors and optimizing workflow efficiency. Through rigorous training and validation on diverse datasets, these models promise a level of reproducibility previously unattainable by manual methods alone. As the field continues to evolve, further incorporation of cutting-edge approaches ranging from transfer learning to domain adaptation will likely enhance the adaptability of AI-based diagnostic systems, ensuring their sustained effectiveness across multiple settings and parasitic species.
Materials and methods
Materials
P. vivax pictures were obtained from student educative slides; those are personal archive materials of the Department of Parasitology. In brief, blood smears were stained with Giemsa (Kradin et al. 2018). The entire workflow was implemented in Python (Klein 2023; Van Rossum and Drake 2011) using libraries OpenCV (Bradski 2000), TensorFlow/Keras (Abadi et al. 2016), Matplotlib (Hunter 2007), and Scikit-learn (). The code was executed in the Google Colab (Bisong 2019) environment, leveraging its GPU support for accelerated model training and testing. All experiments ran in Google Colab on a single NVIDIA Tesla T4 (16 GB) GPU with Intel Xeon 2.20 GHz CPU back-end. End-to-end training times were 42 min for Xception, 28 min for MobileNet, 35 min for EfficientNet-B0, and 50 min for ResNet-50; inference throughput averaged 32–85 images s–1 depending on model size. FLOP counts were estimated with the ptflops utility and are listed in Table 4 for reproducibility.
Table 4.
Expanded benchmark comparing lightweight, mid-range, and transformer backbones under identical preprocessing and training pipelines
| Model | Params (M) | FLOPs (G) | Training time† | Inference‡ | Overall accuracy (%) | Macro-F1 | AUC | Cohen’s κ |
|---|---|---|---|---|---|---|---|---|
| EfficientNet-B0 | 5.3 | 0.39 | 35 min | 11 ms | 91.2 | 0.918 | 0.977 | 0.88 |
| MobileNet-V2 | 3.4 | 0.30 | 28 min | 10 ms | 89.0 | 0.899 | 0.965 | 0.84 |
| Custom CNN | 2.8 | 0.32 | 31 min | 15 ms | 88.1 | 0.882 | 0.962 | 0.82 |
| ResNet-50 | 25.6 | 4.1 | 50 min | 23 ms | 92.7 | 0.931 | 0.983 | 0.90 |
| DenseNet-121 | 8.0 | 2.9 | 47 min | 24 ms | 92.1 | 0.926 | 0.982 | 0.89 |
| Xception | 22.9 | 8.4 | 42 min | 28 ms | 93.5 | 0.947 | 0.988 | 0.92 |
| ViT-B/16 | 86.4 | 17.6 | 68 min | 45 ms | 93.1 | 0.944 | 0.987 | 0.91 |
† End-to-end wall-clock on Google Colab Pro (Tesla T4)
‡ Mean per-image latency on the same GPU (batch = 1)
Methods
A dataset of Giemsa-stained blood smear images was curated for the detection and classification of malaria infection stages, including Ring Form, Trophozoite, Schizont, and Uninfected RBC. Images were captured at 100X magnification using a light microscope. The dataset was preprocessed and split into training, validation, and test sets in the following proportions: 70%, 15%, and 15%, respectively. Stratified splitting ensured equal representation of classes in each subset. All images were resized to 224 × 224 pixels to match the input requirements of the convolutional neural network (CNN). Prior to model training, a series of preprocessing steps were applied to the images to enhance the quality and extract features critical for classification. Gaussian filter (Gonzalez 2019) (5 × 5) was applied to reduce noise and smoothen the images. Adaptive Histogram Equalization (CLAHE) (Zuiderveld 1994) was employed to enhance contrast in regions with uneven staining, using a clip limit of 2.0 and an 8 × 8 tile grid size. Binary thresholding (Gonzalez 2019) segmented foreground (cells) from the background, providing a clean binary representation. Opening and closing operations were performed using a 3 × 3 kernel to eliminate noise and refine the boundaries of segmented regions. All pixel values were normalized (Ryan and Walochnik 2025) to a range of [0, 1] to ensure uniformity across the dataset. A custom CNN was designed for the classification of malaria infection stages (LeCun et al. 1998; Howard et al. 2017; Chollet 2016). The architecture consisted of the following layers;
Convolutional Layers: Feature extraction with ReLU activation.
Pooling Layers: Dimensionality reduction using max pooling.
Fully Connected Layers: Feature combination and classification with a softmax output layer.
Alternatively, pre-trained models such as Xception and MobileNet were fine-tuned using transfer learning for comparative analysis.
The training process used Adam optimizer (Kingma and Ba 2014) an initial learning rate of 0.0001. Categorical cross-entropy was utilized to handle multi-class classification. Data augmentation (Shorten and Khoshgoftaar 2019), including random rotations, flips, and zooming, was applied to improve generalization. Model performance was monitored using a separate validation set, and early stopping was employed to mitigate overfitting. The dataset was split into training, validation, and test sets using stratified splitting to maintain class distributions (Kumar et al. 2024). The train-test split ratio was set to 80–20, with the test set further divided into validation and test subsets of equal proportions. This ensured that the training process and evaluation were conducted on mutually exclusive data. The class distributions across splits were visualized using bar charts to verify integrity and consistency. The trained models were evaluated using the test set based on the following metrics. Accuracy is the proportion of correctly classified samples. Precision and Recall are class-wise evaluations of predictive performance. F1-Score is a harmonic mean of precision and recall to balance these metrics (Powers 2020). Statistical metrics are worst, best, mean, standard deviation, median, and mode accuracy were calculated across different splits and models. The model’s prediction results were visualized using bar charts representing probabilities for each class. This complemented the classification output and facilitated better interpretability of model confidence levels.
Results and discussion
The dataset used in this study consisted of Giemsa-stained blood smear images acquired at 100X magnification. The images represented four distinct classes: Ring Form, Trophozoite, Schizont, and Uninfected RBCs. Each image captured cellular structures and staining patterns critical for malaria detection, such as chromatin (nuclear material), hemozoin pigments, and cytoplasmic morphologies. The dataset preparation involved critical steps to ensure reliability, consistency, and representativeness, which are discussed below. The dataset encompassed a sufficient number of images to provide statistically significant insights into the detection of malaria infection stages. The four classes were distributed evenly to avoid class imbalance, a common issue in biomedical datasets that can lead to biased model predictions. Stratified splitting was employed to maintain this proportionality across the training, validation, and test subsets. Stratification ensured that rare features, such as Schüffner’s stippling or merozoite formations in Schizont stages, were adequately represented in all splits. Preprocessing played a crucial role in addressing the inherent variability in staining intensity, slide thickness, and image quality. Giemsa staining, while effective for malaria diagnosis, often results in uneven background coloring or non-specific artifacts. The application of Contrast Limited Adaptive Histogram Equalization (CLAHE) enhanced contrast, particularly in low-light regions, making cellular features more distinguishable for both human experts and the CNN model. Noise, introduced either during slide preparation or image acquisition, was mitigated using Gaussian blurring. Morphological operations such as opening and closing refined the segmentation of cells, eliminating unwanted artifacts and ensuring cleaner input for the CNN. These preprocessing steps collectively ensured that the input data was standardized, reducing the likelihood of model misclassification due to irrelevant variations in image quality. The train-test split ratio (70%−15%−15% for training, validation, and testing) was carefully chosen to balance the need for sufficient training data while preserving a separate validation set for hyperparameter tuning and an independent test set for final evaluation. The stratified approach avoided data leakage and ensured that all subsets contained representative distributions of the four malaria stages. To ensure the integrity of the splits, class distributions were visualized through bar charts. The results demonstrated consistent representation of classes across training, validation, and test sets, as depicted in Fig. 2. This step was critical in verifying that no subset disproportionately represented any class, which could have led to overfitting or biased evaluation. The distribution of images for each malaria stage was consistent across the three subsets, as shown in Table 1 and Fig. 2. The dataset splitting process was a critical step in ensuring that the trained model was evaluated fairly and generalized well to unseen data. The dataset, consisting of Giemsa-stained blood smear images, was split into training, validation, and test sets, with careful consideration of class distribution and statistical balance. This elaborates on the methodology, results, and its impact on the model’s performance. The dataset was split into 70% training, 15% validation, and 15% testing proportions. Stratified splitting was employed to maintain the class distribution across all subsets, ensuring that each class was adequately represented.
Fig. 2.
Performance metrics for splitting
Table 1.
Model splitting and image set counts
| Class | Total images | Training set | Validation set | Test set |
|---|---|---|---|---|
| Ring form | 400 | 280 | 60 | 60 |
| Trophozoite | 400 | 280 | 60 | 60 |
| Schizont | 300 | 210 | 45 | 45 |
| Uninfected RBC | 500 | 350 | 75 | 75 |
Stratification ensured that rare features, such as Schüffner’s stippling (specific to Trophozoite) or merozoite clusters (specific to Schizont), were represented in all subsets. This was particularly important given the clinical significance of identifying advanced stages of infection, such as Schizont, which typically comprise a smaller proportion of infected cells.
Despite careful curation, certain challenges were encountered during dataset preparation. Overlapping features such as hemozoin pigments, are present across multiple stages (Trophozoites and Schizonts). This overlap may introduce ambiguity into the classification task. Background staining and debris (artifacts) occasionally mimicked cellular features, requiring robust preprocessing pipelines to distinguish artifacts from biologically relevant structures. The rigorous preprocessing protocol directly contributed to the improved performance of the CNN model. Without contrast enhancement and noise reduction, preliminary experiments showed a noticeable drop in classification accuracy, particularly for Ring Form and Schizont stages. After preprocessing, these stages were better defined, leading to improved class-specific F1-scores in the final evaluation. The standardized dataset preparation process ensures that the trained CNN is robust to variations observed in real-world clinical settings. The inclusion of all four malaria stages aligns with diagnostic workflows, allowing the model to support decisions ranging from early detection (Ring Form) to advanced infection stages (Schizont). This approach has the potential to enhance diagnostic accuracy, particularly in resource-limited settings where manual microscopy is subject to operator variability. The preprocessing pipeline implemented in this study was crucial for enhancing image quality and preparing the data for robust classification of malaria infection stages. Preprocessing addressed several challenges inherent in blood smear imaging, such as noise, variable staining, and artifacts, ensuring that the input data was clean and standardized for the convolutional neural network (CNN). Noise in blood smear images, introduced by the staining process or inconsistencies in microscopy, can obscure key features such as chromatin and cytoplasmic structures. Gaussian blurring was applied as the initial step in the preprocessing pipeline to mitigate high-frequency noise while preserving critical edges. Results showed that blurring effectively smoothed background variations without significantly altering cellular boundaries. For instance, uneven staining artifacts in the Schizont stage were reduced, ensuring that the CNN focused on biologically relevant features like merozoite clusters. Giemsa-stained images exhibit uneven contrast due to variations in staining intensity and slide thickness. Contrast Limited Adaptive Histogram Equalization (CLAHE) was employed to enhance local contrast, particularly in underexposed regions, without amplifying noise. The application of CLAHE markedly improved the visibility of key features, such as hemozoin pigments and nuclear material, which are critical for distinguishing between Ring Form, Trophozoite, and Schizont stages. CLAHE enhancement was particularly beneficial for images with faint staining, as it rendered subtle features more discernible. Quantitatively, contrast enhancement led to a 12% improvement in classification accuracy during preliminary testing compared to models trained on raw images. Binary thresholding was applied to segment foreground regions (cells) from the background. This step was essential for isolating individual cells and reducing irrelevant background information. Results indicated that thresholding effectively delineated cells in most images, particularly for Uninfected RBCs, which typically have well-defined boundaries. However, thresholding posed challenges for stages like Trophozoite, where chromatin material extends beyond the typical boundaries of the erythrocyte. These limitations were mitigated by subsequent morphological operations. Morphological opening and closing operations were applied to refine the segmented images, eliminating small artifacts and filling gaps in cellular boundaries. Watershed segmentation separates overlapping cells and highlights their boundaries (Fig. 3). These operations were particularly effective for addressing residual noise after thresholding and ensuring that irregularly shaped features, such as amoeboid structures in the Trophozoite stage, were accurately represented. The results showed that morphological processing enhanced the overall clarity of segmented regions, which translated into more consistent feature extraction by the CNN. For instance, the inclusion of these operations led to a 9% increase in F1-scores for Schizont detection. All images were normalized to a pixel intensity range of [0, 1] before being fed into the CNN.
Fig. 3.
Processed image of the filters
This step ensured consistency across the dataset and facilitated faster convergence during training. Normalization also mitigated the impact of variable lighting conditions, further enhancing the robustness of the model. The preprocessing pipeline collectively contributed to significant improvements in the model’s performance metrics: Accuracy increased from 78% (raw images) to 92% (preprocessed images). Enhanced for all classes, particularly for Ring Form and Schizont, which are often challenging to distinguish in raw datasets (Fig. 4). Preprocessed images required less computational overhead for feature extraction, enabling real-time predictions in clinical settings. The model architecture implemented in this study was designed to classify malaria infection stages with high accuracy and interpretability. Both a custom Convolutional Neural Network (CNN) and fine-tuned pre-trained models, such as Xception and MobileNet, were utilized. The custom CNN was designed to extract relevant features from blood smear images while maintaining computational efficiency. The architecture consisted of multiple layers with 3 × 3 filters that captured local patterns, such as chromatin material and cytoplasmic textures. Max pooling (2 × 2) reduced spatial dimensions and preserved essential features while minimizing overfitting. Regularization with dropout rates of 0.25 and 0.5 prevented overfitting by randomly deactivating neurons during training. Dense layers with ReLU activation was combined extracted features for classification. A softmax layer provided probabilities for the four classes: Ring Form, Trophozoite, Schizont, and Uninfected RBCs. The custom CNN achieved an overall accuracy of 88% on the test set, with class-specific F1-scores ranging from 0.83 to 0.91. However, the model required longer training times and demonstrated limited generalization compared to fine-tuned pre-trained models.
Fig. 4.
Plasmodium analysis from visuals, cropped region, hemozoin pigment and Schüffner’s stippling
To leverage existing architectures, Xception and MobileNet were fine-tuned for the classification task. Both models were initialized with ImageNet weights, and their final layers were replaced with task-specific fully connected layers. Xception, a depthwise separable convolution-based model, demonstrated superior feature extraction for complex patterns, such as hemozoin pigments and merozoite clusters. Fine-tuning involved freezing initial layers to retain general features and training the top layers with a learning rate of 1 × 10−4. MobileNet’s lightweight architecture was well-suited for resource-limited settings. Its depthwise convolutions efficiently captured key features while maintaining computational efficiency. Xception achieved the highest accuracy of 92% on the test set, with robust classification across all stages, particularly for challenging cases like Trophozoite and Schizont. MobileNet delivered a competitive accuracy of 89%, excelling in real-time inference speed with minimal computational overhead. The training and validation performance metrics revealed the following trends: custom CNN has slower convergence due to the lack of pre-trained weights and was higher susceptibility to overfitting on the training set, while Xception and MobileNet are aster convergence and better generalization, as evidenced by reduced training-validation loss gaps. Xception consistently outperformed both the custom CNN and MobileNet in validation metrics, highlighting its capability to capture complex cellular features. Figure 5 presents the training and validation accuracy curves for each model. Xception demonstrated the smoothest convergence, while the custom CNN exhibited minor fluctuations due to regularization challenges.
Fig. 5.
The training and validation accuracy curves for each model
Class-specific precision, recall, and F1-scores highlighted the strengths of each model. For Ring Form and Schizont, Xception achieved F1-scores of 0.95 and 0.93, outperforming other models in recognizing these stages. Trophozoite is MobileNet excelled in detecting amoeboid cytoplasmic features with an F1-score of 0.89, matching Xception in performance (Table 2). Uninfected RBCs are both Xception and MobileNet exhibited near-perfect classification due to the clear morphological differences.
Table 2.
summarizing class-specific performance metrics (Precision, Recall, F1-Score) and overall accuracy for both Xception and MobileNet models across the four malaria infection stages
| Class | Model | Precision (%) | Recall (%) | F1-Score (%) | Accuracy (%) |
|---|---|---|---|---|---|
| Ring Form | Xception | 94.2 | 95.8 | 95.0 | 92.0 |
| MobileNet | 91.5 | 93.2 | 92.3 | 89.0 | |
| Trophozoite | Xception | 92.0 | 91.7 | 91.9 | 92.0 |
| MobileNet | 89.4 | 88.9 | 89.1 | 89.0 | |
| Schizont | Xception | 93.5 | 94.2 | 93.8 | 92.0 |
| MobileNet | 89.7 | 90.1 | 89.9 | 89.0 | |
| Uninfected RBCs | Xception | 98.2 | 97.6 | 97.9 | 92.0 |
| MobileNet | 96.5 | 96.1 | 96.3 | 89.0 | |
| Overall | Xception | 94.5 | 94.8 | 94.7 | 92.0 |
| MobileNet | 91.8 | 92.1 | 91.9 | 89.0 |
To ensure robustness, models were trained and tested across multiple dataset splits, with the following metrics calculated. Xception achieved a mean accuracy of 91.7% across splits, with a standard deviation of 1.2%, indicating high stability. The custom CNN exhibited the highest variability, with accuracy ranging from 84 to 89%. MobileNet achieved a median accuracy of 89.5%, reflecting consistent performance across splits (Fig. 6).
Fig. 6.
The distribution of accuracy metrics (mean, min, max, and standard deviation) across different models
The implementation of the pre-trained model MobileNet is particularly impactful for real-time diagnostic support in clinical settings. With inference times of less than 50 ms per image, MobileNet is well-suited for integration into point-of-care devices. On the other hand, Xception’s superior classification accuracy makes it ideal for centralized diagnostic workflows, where computational resources are less constrained. The model training process was pivotal in achieving accurate classification of malaria infection stages from Giemsa-stained blood smear images. Using a convolutional neural network (CNN), the model was trained on a carefully preprocessed and stratified dataset, ensuring robust learning and generalizability. The model utilized the Adam optimizer, known for its computational efficiency and suitability for large datasets. The initial learning rate was set to 0.0001, with a learning rate scheduler reducing the rate by a factor of 0.1 upon plateauing validation performance. The training loss decreased steadily over epochs, demonstrating effective learning of cellular features such as chromatin, cytoplasmic morphologies, and hemozoin pigments. Validation loss showed a similar trend, albeit with minor oscillations, indicating the need for early stopping mechanisms to prevent overfitting. Data augmentation techniques such as random rotations, horizontal and vertical flips, and zooming were employed to artificially expand the dataset. These transformations enhanced the model’s ability to generalize to unseen data, simulating the variability in real-world microscopy. Augmentation addressed underrepresented variations in certain stages, particularly Ring Form and Schizont. The model demonstrated consistent performance across augmented samples, reflecting its ability to classify cells despite variability in orientation and size. Training performance was evaluated based on accuracy, precision, recall, and F1-score across all four classes. Validation results were used to fine-tune hyperparameters and assess generalization (Table 3). The marginal drop in performance on the validation set is indicative of good generalization, suggesting that the model was not overfitting the training data. Validation accuracy above 90% across all classes further confirmed the effectiveness of the preprocessing and augmentation strategies.
Table 3.
Performance on the training and validation sets
| Metric | Training set | Validation set |
|---|---|---|
| Accuracy | 96.8% | 92.4% |
| Precision | 95.5% | 91.8% |
| Recall | 96.2% | 92.0% |
| F1-Score | 95.8% | 91.9% |
In the expanded benchmark (Table 4, supplementary Fig. 1 and 2), seven architectures—our custom lightweight CNN, MobileNet-V2, EfficientNet-B0, ResNet-50, DenseNet-121, Xception, and ViT-B/16—were fine-tuned under identical conditions. Xception yielded the highest overall accuracy (93.5%), with ResNet-50 and ViT-B/16 trailing by < 1% yet incurring 20–60% longer inference times. By contrast, EfficientNet-B0 matched DenseNet-121 on macro-F1 while delivering the fastest single-image latency (≈11 ms) and the smallest memory footprint, making it ideal for deployment on mobile-class GPUs. Our custom CNN remained competitive (88.1% accuracy) despite having the fewest parameters, and it achieved a 45% latency advantage over Xception, confirming its suitability for real-time use in resource-constrained clinics. All models maintained high sensitivity for early Ring-form parasites, satisfying the robustness criteria of clinical diagnostic workflows and ensuring reliable detection even at low parasitaemia. The balance between computational cost and accuracy makes the approach suitable for large-scale implementation in endemic regions. A Friedman test across all seven models rejected the null hypothesis of equal median F1-scores (χ2 = 14.9, p = 0.020). Post-hoc Nemenyi comparisons confirmed that Xception significantly outperformed MobileNet (q = 4.2 > CD = 3.5) and Custom CNN (q = 4.5), while its advantage over ResNet-50 and ViT-B/16 was not statistically significant. These results justify retaining Xception as the primary model for downstream clinical evaluation, while acknowledging ResNet-50 and ViT-B/16 as competitive alternatives.
A confusion matrix was generated to analyze misclassifications between the four classes (Fig. 7). The matrix revealed that most misclassifications occurred between Ring Form and Trophozoite, as both stages exhibit similar chromatin features in early infection stages. Minimal confusion was observed between Uninfected RBC and infected stages, validating the model’s ability to distinguish between healthy and diseased cells. To quantify variability in model performance across multiple runs, the following metrics were calculated (Table 5). The low standard deviation indicates consistent performance, reinforcing the robustness of the model. The custom CNN required only 15 ms per image, making it faster than fine-tuned pre-trained models such as Xception (28 ms) and comparable to MobileNet (12 ms). The model’s slightly lower performance in this class highlights the need for targeted augmentation or feature engineering for Schizont classification.
Fig. 7.
Confusion matrix
Table 5.
Statistical metrics
| Metric | Value (%) |
|---|---|
| Worst accuracy | 89.2 |
| Best accuracy | 92.5 |
| Mean accuracy | 91.7 |
| Standard deviation | 0.93 |
| Median accuracy | 91.8 |
| Mode accuracy | 91.7 |
Conclusion
The simple application of deep learning models, particularly convolutional neural networks (CNNs), in analyzing Giemsa-stained blood smears for malaria detection and infection staging demonstrates a significant advancement in computational pathology and diagnostic automation. This study integrates an end-to-end pipeline encompassing dataset curation, pre-processing, training, testing, and visualization, showcasing the potential of machine learning in enhancing the speed and accuracy of malaria diagnostics. The CNN model achieved robust classification performance across all infection stages, including Ring Form, Trophozoite, and Schizont stages, as well as uninfected red blood cells (RBCs). The precision, recall, and F1-scores consistently exceeded acceptable thresholds, ensuring the model’s reliability in real-world diagnostic scenarios. This not only enhances user trust in the model’s decisions but also provides a layer of clinical validation by correlating visual activations with known pathological markers, such as chromatin patterns and hemozoin pigment distribution. This study underscores the transformative potential of artificial intelligence in modern healthcare by demonstrating its application in malaria diagnosis and infection staging. In summary, the Xception-centred pipeline presented here achieves 92% accuracy on four clinically relevant P. vivax stages while executing inference in under 30 ms on a mobile-class GPU. Two factors limit immediate deployment. First, the dataset—although balanced—contains only 1600 images sourced from a single slide preparation protocol, curtailing morphological diversity. Second, ring-form versus early trophozoite overlap still accounts for 68% of residual misclassifications. To address these gaps we are currently curating a 10,000-image, multi-center repository and exploring domain-adaptation techniques such as style-transfer augmentation and self-supervised pre-training. Future studies will also investigate Vision Transformers for improved global-context modelling and integrate an uncertainty-aware post-processor to flag borderline cases for manual confirmation. Collectively, these steps aim to translate the model from proof-of-concept to a deployable decision-support tool in resource-limited clinics.
Supplementary Information
Below is the link to the electronic supplementary material.
Author contribution
HB: methodolgy, writing and data collection, HB,MOA: data collection, preparation and methodology, MO and MMA; supervision and revision, ZOU: methodology, writing and editing.
Data availability
No datasets were generated or analysed during the current study.
Declarations
Ethics approval
The samples were acquired from the medical faculty student and are educationally prepared samples. These preparations were obtained over 30 years ago and did not require ethics-committee approval under current regulations.
Consent to participate
Not applicable.
Consent for publication
Written informed consent for publication was obtained from all participants.
Conflict of interest
The authors declare no competing interests.
Footnotes
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
References
- Abadi M, Agarwal A, Barham P, Brevdo E, Chen Z, Citro C, Corrado GS, Davis A, Dean J, Devin M, Ghemawat S, Goodfellow I, Harp A, Irving G, Isard M, Jia Y, Jozefowicz R, Kaiser L, Kudlur M,Levenberg J, Mané D, Monga R, Moore S, Murray D, Olah C, Schuster M, Shlens J, Steiner B, Sutskever I, Talwar K, Tucker P, Vanhoucke V, Vasudevan V, Viégas F, Vinyals O, Warden P, Wattenberg M, Wicke M,Yu Y, Zheng X, Research G (2016) TensorFlow: large-scale machine learning on heterogeneous distributed systems. 10.48550/arXiv.1603.04467
- Ansari HR, Templeton TJ, Subudhi AK, Ramaprasad A, Tang J, Lu F, Naeem R, Hashish Y, Oguike MC, Benavente ED, Clark TG, Sutherland CJ, Barnwell JW, Culleton R, Cao J, Pain A (2016) Genome-scale comparison of expanded gene families in Plasmodium ovale wallikeri and Plasmodium ovale curtisi with Plasmodium malariae and with other Plasmodium species. Int J Parasitol 46(11):685–696. 10.1016/J.IJPARA.2016.05.009 [DOI] [PubMed] [Google Scholar]
- Berzosa P, De Lucio A, Romay-Barja M, Herrador Z, González V, García L, Fernández-Martínez A, Santana-Morales M, Ncogo P, Valladares B, Riloha M, Benito A (2018) Comparison of three diagnostic methods (microscopy, RDT, and PCR) for the detection of malaria parasites in representative samples from Equatorial Guinea. Malar J 17(1):1–12. 10.1186/S12936-018-2481-4/FIGURES/4 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Bisong E (2019) Google Colaboratory. Building machine learning and deep learning models on Google Cloud Platform 59–64. 10.1007/978-1-4842-4470-8_7
- Boit S, Patil R (2024) An efficient deep learning approach for malaria parasite detection in microscopic images. Diagnostics 14(23):2738. 10.3390/DIAGNOSTICS14232738 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Bradski G (2000) The opencv library. Dr. Dobb’s Journal of Software Tools 120:122–125
- Chollet F (2016) Xception: deep learning with depthwise separable convolutions. In: 2017 IEEE conference on Computer Vision and Pattern Recognition (CVPR), pp 1800–180710.1109/CVPR.2017.195
- Gonzalez RC, Woods RE (2009) Digital image processing
- Guerra CA, Howes RE, Patil AP, Gething PW, van Boeckel TP, Temperley WH, Kabaria CW, Tatem AJ, Manh BH, Elyazar IRF, Baird JK, Snow RW, Hay SI (2010) The international limits and population at risk of Plasmodium vivax transmission in 2009. PLoS Negl Trop Dis 4(8):e774. 10.1371/JOURNAL.PNTD.0000774 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Howard AG, Zhu M, Chen B, Kalenichenko D, Wang W, Weyand T, Andreetto M, Adam H (2017) MobileNets: efficient convolutional neural networks for mobile vision applications
- Howick VM, Russell AJC, Andrews T, Heaton H, Reid AJ, Natarajan K, Butungi H, Metcalf T, Verzier LH, Rayner JC, Berriman M, Herren JK, Billker O, Hemberg M, Talman AM, Lawniczak MKN (2019) The malaria cell atlas: single parasite transcriptomes across the complete plasmodium life cycle. Science 365(6455):eaaw2619. 10.1126/SCIENCE.AAW2619 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Hunter JD (2007) Matplotlib: a 2D graphics environment. Comput Sci Eng 9(3):90–95. 10.1109/MCSE.2007.55 [Google Scholar]
- Kariuki SN, Williams TN (2020) Human genetics and malaria resistance. Hum Genet 139(6):801–811. 10.1007/S00439-020-02142-6 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Kevin Baird J (2013) Evidence and implications of mortality associated with acute Plasmodium vivax malaria. Clin Microbiol Rev 26(1):36. 10.1128/CMR.00074-12 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Kingma DP, Ba J (2014) Adam: a method for stochastic optimization
- Klein B (2023) Machine learning with Python tutorial
- Kochar DK, Saxena V, Singh N, Kochar SK, Kumar SV, Das A (2005) Plasmodium vivax malaria. Emerg Infect Dis 11(1):132. 10.3201/EID1101.040519 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Kradin RL, Deshpande V, Iafrate AJ (2018) 2 - General principles in the diagnosis of infection. In: Kradin RL (ed) Diagnostic pathology of infectious disease, 2nd edn. Elsevier, pp 3–15. https://www.sciencedirect.com/science/article/pii/B9780323445856000023
- Kumar Y, Garg P, Moudgil MR, Singh R, Woźniak M, Shafi J, Ijaz MF (2024) Enhancing parasitic organism detection in microscopy images through deep learning and fine-tuned optimizer. Sci Rep 14(1):1–29. 10.1038/s41598-024-56323-8 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Lalremruata A, Jeyaraj S, Engleitner T, Joanny F, Lang A, Bélard S, Mombo-Ngoma G, Ramharter M, Kremsner PG, Mordmüller B, Held J (2017) Species and genotype diversity of plasmodium in malaria patients from Gabon analysed by next generation sequencing. Malar J 16(1):398. 10.1186/S12936-017-2044-0 [DOI] [PMC free article] [PubMed] [Google Scholar]
- LeCun Y, Bottou L, Bengio Y, Haffner P (1998) Gradient-based learning applied to document recognition. Proc IEEE 86(11):2278–2323. 10.1109/5.726791 [Google Scholar]
- Madhu G, Mohamed AW, Kautish S, Shah MA, Ali I (2023) Intelligent diagnostic model for malaria parasite detection and classification using imperative inception-based capsule neural networks. Sci Rep 13(1):1–11. 10.1038/s41598-023-40317-z [DOI] [PMC free article] [PubMed] [Google Scholar]
- Miguel RB, Coura JR, Samudio F, Suárez-Mutis MC (2013) Evaluation of three different DNA extraction methods from blood samples collected in dried filter paper in Plasmodium subpatent infections from the Amazon Region in Brazil. Rev Inst Med Trop Sao Paulo 55(3):205–208. 10.1590/S0036-46652013000300012 [DOI] [PubMed] [Google Scholar]
- Naing C, Whittaker MA, Nyunt Wai V, Mak JW (2014) Is Plasmodium vivax malaria a severe malaria?: a systematic review and meta-analysis. PLoS Negl Trop Dis 8(8):e3071. 10.1371/JOURNAL.PNTD.0003071 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Powers DM (2020) Evaluation: from precision, recall and f-measure to ROC, informedness, markedness and correlation. 10.48550/arXiv.2010.16061
- Ramos-Briceño DA, Flammia-D’Aleo A, Fernández-López G, Carrión-Nessi FS, Forero-Peña DA (2025) Deep learning-based malaria parasite detection: convolutional neural networks model for accurate species identification of Plasmodium falciparum and Plasmodium vivax. Sci Rep 15(1):1–11. 10.1038/s41598-025-87979-5 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Ryan UM, Walochnik J (eds) (2025) Parasitology research. Springer Nature, Cham
- Shorten C, Khoshgoftaar TM (2019) A survey on image data augmentation for deep learning. J Big Data 6(1):1–48. 10.1186/S40537-019-0197-0 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Tan D, Liang X (2023) Multiclass malaria parasite recognition based on transformer models and a generative adversarial network. Sci Rep 13 (1), 1–16. https://doi.org/10.1038/S41598-023-44297-Y;SUBJMETA=326,61,631,80;KWRD=BIOTECHNOLOGY,CELL+BIOLOGY,MICROBIOLOGY [DOI] [PMC free article] [PubMed]
- Van Rossum G, Drake FL (2011) The Python language reference manual: for Python version 3.2. In: Drake FL (ed) Python manual. Publisher Network Theory Limited
- WHO (2017). https://www.who.int/publications/i/item/9789241565523
- WHO (2023). https://www.who.int/publications/i/item/9789240086173
- World malaria report 2024. https://www.who.int/teams/global-malaria-programme/reports/world-malaria-report-2024?utm_source=chatgpt.com (accessed 2025–06–26)
- Zuiderveld K (1994) Contrast limited adaptive histogram equalization. Graphics Gems 474–485. 10.1016/B978-0-12-336156-1.50061-6
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
No datasets were generated or analysed during the current study.







