A novel deep learning-based point-of-care diagnostic method for detecting Plasmodium falciparum with fluorescence digital microscopy

Background Malaria remains a major global health problem with a need for improved field-usable diagnostic tests. We have developed a portable, low-cost digital microscope scanner, capable of both brightfield and fluorescence imaging. Here, we used the instrument to digitize blood smears, and applied deep learning (DL) algorithms to detect Plasmodium falciparum parasites. Methods Thin blood smears (n = 125) were collected from patients with microscopy-confirmed P. falciparum infections in rural Tanzania, prior to and after initiation of artemisinin-based combination therapy. The samples were stained using the 4′,6-diamidino-2-phenylindole fluorogen and digitized using the prototype microscope scanner. Two DL algorithms were trained to detect malaria parasites in the samples, and results compared to the visual assessment of both the digitized samples, and the Giemsa-stained thick smears. Results Detection of P. falciparum parasites in the digitized thin blood smears was possible both by visual assessment and by DL-based analysis with a strong correlation in results (r = 0.99, p < 0.01). A moderately strong correlation was observed between the DL-based thin smear analysis and the visual thick smear-analysis (r = 0.74, p < 0.01). Low levels of parasites were detected by DL-based analysis on day three following treatment initiation, but a small number of fluorescent signals were detected also in microscopy-negative samples. Conclusion Quantification of P. falciparum parasites in DAPI-stained thin smears is feasible using DL-supported, point-of-care digital microscopy, with a high correlation to visual assessment of samples. Fluorescent signals from artefacts in samples with low infection levels represented the main challenge for the digital analysis, thus highlighting the importance of minimizing sample contaminations. The proposed method could support malaria diagnostics and monitoring of treatment response through automated quantification of parasitaemia and is likely to be applicable also for diagnostics of other Plasmodium species and other infectious diseases.


