Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2024 May 13;16(5):e60224.
doi: 10.7759/cureus.60224. eCollection 2024 May.

Exploring the Impact of Batch Size on Deep Learning Artificial Intelligence Models for Malaria Detection

Affiliations

Exploring the Impact of Batch Size on Deep Learning Artificial Intelligence Models for Malaria Detection

Rohit Muralidhar et al. Cureus. .

Abstract

Introduction Malaria is a major public health concern, especially in developing countries. Malaria often presents with recurrent fever, malaise, and other nonspecific symptoms mistaken for influenza. Light microscopy of peripheral blood smears is considered the gold standard diagnostic test for malaria. Delays in malaria diagnosis can increase morbidity and mortality. Microscopy can be time-consuming and limited by skilled labor, infrastructure, and interobserver variability. Artificial intelligence (AI)-based tools for diagnostic screening can automate blood smear analysis without relying on a trained technician. Convolutional neural networks (CNN), deep learning neural networks that can identify visual patterns, are being explored for use in abnormality detection in medical images. A parameter that can be optimized in CNN models is the batch size or the number of images used during model training at once in one forward and backward pass. The choice of batch size in developing CNN-based malaria screening tools can affect model accuracy, training speed, and, ultimately, clinical usability. This study explores the impact of batch size on CNN model accuracy for malaria detection from thin blood smear images. Methods We used the publicly available "NIH-NLM-ThinBloodSmearsPf" dataset from the United States National Library of Medicine, consisting of blood smear images for Plasmodium falciparum. The collection consists of 13,779 "parasitized" and 13,779 "uninfected" single-cell images. We created four datasets containing all images, each with unique randomized subsets of images for model testing. Using Python, four identical 10-layer CNN models were developed and trained with varying batch sizes for 10 epochs against all datasets, resulting in 16 sets of outputs. Model prediction accuracy, training time, and F1-score, an accuracy metric used to quantify model performance, were collected. Results All models produced F1-scores of 94%-96%, with 10 of 16 instances producing F1-scores of 95%. After averaging all four dataset outputs by batch size, we observed that, as batch size increased from 16 to 128, the average combined false positives plus false negatives increased by 15.4% (130-150), and the average model F1-score accuracy decreased by 1% (95.3%-94.3%). The average training time also decreased by 28.11% (1,556-1,119 seconds). Conclusion In each dataset, we observe an approximately 1% decrease in F1-score as the batch size was increased. Clinically, a 1% deviation at the population level can create a relatively significant impact on outcomes. Results from this study suggest that smaller batch sizes could improve accuracy in models with similar layer complexity and datasets, potentially resulting in better clinical outcomes. Reduced memory requirement for training also means that model training can be achieved with more economical hardware. Our findings suggest that smaller batch sizes could be evaluated for improvements in accuracy to help develop an AI model that could screen thin blood smears for malaria.

Keywords: artificial intelligence (ai); healthcare technology; malaria screening; medical innovation; public health.

PubMed Disclaimer

Conflict of interest statement

The authors have declared that no competing interests exist.

Figures

Figure 1
Figure 1. Random selection of images from the 13,779 parasitized and 13,779 unparasitized images, along with corresponding labels, after resizing and importing for use in models.
Figure 2
Figure 2. Left: number of parasitized (n = 1,300) and uninfected (n = 1,300) images set aside for model testing. Right: graphical depiction of the number of parasitized (n = 12,479) and uninfected (n = 12,479) images set aside for model training.
Figure 3
Figure 3. Overview of study design, depicting randomization of datasets, and the four specific batch sizes utilized in CNN models for each dataset.
Figure 4
Figure 4. Left: F1-scores across batch sizes for each randomized dataset. Right: Total false-positive and false-negative CNN model predictions across batch size for each randomized dataset.
Figure 5
Figure 5. Stacked bar chart of confusion matrix data for each randomization vs. batch size combination analyzed in this study.
Figure 6
Figure 6. False-negative results for each dataset, with varying batch size.
Figure 7
Figure 7. Total model training time for 10 epochs with varying batch size, for each dataset.

Similar articles

References

    1. Geneva: World Health Organization. World malaria report 2022. World Malaria Report 2022. [ Apr; 2024 ]. 2022. https://www.who.int/teams/global-malaria-programme/reports/world-malaria... https://www.who.int/teams/global-malaria-programme/reports/world-malaria...
    1. World malaria report 2021. [ Apr; 2024 ];Geneva: World Health Organization. https://www.who.int/teams/global-malaria-programme/reports/world-malaria... World Malaria Report 2021. 2021 1:1.
    1. Plasmodium genomics and genetics: new insights into malaria pathogenesis, drug resistance, epidemiology, and evolution. Su XZ, Lane KD, Xia L, Sá JM, Wellems TE. Clin Microbiol Rev. 2019;32 - PMC - PubMed
    1. Clinical review: severe malaria. Trampuz A, Jereb M, Muzlovic I, Prabhu RM. Crit Care. 2003;7:315. - PMC - PubMed
    1. Malaria. Garcia LS. Clin Lab Med. 2010;30:93–129. - PubMed

LinkOut - more resources