Introduction
Malaria remains a global health burden with over 200 million new yearly cases [1]. Although the disease incidence has decreased by approximately 10% during the last decade, data indicates that progress has stalled during recent years [1]. As most malaria cases occur in rural areas [1], the disease burden is caused partly by difficulties in diagnosing the disease. Currently, multiple techniques exist for malaria diagnostics [2]. Light microscopy assessment of blood smears to detect Plasmodium parasites remains the diagnostic gold standard [3] and allows detection and quantification of the various Plasmodium species while also being more sensitive than rapid diagnostic tests (RDTs) [4]. Disadvantages with microscopy-based testing include a high level of labour intensiveness, subjectivity [5,6], dependence on the microscopist's skill and experience [7], requirements in terms of sample preparation and varying sensitivity for lower-level and mixed infections [4]. In addition to microscopy, easy-to-use RDTs based on lateral flow immunochromatography to detect Plasmodium-specific antigens are being used to an increasing extent [8]. These RDTs enable rapid diagnostics at the point-ofcare (POC), but have limited accuracy for non-falciparum [2] and low-level infections, do not allow for quantification of parasites when monitoring treatment response, and remain positive after treatment initiation, which means that results should ideally be validated by other methods [4]. Detection of Plasmodium spp. nucleic acid with nucleic acid amplification tests (NAATs) has superior analytical sensitivity compared to other methods, especially for mixed infections [9], and allows quantification of parasitaemia (by real-time quantitative polymerase chain reaction; qPCR) but is more technically demanding, expensive and therefore not widely available [4], although certain NAAT-methods, such as loop-mediated isothermal amplification (LAMP) show promise as a field-usable techniques [10]. Consequently, the World Health Organization (WHO) currently recommends microscopy-based methods to confirm diagnosis in suspected cases of malaria [3]. Various staining methods have been proposed for microscopy identification of malaria parasites in blood smears, with Giemsa staining being the standard method [5]. As visual analysis of blood smears is time-consuming and subjective, fluorescent staining methods have been proposed to facilitate the sample analysis process [11]. Cell-permeable fluorescent stains can be used to visualize the intracellular Plasmodium parasites more clearly and at lower magnification [12] to reduce the need for high-power microscopy equipment. Fluorescent stainings can also be combined with brightfield staining protocols [11]. As access to microscopy diagnostics is severely limited in many areas, the potential to utilize optical components from widely-available consumer electronic products (such as smartphone cameras) to create digital microscopes has been recognized [13][14][15]. By utilizing miniaturized, low-cost optomechanical components, several devices for POC och Else Stockmanns stiftelse. We furthermore greatly acknowledge the assistance and support from the Helsinki Institute of Life Science (HiLIFE) and the FIMM Digital Microscopy and Molecular Pathology Unit supported by Helsinki University and Biocenter Finland. The funders did not play any role in the study design, data collection and analysis, decision to publish, or preparation of the manuscript.
digitization of microscopy slides have been developed. Compared to larger-sized, laboratorygrade slide scanners, these types of devices can be manufactured significantly cheaper [16] and have other potential advantages, such as a smaller physical size for increased portability, which make them potentially more suitable for POC usage. Although these components are significantly less expensive than those used in high-end alternatives, the imaging performance achievable is sufficient to e.g. visualize pathogens in common infectious diseases [17] and for analysis of histological samples [18]. Digitization of samples at the POC combined with the mobile connectivity of the instruments also mean that samples can be uploaded to a cloud server for remote access and analysis using digital methods [19]. Multiple approaches have been studied for automated, computer-assisted diagnosis of malaria using both traditional computer vision methods and more recently machine learning algorithms based on deep convolutional neural networks [20][21][22]. Several efforts have been made to digitize blood smears for malaria diagnostics with POC slide scanners, but a significant challenge with conventionally-stained samples is the need for higher magnifications than what is typically supported by these platforms [21].
In this proof-of-concept study we describe how thin blood smears acquired in field-settings in Tanzania, stained with the 4 0 ,6-diamidino-2-phenylindole (DAPI) fluorophore and scanned using a low-cost POC digital microscope scanner prototype enables visualization of P. falciparum parasites. P. falciparum is both the most prevalent malaria parasite in Africa, and the cause of the vast majority of malaria-related deaths [1]. By digitizing both brightfield and fluorescent image channels from blood smears, and combining them into hybrid images, intracellular malaria parasites can be visualized in the digital samples. Furthermore, we train and apply two separate deep-learning algorithms to automatically detect and quantify P. falciparum trophozoites in the digital samples. Results are compared to the visual analysis of the digital samples and to expert microscopy of Giemsa-stained thick smears, using samples collected on the day of initiation of artemisinin-based combination therapy (ACT) and three days after treatment initiation.

Acquisition and preparation of samples
We acquired 125 thin blood films for this study, which were collected as part of the trial by Mhamilawa et al. [23]. The samples were pseudonymized with study numbers before being accessed by the researchers. The overall study workflow and sample analysis process is illustrated as a STARD diagram in the supplementary material (S4 Fig). The samples were collected in a region with moderate levels of malaria transmission where P. falciparum is the predominant species (Bagamoyo District, Tanzania) during a time-period between July 2017 and March 2018. Samples were collected from volunteering patients who fulfilled the inclusion criteria (age between 1 and 65 years, history of fever in the last 24 hours or axillary temperature � 37.5˚C, microscopy-confirmed uncomplicated P. falciparum monoinfection and written informed consent obtained). Microscopy confirmation of malaria positivity was performed on separate Giemsa-stained thick blood smears by certified professional microscopists. The number of asexual parasites and gametocytes was determined by counting the number of visible parasites per 200 white blood cells (WBCs) using a hand tally counter. The parasite density, measured as the number of asexual parasites per microliter (μl) of blood, was estimated by dividing the number of detected asexual parasites per by the number of WBCs counted (200) and multiplying the value by the assumed WBC count μl of blood (8,000 WBC/ μl). A blood smear was considered negative after examining 100 high-power fields or counting 500 WBC with no parasites seen. Each slide was read by two independent and experienced microscopists, and upon disagreement on presence of parasites or if density differed by more than 25%, the slides were subjected to a third independent and decisive reader (blinded to the results from the previous readers). The mean parasitemia of the two most concordant readings were used as final parasite densities. In total, 125 unstained thin blood films from 100 separate patients were obtained for this study. 100 of these samples were collected before initiation of artemisinin-based combination therapy (ACT) (Day 0), and 25 samples were follow-up thin blood smears collected three days after initiation of ACT (Day 3). The Day 3 samples were also analysed by light microscopy examination, according to the procedure described above. Samples were fixed with methanol (water < 3%) by incubating for approximately 20 minutes at room temperature, and stored in slide boxes following this. For the staining of the samples, the slides were initially rinsed with deionized water, after which staining of the samples was performed using a mounting media solution containing 4',6-Diamidino-2-phenylindole (DAPI) fluorescent stain (Fluoroshield with DAPI, Sigma-Aldrich Finland Oy, Espoo, Finland). DAPI is a primary stain for DNA and RNA which penetrates cellular membranes to stain the DNA (and RNA) of the Plasmodium parasites inside intact erythrocytes. The DAPI staining solution was applied to the sample and distributed over the surface of the glass slide. Following this, the sample was let to stand at room temperature for five minutes, after which a cover slip was carefully applied to the sample to avoid air bubbles. After staining, the quality of the sample was examined visually with a fluorescence microscope to confirm that the staining quality was adequate for analysis (i.e. visible fluorescent WBCs to confirm successful staining and low amounts of debris).

Digitization of slides
For the digitization of the samples we used a prototype of a portable, digital microscope scanner, developed and patented by the University of Helsinki (Helsinki, Finland) for POC scanning of biological samples (Fig 1). The device supports brightfield and fluorescent imaging of glass slides and scanning of sample areas measuring multiple fields of view (FOVs), by capturing and stitching together multiple FOVs in a similar way as conventional whole-slide microscopy scanners. The device is constructed using inexpensive plastic optomechanical components from consumer electronic products. Total material costs for the components are comparable to the price of a mid-range smartphone (approximately 600-1200 USD), and significantly lower than the prices of conventional slide scanners with device costs typically between 50,000 to 300,000 USD [16]. Notably, similarly to other digital slide scanners, the operation of the device requires a computer (equipped with USB), which price is not included in this approximation.
Digital images are captured using a camera module typically used in smartphone camera systems (See3CAM_130, e-con Systems Inc., St Louis, USA), featuring a 13-megapixel (maximum resolution 4208 x 3120 pixels) complementary metal oxide semiconductor (CMOS) sensor with a plastic f/3.2" lens. A white light-emitting diode (LED) is used as the light source for brightfield imaging and an ultraviolet LED combined with a retractable band pass filter for fluorescent imaging (peak wavelength 365 nm). If the FOV is digitized using both the brightfield and fluorescence modes of the microscope, the resulting image can be rendered into a single merged image (Fig 2).
With the current image sensor and lens, the pixel size was 0.22 μm and the spatial resolution 0.9 μm, as measured using a standardized USAF resolution test chart and white-light LED illumination (Fig 1). One sensor FOV measures 0.22 mm 2 , which is approximately five times larger than the FOV of a typical 100x objective (0.22mm 2 compared to 0.04mm 2 ).
The device is connected to and operated from a computer by universal serial bus (USB), which also provides power for the device. An external motor unit (Fig 2) is used to move the sample holder with the glass slide to scan the sample. Coarse focus can be adjusted with a manual focus lever and fine focus with the built-in autofocus routine of the camera module. The device is controlled with a custom software written in the matrix laboratory (MATLAB, Math-Works Inc, Natick, MA) computing and programming environment, which features a live view from the camera feed, overview of scanned areas and controls for adjusting parameters of slide scanning (e.g. area to be captured, focus and exposure). Digitization of areas measuring more than one FOV utilizes the motor unit for automatic slide translation while the camera captures multiple images. The individual digitized samples in this study measured 12-20 FOVs per sample, representing a thin smear area (red blood cell [RBC] monolayer) without significant amounts of artefacts or debris when examined visually) of 2.65-4.41 mm 2 . This corresponds to approximately 80-140 optical microscopy FOVs, using a conventional 100 x magnification [24]. Image files were saved locally in the Tagged Image File Format (TIFF) and converted to a wavelet file format (Enhanced Compressed Wavelet, ECW, ER Mapper, Intergraph, Atlanta, Georgia) with a compression ratio of 1:9, before uploading to the image management platform (Aiforia Cloud, Aiforia Technologies Oy, Helsinki, Finland). This amount of compression has been shown in earlier studies to preserve sufficient detail to not alter results significantly [25]. Remote access to the image server for sample viewing is established using a web browser, secured with Secure Socket Layer (SSL). For the digital analysis of the samples we trained two separate image analysis algorithms, based on deep learning (DL) with deep convolutional neural networks (CNNs). We utilized manually annotated image regions (n = 1,176) from a subset of thin blood smears (n = 25) to train the algorithms to detect visible malaria trophozoites and RBCs. A summary with comparison of the main features and differences of the algorithms is available in the supporting information (S1 File).

Visual analysis of digital samples and training of deep-learning systems
For the first deep-learning system (DLS 1), the digitized samples were uploaded to a commercially available, cloud-based machine-learning platform (Aiforia Cloud and Create, Aiforia Technologies Oy, Helsinki, Finland). Using this platform, a supervised deep-learning system (DLS) was trained to detect intracellular trophozoites in the digital images. For this method, the corresponding brightfield and fluorescence image channels were merged into hybrid images (Fig 3). The training data was visually reviewed by a researcher (S.S.), and visible trophozoites and RBCs were annotated to constitute the training data. This system consists of two sequential CNN algorithms. The first algorithm detects all RBCs (i.e. infected and noninfected). The corresponding results are then forwarded to a second layer, containing two separate algorithms; one that detects infected RBCs (RBCs with visible fluorescent intracellular trophozoites; i.e. parasite candidates) and one that detects non-infected RBCs (RBCs without visible parasite candidates). The sample parasitaemia is calculated as the number of detected parasites divided by the total number of detected RBCs (Fig 2). To increase the generalisability of the model, digital image augmentations by perturbation of the training data were utilized. In the first CNN layer, augmentations used were rotation (0-360˚), variation of scale (±10%), shear distortion (±10%), aspect ratio (±10%), contrast (±10%), white balance (±10%) and luminance (±10%). In the second layer, the training material was augmented by rotation (0-360˚), variation of scale (±5%), shear distortion (±5%), aspect ratio (±5%), contrast (±5%), white balance (±5%) and luminance (±5%). Training of the model was performed with 7,584 completed iterations (training epochs) of training and a predetermined feature size for object classification of 7 μm (RBCs) and 3 μm (parasites), using an image analysis window size (FOV) of 15 μm.
The second deep-learning system (DLS 2) analysis method also utilizes deep learning with CNNs, and analyses the brightfield and fluorescence images from the sample separately. The workflow of this system is described in Fig 4. First, the RBCs in the brightfield-only image are identified using circle Hough Transform (CHT) to allow the selection of individual, well-preserved RBCs, while avoiding overlapping, clumped or otherwise deformed cells. Subsequently, a normalized cross correlation and peak finding algorithm [26] identifies the locations matching with a parasite template in the corresponding fluorescence-only image where the correlation peaks represent the centroids of the parasite candidates. Selected RBCs are then used to create a quantitation mask, and by combining the data from both images the parasite candidates are then addressed to the selected individual RBCs in the merged image. Notably, only the detected fluorescence signals emitted from locations inside the RBCs are included (with a small margin to cover the applique parasite forms and possible optical misalignment of the image channels). This also enables the detection of multiple objects within a single RBC; such as multiple visible parasites. A threshold was determined for the cross-correlation coefficient and Structural Similarity Index (SSIM) [27] value of the candidates to reduce computation cost by not including the least likely parasite objects, i.e. weak signals emitting from the background fluorescence. The SSIM Index assesses the visual impact of luminance, contrast and structure characteristics of an image.
For the classification part, transfer learning [28] was utilized using a pre-trained GoogLeNet network [29] The model is a binary-classification CNN which was trained using manually selected image-regions from the training series of samples, representing visible parasites and non-parasite fluorescent objects (i.e. debris and other artefacts). The training data was visually

PLOS ONE
Point-of-care fluorescence microscopy and deep learning for malaria diagnostics reviewed by a researcher (A.S.), and visible trophozoites (n = 5059) and other fluorescence signals (n = 856) were annotated from the training samples to constitute the training data for the two classes. As the parasitaemia level was relatively high in a large part of the training samples, the number of true parasites was significantly higher than the number representing other fluorescence signals. To reduce training imbalance and to ensure that high-parasitaemia samples would not dominate the training while preserving a sufficiently diverse distribution of parasites, the number of parasites selected from each training sample was limited based on the SSIM value of the candidate objects. Specifically, in each training sample, only the candidates with a unique SSIM value were included in the training. Rotation (0-360˚) and variation of scale (± 5%) were utilized to augment image data, to prevent overfitting. Training of the model was performed in 30 training epochs with a batch size of 32 using a stochastic gradient descent solver with a momentum of 0.9 and initial learning rate of 0.0003. During the analysis phase the RBC was marked infected if at least one addressed parasite candidate was classified as a trophozoite with a classification score of at least 95/100. The overall parasitaemia was determined by the ratio of infected RBCs to the total number of RBCs (S1 Fig). DLS 2 is run locally and therefore suitable for potential integration directly into the imaging system for rapid analysis.

Statistical analysis
Statistical analysis of results was performed using a general-purpose statistical software package (Stata 15.1 for Mac, Stata Corp., College Station, TX, USA). We calculated a Pearson's product-moment correlation to determine the relationship between parasitaemia determined by visual examination and analysis with the deep learning models in the digital samples. We utilized a two-sided paired Wilcoxon Signed-Rank test to assess the difference in detected levels of parasitaemia between the Day 0 and Day 3 samples. Power analysis for these calculations were conducted using the G � Power software v3.1.7 (Universität Kiel, Kiel, Germany) to determine a sufficient sample size, using an alpha of 0.05, a power of 0.95 and an effect size of 1.17 (as calculated based on the difference between visually-determined levels of parasitaemia in slide pairs from the training data), which yielded a minimum required number of samples of 34 (17 slide pairs) [30].

Ethical statement
The study was conducted in accordance with the Declaration of Helsinki on Good Clinical Practice. Ethical clearance for the study was issued by the National Institute for Medical Research (NIMR/HQ/R.8a/Vol.IX/2477) and Muhimbili University of Health and Allied Sciences, Tanzania, (MU/DRP/ERP/Vol.IX/174) and the original clinical trial registered on clinicaltrials.gov (Identifier: NCT03241901). Written informed consent was obtained from the study participants prior to enrolment in the study.

Quantification of parasites in digital samples
Prior to analysis of the main samples used in the study, we tested the image capture and algorithms on a series of test blood thin smears, prepared in laboratory conditions from blood cultures with known levels of P. falciparum infection (n = 7; approximately 0%, 0.2%, 0.5%, 1% and 2%, respectively). Here, we confirmed that fluorescent parasites and parasitized red blood cells (RBCs) could be visualized at the spatial resolution provided by the instrument. Overall, we observed a high level of similarity and almost perfect correlation between the DLS-based sample analysis and the known infection levels of the samples (r(7) = 0.99, p < 0.001) (S4 Fig). For the samples used in the study, after exclusion of samples used for the training of the deep-learning systems, 97 samples remained in the validation series, of which 77 samples were thin blood smears collected at baseline, prior to initiation of treatment with ACT (Day 0), and 20 samples were follow-up thin blood smears collected on day 3 after treatment initiation (Day 3). All samples collected on day 0 were confirmed as malaria-positive by light-microscopy assessment of thick smears from the same patients, with a mean parasitaemia of 58,711 parasites/μL (95%CI 44,055-73,368 parasites/μL) and correspondingly a mean estimated parasitaemia of 1.17% (95% CI 0.88-1.  Table 1).
The results from the DLS analysis of the Day 3 digitized thin smears also yielded similar values as the visual sample analysis (mean 0.05% [95%CI 0.017-0.083] and 0.05% [95%CI 0.009-0.094]). When assessing correlation between the DLS analysis and the visual analysis of the digital samples, an almost perfect correlation in detected rate of trophozoites was observed, as calculated with the Pearson's product-moment correlation coefficient, for the microscopy-

PLOS ONE
To further evaluate the DLS-based quantification of P. falciparum parasitemia in the Day 0 samples, we also compared the results from the digital analyses to the level of infection, as determined by quantitative PCR (qPCR). Here, we also observed a strong correlation between the DLS-and the qPCR-based assessment of infection level (r(27) = 0.90). As qPCR results were only available for a subset of patients (27), these are provided in more detail as supplementary material (S2 Fig). (Fig 7).

Discussion
In this study we acquired thin blood smears from patients with light microscopy-determined uncomplicated P. falciparum infection, collected at baseline before initiation of artemisininbased combination therapy (ACT) and three days following treatment initiation. We stained the samples using a simplified fluorescent staining protocol and digitized both the fluorescence and brightfield images into hybrid digital samples, using a small-sized POC digital microscope prototype. The digital samples were uploaded to a cloud-server and analysed with two deep learning-based systems to detect and quantify malaria parasites in the samples. Results were compared to visual assessment of the digitized samples, and to light microscopy examination of Giemsa-stained thick smears. Overall, we observed strong correlations in the numerical results, i.e. values for detected level of parasitaemia with the DLS-based system in malaria-positive samples and visual assessment of the digital samples (r = 0.98-0.99, p < 0.01) and (r = 0.42-0.61, p < 0.01).
Compared to the light-microscopy assessment of Giemsa-stained thick smears, the correlation in detected number of parasites was strong but lower (0.74, p < 0.01), likely as the quantification of parasites is not directly comparable when using different methods of analysis and sample types (thick and thin blood films). Notably, previous studies have shown that the visual approximation of parasite density in especially thick blood films is prone to variations, due to factors such as reader technique, quality of slides and the random distribution of parasites and WBCs [31,32]. Here, both DLSs performed with high similarity to the manual assessment of the digitized thin smears. When assessing parasite clearance by DLS-based analysis of digital samples collected on Day 3 after initiation of ACT, significantly lower levels of parasite candidates were detected in the samples using the digital methods (0.05% vs. 1.73%, z = -3.92). For quantification of P. falciparum parasites in malaria-positive samples, both deep learning algorithms performed with high correlation (r > 0.99) to the manual, visual quantification of parasites in the digital samples, suggesting that the methods are comparable. Notably, a similarly high level of correlation was also observed when comparing the results from the DLSs to the qPCR-based assessment of infection level (r = 0.90), although these results were only available for a subset of patients (S2 Fig). Overall, the number of detected signals (parasite candidates) by analysis with the DLSs was low in microscopy-negative samples, and mainly corresponded to fluorescent artefacts and debris (S3 Fig). The results here suggest that it would be possible to establish an operative threshold for the DLSs to separate positive and negative samples with relatively high sensitivity. Here, by using a threshold for positivity of 0.10% (detected level of parasitemia) for classifying a sample as malaria-positive, the detection of positive samples in the validation series would be possible with approximately 95% sensitivity and specificity. This could initially be useful e.g. as a triage system to automatically detect the majority of abnormal slides, although the accurate detection of low-level infections would require higher sensitivity.
Our results are in line with findings from earlier studies, where fluorescence malaria field microscopy has shown promise as a field-applicable and inexpensive diagnostic technology [33]. Similarly to our findings, previous work has suggested that high sensitivity (up to 98%) and reasonable sensitivity (89%) can be achieved using visual fluorescence field microscopy, compared to conventional methods, and especially for samples with high levels of parasitaemia [34]. Previous work has also demonstrated how the digital analysis of DAPI-stained blood samples, digitized with a 40x objective digital microscope in laboratory conditions, can be used to quantify levels of parasitaemia and even classify the infection stage of the parasites [35]. Notably, the principal challenges with equivocal fluorescent particles being detected as parasites in samples with low levels of parasitemia encountered here has also been described previously [33]. Although significantly lower amounts of parasite signals were detected in the microscopy-negative samples, the levels were still relatively high compared to e.g. the detection limits of conventional Giemsa thick smear microscopy. Therefore, to achieve ideal levels of sensitivity for primary malaria diagnostics, methods to improve sensitivity for especially lowlevel infections are essential. These include steps to minimize sample contaminations to allow the digitization of large, representative sample areas (i.e. uncontaminated monolayers of RBCs). To achieve similar levels of sensitivity as Giemsa thick smear-microscopy and RDTs, increasing the total sample area analysed (currently~100 high-power FOVs) or utilizing methods to increase the amounts of visible RBCs per image field are crucial.
As this work represents a proof-of-concept study, it has certain limitations that need to be addressed. Firstly, the principal challenge encountered here and the major cause of false-positive signals in the microscopy-negative samples was the presence of artefacts and debris in the blood smears, which resulted in fluorescent signals not originating from parasites. Although the staining process described here is simple to perform, the technique is, similarly to conventional staining methods, prone to contaminations, which was challenging especially in samples with higher levels of contamination and low parasite densities (S1 Fig). This emphasizes the need for robust sample processing to ensure usability in field settings. Therefore, although this technology could potentially facilitate the sample analysis and reduce the need for trained experts to analyse samples, the staining process is a crucial step which still requires trained personnel on site. Secondly, here, we compared the parasite quantification in stained thin blood smears to the microscopy-assessment of thick smears from the patients, and accordingly observed a certain variation in the estimated infection levels. To determine the correlation to Giemsa microscopy, the analysis of Giemsa-stained thin blood smears from the same patients would be the preferred ground truth, which was not available in the current study. Notably, when testing the algorithms on samples prepared in laboratory conditions with known levels of P. falciparum infection, a strong correlation (r > 0.99, p < 0.001) was observed in DLSdetected levels of infection and known parasitaemia (S4 Fig). Lastly, we digitized areas of the thin smears that contained representative monolayers with minimal amounts of artefacts, but in a clinical setting, larger representative sample areas would be analysed to improve the sensitivity for lower-level infections.

Conclusion
This proof-of-concept study shows that detection and quantification of P. falciparum parasites in thin blood smears is feasible, using a simplified fluorescent staining process, an inexpensive, POC portable slide-scanner and a deep learning-algorithm. As digital microscopy is currently limited mainly to laboratories with access to high-end digitization equipment, this method warrants further investigation as a potential novel platform for AI-based, digital malaria microscopy at the POC. The method can facilitate microscopy diagnostics in field settings and offer the benefits that digital and automated microscopy is associated with e.g. more objective and reproducible results, potentially reduced time for needed for sample analysis (compared to the manual quantification of parasites), and a method that can be used for monitoring of treatment efficacy through assessment of parasite clearance. Also, the method is likely to be applicable for different Plasmodium species and other pathogens, especially those where fluorescence microscopy may offer additional diagnostic advantages.

Hardware, software and data availability statement
The data and results underlying the conclusions in the article are included in the manuscript and/or the Supplementary Material. Requests for additional, de-identified data are handled by the Data Access Committee at Institute for Molecular Medicine Finland (FIMM), University of Helsinki, Helsinki, Finland (e-mail: fimm-dac@helsinki.fi). The prototype instrument used for digitization of the samples is developed and patented (patent number: US20180246306) by the University of Helsinki (Helsinki, Finland). At the time of writing, the device is still in prototype stage and therefore not commercially available. We are open to collaborations for academic, non-profit purposes; requests for access to the hardware and software used in this study can be directed to the corresponding author, and will be considered from researchers with the aim to generate data for the public good.