1 Introduction

Human blood includes dissimilar cellular entities that are responsible for diverse functions of the body such as immunity, coagulation, regeneration and oxygen transport [1]. Human peripheral blood cells (PBC) consist of platelets, leukocytes (white blood cell-WBC), erythrocytes (red blood cells-RBC) and plasma [2]. PBC analysis plays an important role in the diagnosis of many diseases such as malaria, anemia and leukemia [3]. Unlike the entirety of form and shape seen in platelets and RBCs, WBCs are various in cell form and differ in cell type, which has made WBCs the focus of most researchers, especially in medical image segmentation [4] and classification [5]. WBCs are principally responsible for maintaining the body from foreign pathogens such as parasites, viruses, bacteria and possible infections. Therefore, they play an active role in the human immune system [6]. WBCs are divided into some subtypes according to their morphological structures. These subtypes are as follows: erythroblasts, platelets, immature granulocytes (promyelocytes, myelocytes, and metamyelocytes), monocytes, lymphocytes, basophils, eosinophils, and neutrophils. All of these subtypes have important duties in defending the body against microorganisms such as fungi, bacteria and viruses in the human body [7]. Thus, identification of the correct WBC is clinically quite significant.

In addition, (1) accurate WBC classification is crucial for identifying the nature of infections. By assessing the relative proportions of different WBC types, clinicians can differentiate between bacterial, viral, fungal, and parasitic infections. For instance, a high neutrophil count (neutrophilia) often indicates a bacterial infection, whereas an elevated lymphocyte count (lymphocytosis) can suggest a viral infection. This distinction guides appropriate antibiotic and antiviral therapy, preventing unnecessary or ineffective treatments [8,9,10]. (2) Sepsis is a life-threatening condition caused by the body’s response to infection. Proper WBC classification helps in diagnosing and monitoring sepsis. A combination of increased neutrophils and decreased lymphocytes can be indicative of sepsis, guiding prompt intervention and monitoring treatment response [11, 12]. (3) Accurate WBC classification aids in diagnosing autoimmune diseases, where the immune system mistakenly attacks the body’s own tissues. Conditions like rheumatoid arthritis, lupus, and multiple sclerosis have distinct WBC profiles that assist in diagnosis and treatment planning. Additionally, immune deficiencies, such as acquired immunodeficiency syndrome (AIDS), show characteristic WBC changes, highlighting the importance of proper classification in identifying compromised immune function [13]. (4) In various cancers, including leukemia, lymphoma, and solid tumors, WBC classification plays a pivotal role. Precise identification of abnormal WBC populations can aid in diagnosing these malignancies and determining their stage and severity. Monitoring WBC responses during cancer treatment provides insights into treatment effectiveness and disease progression [14,15,16,17]. (5) Chemotherapy and immunotherapy impact WBC populations, often causing changes such as leukopenia (low WBC count). Accurate WBC classification helps clinicians tailor doses and treatment regimens to minimize side effects while maintaining therapeutic efficacy. For example, monitoring neutrophil levels is essential to assess the risk of infection during chemotherapy [18, 19]. (6) WBC classification is vital in assessing compatibility for organ or bone marrow transplantation. After transplantation, changes in WBC subsets can signal graft-versus-host disease, a potentially severe complication where transplanted immune cells attack the recipient’s tissues [20]. (7) Eosinophils, a type of WBC, are implicated in allergic reactions and asthma. Monitoring eosinophil counts aids in diagnosing and managing these conditions. Elevated eosinophil levels can indicate ongoing allergic responses and help guide appropriate therapies [21]. (8) In settings where advanced diagnostic tools are scarce, basic WBC classification remains a critical tool. It can provide rapid insights into potential infections or immune system disorders, enabling timely treatment decisions. To summarize, accurate WBC classification enables clinicians to make informed decisions regarding patient care, treatment strategies, and disease management. It aids in timely and precise diagnosis, facilitates appropriate therapeutic interventions, and contributes to improved patient outcomes. The ability to interpret WBC profiles empowers healthcare providers to offer targeted and personalized care, enhancing the overall quality of medical practice. In this direction, the classification of WBCs (WBCC) in the blood is the most major duty. WBCC can be done both automatically and manually. Manual classification is time consuming as it depends on the knowledge of an expert [22]. The diagnosis of blood diseases and the treatment method according to this diagnosis depend significantly on the WBCC. Due to the fact that manual classification is time consuming and imposes more workload, it has been ensured that WBC analyses are performed automatically. Initially, automatic WBC analyzers were used for automatic WBCC. In this way, low-cost and fast analyzes were carried out. However, it was found to be lower than manual classification in terms of both detection of morphological correlations and reliability [23].

The development of computer-aided methods in the task of automatic WBCC decreases the workload of specialist hematologists. With computer-aided automatic WBCC, objective and rapid classification results are obtained. In addition, large amounts of data can be processed effectively. Computer-aided automatic classification is implemented in three different forms: (1) traditional image processing (TIP) [24], (2) machine learning (ML) and (3) deep learning (DL) algorithms [3]. In TIP, some features are extracted and then a threshold function is determined using mathematical relationships and controlled parameters. It is utilized to distinguish the features of diverse categories which supports to perform a better classifier. Numerous TIP methods have been improved in last years, such as fuzzy divergence and modified thresholding methods [25], Gram-Schmidt orthogonality process [26], grayscale contrast [27], pixel template matching [28]. More recently, restrictions in TIP algorithms and the raise in computational processing power have led investigative to develop ML methods such as Bayesian [29], random forest [30] and support vector machines (SVM) [31] classifiers for WBCC. These ML methods have taken into account specific morphological WBC features that increasing the performance of classification. Geometric, wavelet, statistical, textural features were extracted from the input images and subjected to feature selection (FS) before being fed to classifiers such as Bayesian and SVM for classification. In particular, DL architectures including convolutional neural networks (CNN) are recently being used in WBCC. Traditional ML methods extract features manually. Contrary to these methods, DL increases the classification accuracy by automatically extracting features [32]. Thanks to its powerful self-learning capabilities, CNN is able to extract deeper features with stronger semantic information in images. Therefore, in last years, CNN-based studies have begun to be conducted for the WBCC, unlike traditional classifiers.

After the literature reviews, the motivation of our study is as follows. (1) The classification of PBC is a pivotal component of medical diagnostics, research, and personalized healthcare. Peripheral blood cell classification holds immense value in the realm of disease identification, progression tracking, and early detection. By scrutinizing cell counts, shapes, sizes, and distributions, medical professionals can glean crucial insights into various conditions, including infections, anemias, and blood-related disorders. This classification not only aids in diagnosing diseases but also serves as a dynamic tool to monitor their advancement and gauge treatment efficacy. Furthermore, it enables the timely detection of ailments like leukemia in their nascent stages, facilitating prompt intervention and heightened treatment outcomes. The significance extends to research endeavors, where peripheral blood cell analysis contributes vital data for studies on disease prevalence, treatment outcomes, and underlying mechanisms. It forms a cornerstone for the evolving realm of personalized medicine, empowering healthcare providers to tailor treatments based on individual blood cell characteristics. (2) Central to PBC classification are the diverse cell types present, including red blood cells, WBC, and platelets, each possessing distinct functions and attributes. The correct classification of WBC is of paramount importance in clinical practice due to its significant implications for disease diagnosis, treatment, and patient management. Here are some key reasons highlighting the clinical importance of accurately classifying WBCs: Accurate disease diagnosis, differentiation of infections, monitoring disease progression, guiding treatment strategies, assessment of immune function, evaluation of drug toxicity, prognostic indicators and research and clinical trials. In summary, correct WBC classification is essential for accurate disease diagnosis, monitoring treatment responses, guiding therapeutic interventions, and predicting patient outcomes. It forms a fundamental component of clinical assessment and decision-making, contributing to improved patient care and better clinical outcomes. (3) The use of innovative technologies such as artificial intelligence to classify peripheral blood cells further improves this analysis. In this direction, deep learning and especially CNN-based methods are frequently used in the literature. After the literature review, it was concluded that CNN-based methods could still be developed for the classification problem of PBC and WBC types, which would still yield good classification results. This facts motivates us to develop new methods that can achieve better classification accuracy.

The contributions of proposed multibranch lightweight CNN-based model for microscopic PBC images classification are summarized as follows.

  1. 1.

    In first branch of the multibranch structure proposed in this study, the depthwise squeeze-and-excitation block (DSEB) block structure, which is a combination of squeeze-and-excitation (SE) block and depthwise separable convolution (DSC), was improved for the classification of microscopic PBC images. A stronger structure was created by adding the DSC layer to the SE block. With the developed DSEB structure, low-level features are weighted and combined with high-level features effectively. This enables more effective utilize of low-level features with only a small increase in computational cost. Thus, the training performance of the proposed method and the improvement of the efficiency of the network have been ensured. The application results prove that this structure used in the proposed method increases the classification accuracy.

  2. 2.

    In this study, the Inception module was used in second branch of the multi-branched structure proposed for the classification of microscopic PBC images. With the use of this module, it is purposed to improve the efficiency and classification performance of CNNs by performing multiple parallel convolutions at different scales. The Inception module also includes a 1 × 1 convolutional layer that is utilized to decrease the number of channels in the input tensor before applying larger filters. This helps decrease the computational cost of the network while maintaining classification accuracy. At the same time, it is provided in efficient saving of memory.

  3. 3.

    The purpose of pyramid pooling module, used in the third branch of this study, is to capture multi-scale contextual information from the input image by pooling features at multiple different scales.

  4. 4.

    We suggest a new fusion strategy based on multibranch network architecture, which allows methods with dissimilar structures to merge with each other and increases classification accuracy.

  5. 5.

    The proposed method was tested with three different blood cell datasets consisting of four classes (BCCD), five classes (Raabin WBC) and eight classes (PBC). With the BCCD dataset, 99.96%, with the Raabin WBC dataset, 99.22% and with the eight classes PBC dataset, 99.72% classification accuracy results were obtained. When both the results acquired with the proposed method and the results in the literature are analyzed, it is seen that our proposed Multibranch Lightweight CNN method achieves higher classification results for PBC classification.

Other sections of the paper are planned as follows: Studies on peripheral blood cell classification in the literature are included in the related works section, which is Sect. 2. Pyramid pooling module, depthwise squeeze-and-excitation block (DSEB) and Inception module, which constitute the theoretical background of the proposed multibranch lightweight CNN are explained in Sect. 3. Moreover, information about the datasets used in the paper and the proposed multibranch lightweight CNN method are included in Sect. 3. In Sect. 4, experiments related to the datasets used and the results of these experiments are discussed. A general assessment of this paper is in Sect. 5.

2 Related works

In the literature review, some of the recent deep learning and especially CNN-based studies for PBC classification are as follows.

Girdhar et al. [1] developed a novel CNN architecture for the WBCC. Studies were carried out on the blood cell count and detection (BCCD) dataset to test the performance of the presented CNN method. With the CNN method, 98.55% classification accuracy was obtained in 20 epochs. Long et al. [23] proposed BloodCaps, a capsule-based model designed for the accurate multiclassification of a diverse and broad spectrum of blood cells for PBC classification. Implemented on a large-scale dataset of 8 classes of human peripheral blood cells, the proposed BloodCaps method achieved an overall accuracy of 99.3%, outperforming convolutional neural networks such as AlexNet (81.5%), VGG16 (97.8%), ResNet18 (95.9%) and InceptionV3 (98.4%). Şengür et al. [33] presented a hybrid method for the WBCC, combining image processing and DL. After applying various image processing methods (morphological processes, thresholding, filtering, color to gray tone conversion and RGB to HSV transformation) on WBC images, long-short term memory (LSTM) method is utilized for the WBCC. When the performances of the experiments on the BCCD are analyzed to evaluate the classification result of the suggested hybrid method, a classification accuracy of 92.89% was acquired. Patil et al. [34] developed a canonical correlation analysis-based DL method for the WBCC by joining LSTM and CNN. Canonical correlation analysis extracts various overlapping features from the input image, thus increasing its accuracy compared to other similar DL methods. The classification accuracy acquired according to the applications on the BCCD dataset is 95.89%. Bani-Hani et al. [35] implemented a new CNN method for classification of four types of WBC images: monocytes, lymphocytes, neutrophils and eosinophils. They also utilized the genetic algorithm for the optimization of the hyperparameters used in the CNN method. When the applications on the BCCD were examined, it was seen that 91.01% overall accuracy was obtained. Liang et al. [36] improved a novel method for the WBCC, combining the features of the LSTM and Xception methods. When the performances of the experiments on the BCCD are analyzed, it is seen that the overall accuracy is 90.79%. Cheuque et al. [37] created a two-phase hybrid multilevel structure that effectively classifies four WBC types: eosinophils and neutrophils (polymorphonuclear), monocytes and lymphocytes (mononuclear). Primarily, a Faster R-CNN is implemented for the recognition of the region of interest of WBC, together with the allocate of polymorphonuclear cells from mononuclear cells. After allocated, two parallel CNNs with the MobileNet are utilized to identify the subclasses in the another phase. The results acquired using Monte Carlo cross-validation indicate that the suggested method has an accuracy of 98.4%. Khan et al. [38] suggested a pretrained AlexNet-based method for the WBCC using the four-class BCCD. They also used the FS method to choose the most efficient features to increase the classification accuracy of WBC images. Finally, the extreme-learning machine was utilized to estimate the final WBC type of the microscopic WBC images. With the suggested method, the classification result obtained using the BCCD is 99.12%. Çınar et al. [39] developed a hybrid CNN method consisting of pre-trained GoogleNet and AlexNet for the classification of WBC images. With this method, the feature vectors in the final pooling layer of both GoogleNet and AlexNet are combined and the resulting feature vector is classified with the SVM. According to the applications on the BCCD, 99.7% overall accuracy was found. Habibzadeh et al. [40] presented a method from the Residual network and Inception module to classify four types of WBC in the BCCD. When the applications made with this method are analyzed, classification accuracy of 99.8% was obtained at 3000 epochs. Hedge et al. [3] performed studies with the pretrained AlexNet architecture for the classification of six dissimilar blood cells on the WBC dataset collected by them. They achieved 99% classification accuracy on WBC images collected by them with the pre-trained AlexNet architecture. Baghel et al. [41] developed a novel CNN model to improve the classification accuracy of WBC. When the application results on the BCCD are analyzed, they achieved 98.91% classification accuracy at 1000 epochs. Basnet et al. [42] suggested a method for accurate classification of WBC using deep CNN architecture. To analyze the classification accuracy of the developed deep CNN, a dataset consisting of 10,000 images with five classes was used. With Deep CNN, 98.92% classification accuracy was found. Baydilli et al. [43] developed a novel method called capsule networks to classify WBC into five types. The classification accuracy of the capsule networks was tested on a small dataset, the LISC dataset consisting of 263 blood cell images. As a result of the applications, it was seen that the result of 96.86% accuracy was obtained. Shahin et al. [44] presented a new deep CNN method for WBCC called WBCsNet. For the analysis of the classification performance of the WBCsNet, three different general WBC datasets consisting of 2551 images containing five WBC types were used. The classification accuracy achieved with WBCsNet is 96.1%. Toğaçar et al. [45] suggested a novel combination of CNN and FS methods for WBCC. In this method, ResNet50, GoogLeNet, AlexNet methods are utilized as feature extractors. The features extracted by these methods were joined and the ridge feature selection and maximal information coefficient were utilized to choose the most decisive features. Finally, quadratic discriminant analysis was utilized as a classifier. A total of 12,435 WBC images were utilized to analyze the classification accuracy of the suggested method. In this dataset, four types of WBC were classified as neutrophil, monocyte, lymphocyte and eosinophil. With the suggested method, a general accuracy of 97.95% was obtained. Ha et al. [46] developed the semi-supervised Fine-grained Interactive Attention Learning (FIAL) model for WBCC. FIAL includes Semi-Supervised Teacher-Student modules and Fine-Grained Interactive Attention. The Semi-Supervised Teacher-Student module uses restricted labeled WBC images and produces estimated probability vectors for a large amount of unlabeled WBC samples. The overall accuracy of the FIAL on the BCCD, which is a public dataset, is 93.2%. Hosseini et al. [47] suggested a novel CNN architecture for the accurate classification of four types of WBC: neutrophils, monocytes, eosinophils and lymphocytes. The difference of the suggested method from other methods is that hyperparameters are optimized using random search and grid search optimization algorithms. When the application results on the BCCD are analyzed, 97% classification accuracy was obtained. Banik et al. [48] developed a novel CNN architecture for WBCC by joining the features of the first and last convolutional layers and spreading the input image to the convolutional layer. According to the applications on the BCCD, 99.42% overall accuracy was acquired with the method they developed. Mohamed et al. [49] suggested a hybrid method for WBCC consisting of logistic regression as classifier and MobileNet-224 as feature extractor. According to the experiments on the BCCD, they obtained 97.03% classification accuracy. Bayat et al. [50] suggested an attention-based method for the WBCC. More specifically, this method consists of attention-based data augmentation, texture-sensitive/attention mapping blocks, and attention regularization. When the applications performed on the BCCD containing four classes are analyzed, it is seen that 99.69% classification accuracy is achieved. Jung et al. [51] suggested a novel CNN model, W-Net, for WBCC. The W-Net was analyzed using a dataset including 6562 WBC images and consisting of five WBC types. W-Net acquired an overall accuracy of 97% as a result of the applications.

3 The proposed approach

In this section, the multibranch lightweight CNN method for the classification of microscopic PBC images and the methods used in theoretical background of the multibranch lightweight CNN method are explained in detail. Besides, the datasets utilized in the study and knowledge about these datasets are given.

3.1 Inception module

The Inception module is a building block used in CNNs for classification and object recognition. It was introduced in the GoogLeNet architecture, which won the ImageNet Large Scale Visual Recognition Challenge in 2014. This module is designed to efficiently extract features from images at multiple scales and resolutions by using filters of different sizes (\(1\times 1\), \(3\times 3\), and \(5\times 5\)) in parallel. This allows the network to capture both fine-grained and coarse-grained details in the image. The Inception module also includes a \(1\times 1\) convolutional layer, which helps to decrease the dimensionality of the input and increase computational performance. Besides, the module uses pooling operations to downsample the feature maps, which can help to decrease the impact of overfitting and develop generalization. The Inception module can be stacked together to form deep networks and has been shown to acquire state-of-the-art performance on a variety of image recognition tasks [52, 53]. The structure of the Inception module is given in Fig. 1. In addition, detailed information about the convolution and maxpooling layers used in the module is given in Table 1. In Table 1, \(k\), \(s\), \(p\), and \(f\) express kernel_size, stride, padding, and filters, respectively.

Fig. 1
figure 1

Inception module

Table 1 Layer information in the Inception module

3.2 Depthwise squeeze-and-excitation block (DSEB)

In this study, the second of the methods used in the proposed method is DSEB. A strong block structure was created by adding a depthwise separable convolution (DSC) layer to the squeeze-and-excitation (SE) block structure. DSEB provides useful information for the classification of PBC images by weighting features with a channel-based attention module. The features in different layers of CNN include different details. High-level features contain semantic information that is effective in classification, while low-level features include spatial information that indicates shape, texture, and scale. The DSEB in the proposed method effectively joined high-level and low-level features instead of direct connection. In this way, the DSEB enables more effective utilize of low-level features with only a small increase in computational cost. Also, this block plays an significant role in capturing smaller detailed and important features for classification of PBC images. Thus, it improves the network training performance of the network and increases the efficient of the network. DSEB consists of two modules (Fig. 3): (a) DSC and (b) SE block. In DSC, the convolution process takes place in two stages: pointwise convolution (PC) (also known as \(1\times 1\) convolution) and depthwise convolution (DC) (Fig. 2). DC, which is the first of these stages, performs a separate convolution process on each channel of the input image. The convolution process is utilized to extract spatial features in all dimensions. PC is the \(1\times 1\) standard convolution process on the output feature map. In this convolution, the feature map obtained at the output of the DC using a \(1\times 1\) filter is combined along the channels. In the standard convolution operation, a one-step convolution operation is applied to the input images (Fig. 2a). Contrary to standard convolution, the use of DSC reduces the number of trainable parameters by performing the convolution process in two separate stages (Fig. 2b). This can prevent overfitting problem. It also reduces transaction costs due to fewer calculations [54, 55]. Let there be an input image of size \(W\times H\times M\) as shown in Fig. 2a. Here \(W\) is the width of the input image, \(H\) is the height and \(M\) is the number of channels. Similarly, let there be \(R\) filters/kernels of \(C\times C\times M\) convolution kernel size. When a standard convolution process is implemented, the output feature map size will be \(W\times H\times R\). The operation cost of the standard convolution process is as in Eq. (1).

$$ {\text{Standard\_convolution}} \left( {{\text{cost}}} \right) = W \times H \times R \times C \times C \times M $$
(1)
Fig. 2
figure 2

a Standard convolution and b DSC

As shown in Fig. 2b, the DSC is split into 2 convolution processes. First, in the DC process, convolution is applied to one channel at a time, unlike the standard convolution process for all \(M\) channels. Here, \(M\) filters with convolution kernel size of \(C\times C\times 1\) are required. The size of the resulting intermediate output will be \(W\times H\times M\). For the DC process, the operation cost is calculated as in Eq. (2). In PC, \(1\times 1\) convolution process is applied to the intermediate output obtained. The kernel size of this operation will be \(1\times 1\times M\). Assuming R filters are used, the output size will be \(W\times H\times R\). The cost obtained as a result of the PC process is as in Eq. (3). DSC operation cost is the sum of the cost obtained as a result of DC and PC operations. The calculation required to compare the operation costs obtained as a result of the standard convolution process and the DSC is as in Eq. (4). Considering Eq. (4), it is seen that DSC decreases the number of trainable parameters and computational cost compared to standard convolution. This increases the computational power while decreasing the computational cost and training time of the method without affecting the performance of the method [54, 55].

$$ {\text{Depthwise\_convolution}} \left( {{\text{cost}}} \right) = W \times H \times M \times C \times C $$
(2)
$$ {\text{Pointwise\_convolution}} \left( {{\text{cost}}} \right) = W \times H \times R \times M $$
(3)
$$ \frac{W \times H \times M \times C \times C + W \times H \times R \times M}{{W \times H \times R \times C \times C \times M}} = \frac{1}{R} + \frac{1}{{C^{2} }} $$
(4)

The SE block provides a structure for CNNs that improves channel dependencies at virtually no computational cost. The SE block extracts important feature information by recalibrating the features it receives as input [56, 57]. Using the SE block can improve the interdependence between channels and improve feature information useful for PBC image classifications. The schematic structure of the SE block is given in Fig. 3. The function of the SE block is as follows: Primarily, a feature map and the current number of channels it has are given to the input of the SE block. Then, using global average pooling (GAP), each channel is converted to a single numerical value (squeeze). Here, the feature maps for each channel are compressed into \(1\times 1\) feature maps using a channel descriptor function such as GAP. This step generates a scalar value containing general information about the channel. The goal of squeeze is to have a global receptive field so that the lower layers of the network can also use the global information. After the squeeze process, the excitation process is used to create weights for each feature channel according to the parameters. Parameters are learned to explicitly model the correlation between feature channels. Two fully connected layers (FC layer) are used to limit the complexity of the method and facilitate generalization, as well as to create a bottleneck structure for modeling correlations between channels. The first FC layer is used to decrease the feature size, and after the first FC it is increased back to its original size in the second FC layer. Between both FC layers, ReLU activation function is used to make the network more nonlinear, which can better adapt to the complex correlation between channels. Compared to using a direct FC layer, the structure using two FC layers has more nonlinear features, which can better adapt to the complex correlation between channels. It can also decrease the amount of calculations and parameters. After FC-ReLU-FC, the sigmoid function is used to acquire normalized weights between 0 and 1. Finally, a scaling process is performed to weight the normalized weights according to the characteristics of each channel [58, 59]. These operations of the SE block require almost no additional transaction costs. This block can be easily added to any method due to its performance enhancing feature in classification tasks.

Fig. 3
figure 3

Depthwise squeeze-and-excitation block (DSEB)

3.3 Pyramid pooling module (PPM)

PPM is a neural network module that is commonly used in computer vision tasks, particularly in semantic segmentation [60]. It was introduced in the paper “Pyramid Scene Parsing Network” by Zhao et al. (CVPR 2017) [61]. The PPM is designed to capture multi-scale contextual information from the input image by applying pooling processes at dissimilar scales. The PPM works by dividing the input feature map into a set of non-overlapping regions of different sizes and then implementing pooling processes to each of these regions. The resulting pooled features are then concatenated and passed through a convolutional layer to produce the final output. The PPM allows the network to capture contextual information at multiple scales, which can be particularly useful for tasks such as object recognition and segmentation, where objects can vary significantly in size and shape. By pooling features at different scales, the network can capture both fine-grained details and larger contextual information, leading to improved performance on these tasks. Overall, the PPM is a useful tool for increasing the performance of CNNs in computer vision tasks that require multi-scale contextual information. The PPM consists of four steps:

  1. 1.

    Image pooling: The input image is first separated into four regions of equal size. Each region is then pooled using a different kernel size, resulting in four different feature maps.

  2. 2.

    Pyramid pooling: Each of the pooled feature maps is then passed through a convolutional layer to decrease the number of channels, and then upsampled to the original size of the input image.

  3. 3.

    Concatenation: The four upsampled feature maps are then concatenated along the channel dimension to produce a single feature map.

  4. 4.

    Convolutional layer: The concatenated feature map is passed through a convolutional layer to produce the final output of the PPM.

The PPM allows the segmentation model to capture multi-scale contextual information, which can be useful for accurately segmenting objects of different sizes and shapes in an image. The general structure of PPM is given in Fig. 4. As shown in Fig. 4, a 2D convolution operation with 128 filters and a kernel size of \(3x3\) is performed to obtain a feature map before the PPM. Then, four pooling layer scales (\(1\times 1\), \(2\times 2\), \(3\times 3\), \(6\times 6\)) are used to process the resulting feature map. Each pooling layer is followed by a \(1\times 1\) convolutional layer to decrease the size of the input feature map and preserve the weight of the overall features. After the \(1\times 1\) convolution layer, an upsample layer is created, which purposes to acquire the same feature map size as the output of the corresponding convolutional block through bilinear interpolation. Finally, these four scaled features are concatenated with the feature map obtained after the first \(3\times 3\) convolution. After concatenating, 2D convolution operation with 128 filters and \(3\times 3\) kernel size is applied to extract the final features that ensure rich global context information for pixel-level classification [62,63,64].

Fig. 4
figure 4

Pyramid pooling module (PPM)

3.4 Datasets

In order to analyze the classification results of the multibranch lightweight CNN within the scope of the study, experiments were carried out on three different PBC image datasets. The first of the datasets is a publicly available dataset collected by Anna et al., at the Barcelona hospital clinic [65]. This dataset contains a total of 17,092 peripheral blood cell images. These images were collected from healthy individuals who did not receive any pharmacological treatment and did not have oncological or hematological and infection diseases. The images in this dataset consist of RGB images with a size of \(360\times 363\) pixels. In addition, these images were labeled by specialist pathologists in the hospital. The PBC dataset contains 8 different blood cell types (or classes). These cell types are as follows: Erythroblasts (ER), Platelets (P), immature granulocytes (IG) (promyelocytes, myelocytes, and metamyelocytes), Monocytes (M), Lymphocytes (L), Basophils (B), Eosinophils (EO), and Neutrophils (N). The second dataset (BCCD) consists of four blood cell types (M, L, EO, and N). It contains 12,444 microscopic blood cell images (Dataset 2-master) in total. All images in this dataset are \(320\times 240\) pixels and RGB images [66]. In this dataset (Dataset 2-master), training and test images for each of the four blood cell types are contained in separate folders. It include of 12,444 microscopic blood cell images in total, including 2497 EO, 2483 L, 2478 M, and 2499 N for training images and the 624 for N, 620 for M, 620 for L, and 623 for EO for testing images. The third dataset used in the study is the Raabin-WBC dataset [67]. Raabin-WBC is a large free-access dataset recently published in 2021. Raabin-WBC dataset possesses three sets of WBC cropped images for classification: Train, Test-A, and Test-B. All WBCs in Train and Test-A sets have been separately labeled by two experts. Yet, images of Test-B have not yet been labeled thoroughly. Therefore, in this study we only used Train and Test-A sets. These two sets have been collected from 56 normal peripheral blood smears (for lymphocyte, monocyte, neutrophil, and eosinophil) and one chronic myeloid leukemia (CML) case (for basophil) and contain 14,514 WBC images. All these films were stained through Giemsa technique. The normal peripheral blood smears have been taken using the camera phone of Samsung Galaxy S5 and the microscope of Olympus CX18. Also, the CML slide has been imaged utilizing an LG G3 camera phone along with a microscope of Zeiss brand. It is worth nothing that the images have all been taken with a magnification of 100 [68]. The Raabin-WBC dataset consists of five blood cell types (M, L, EO, N and B). It include of 14,514 microscopic blood cell images in total, including 744 EO, 2427 L, 561 M, 6231 N and 212 B for training images and the 2660 N, 234 M, 1034 L, 322 EO and 89 B for testing images. Information on blood cell type and sample images for both datasets is given in Table 2. Also, representative images for blood cell types are given in Fig. 5 for 8 blood cell types/classes, in Fig. 6 for BCCD and in Fig. 7 for Raabin-WBC, respectively.

Table 2 Classes and number of images of datasets used in the proposed method
Fig. 5
figure 5

Image samples from dataset consisting of 8 different blood cell types

Fig. 6
figure 6

Image samples from dataset consisting of 4 different blood cell types (BCCD dataset)

Fig. 7
figure 7

Image samples from dataset consisting of 5 different blood cell types (Raabin-WBC dataset)

3.5 Proposed multibranch lightweight CNN method

In this study, a multibranch lightweight CNN method is suggested for classification of microscopic PBC images. The proposed method includes 3 parallel methods as shown in Fig. 8: (1) Inception module (IM), (2) depthwise squeeze-and-excitation (DSE) block, and (3) pyramid pooling module (PPM). Owing to the IM, (1) features at different scales are extracted from the input blood cell images by using different convolution kernel sizes, (2) using \(1\times 1\) convolution, cross-channel models that contribute to the public feature extraction (FE) abilities of the network are learned. This ensures high accuracy profits in the neural network, (3) By using multiple convolution layers, the module is enabled to benefit from multipath FE. Using multiple features with the multi-convolution layer increases the performance of the network. Thanks to the DSE block, which is the combination of the DSC layer and the SE block, the classification performance increases with the effective use of low-level features without increasing the total number of trainable parameters. The PPM module is combined into the multibranch lightweight CNN method to capture dissimilar scales of global contextual information.

Fig. 8
figure 8

Proposed method

The process steps of the proposed method are as follows.

Step 1: Before applying the proposed DL-based method to PBC images, the images in all datasets were resized to \(128\times 128\) pixels.

Step 2: Our proposed method primarily applies 2D convolution consisting of \(3\times 3\) kernel size and 64 filters to the blood cell image. Then, maxpooling (\(3\times 3\) kernel size), 2D convolution consisting of \(3\times 3\) kernel size and 128 filters, and 2D convolution consisting of \(1\times 1\) kernel size and 128 filters are applied, respectively.

Step 3: After these processes, methods with different structures (Inception module (IM), depthwise squeeze-and-excitation (DSE) block, and pyramid pooling module (PPM)) are applied to the feature map obtained. These structures consist of 3 branches parallel to each other. The aim of using a multibranched structure in the multibranch lightweight CNN is to enrich the features extracted from PBC images and increase classification performance.

Step 4: The first branch contains the 2D IM. The 2D IM consists of maxpooling and 2D convolution layers. This module structure is given in Fig. 1. In addition, a detailed summary of the layers of this module used in the study is given in Table 1. The second branch contains the DSE block module. Before the input feature map is given to the DSE block, firstly, a 2D convolution operation consisting of 128 filters with a size of \(3\times 3\) kernels is applied. Then, the obtained feature map is given as input to the DSE block. In this block, firstly, \(3\times 3\) DC and \(1\times 1\) PC are implemented to the input image. The feature map acquired after DC and PC is given to the input of the SE block. The use of the SE block increases the classification performance of the networks by slightly increasing the system cost. The SE block is given in Fig. 3. The third branch consists of the PPM. The structure of this module is given in Fig. 4.

Step 5: The feature maps acquired as a result of the processes in the three branches are concatenated. 2D convolution consisting of \(3\times 3\) kernel size and 64 filters, maxpooling (\(3\times 3\) kernel size), 2D convolution consisting of \(3\times 3\) kernel size and 128 filters, 1 × 1 kernel size and 2D convolution consisting of 128 filters were applied to the concatenated feature map, respectively.

Step 6: Afterward, the global average pooling (GAP) is applied. GAP is a pooling process designed to replace FC layers in standard CNNs. With GAP, a feature map is generated for each corresponding category of the classification task in the last layer. Instead of adding FC layers on top of the feature maps, each feature map is averaged and the resulting vector is transferred directly to the softmax layer. In addition, the advantage of using GAP in the proposed method is that there is no parameter to be optimized in the GAP and thus overfitting is prevented in this layer. The output of the GAP is given to a softmax function to classify features and predict microscopic peripheral blood cell images. However, before softmax, batch normalization (BN) is applied to streamline and speed up the training process. Then, a dropout layer of 0.5 is applied in the network to prevent overfitting. Finally, softmax assigns probabilities to each class and the sum of these probabilities equals one. Detailed information about the multibranch lightweight CNN method is shown in Table 3. When Table 3 is examined, the total number of parameters obtained with the multibranch lightweight CNN method for the dataset consisting of 4 classes is 1.732.949. The total number of trainable parameters is 1.732.693.

Table 3 Model summary of the multibranch lightweight CNN method (for 4 classes)

4 Analysis of experimental results

Many experimental studies performed to analyze the classification accuracy of the multibranch lightweight CNN architecture in detail. These experimental studies are given in this section. In the continuation of the section, first of all, parameter settings are detailed. Then, the classification performance results obtained as a result of the experiments acquired on both datasets of the proposed method are given. Finally, comparisons were made with similar studies in the literature.

4.1 Parameter settings

We employ a specific set of hyperparameters to train the model using the Keras and TensorFlow library on the Kaggle environment. Experiments for both datasets were performed with TPU VM v3-8, which is a hardware accelerator in the Kaggle environment. Overall, we expect that the use of hyperparameters, optimizers, and callbacks in combination with Keras-TensorFlow and the Kaggle environment will enable us to obtain state-of-the-art results with our multibranch lightweight CNN architecture. The hyperparameters we use include batch size, image size, train-test-validation split, number of epochs. We utilize a batch size of 128, an image size of \(128\times 128\), and a train-test-validation split of %80–%10–%10 to train our architecture. Additionally, we utilize train the model for 100 epochs. We also employ the Adam optimizer to minimize the loss function and optimize the model. In addition to the hyperparameters, we use two special callbacks to optimize the training process. The first callback is the ReduceLROnPlateau callback, which is used to decrease the learning rate when the validation loss stops improving. This helps to stabilize the training process and avoid overfitting. In this callback, 0.000001 is taken as the lower limit of the learning rate (min_learning_rate). In addition, the factor value that will reduce the learning rate is 0.3. The second callback is the ModelCheckpoint callback, which is used to save the model weights at certain intervals during training. This allows us to save the best model based on validation accuracy and load it for future use.

4.2 Evaluation metrics

The proposed multibranch lightweight CNN architecture was analyzed on the three different WBC dataset. The efficiency of the multibranch lightweight CNN was determined using evaluation metrics such as precision, F1-score, recall and classification accuracy. Evaluation metric provide a quantitative and objective measure of the effectiveness of a model’s predictions and are essential for evaluating its performance and recognizing areas for improvement. These metrics provide distinct perspectives on the model’s performance, with each having its own unique strengths and limitations. A detailed explanation of these metrics is presented below. Accuracy (Eq. 5), a fundamental evaluation metric, quantifies the percentage of correct predictions generated by the method. This metric is computed by dividing the number of accurate predictions by the total number of predictions made. Precision (Eq. 6), a metric that gauges the proportion of true positives (TP) in all the positive predictions made by the method, is computed by dividing the number of TP by the sum of TP and false positives (FP). Recall (Eq. 7), a metric that measures the proportion of TP among all the actual positive samples in the dataset, is calculated by dividing the number of TP by the sum of TP and false negatives (FN). The F1 score (Eq. 8), a harmonic mean of recall and precision, is an indispensable metric for balancing precision and recall, particularly in cases where the classes are imbalanced. It provides a single score that captures both precision and recall, rendering it a potent metric for overall model performance evaluation [57].

$$ {\text{Accuracy}} = \frac{{{\text{TP}}\;{ + }\;{\text{TN}}}}{{{\text{TP}}\;{ + }\;{\text{FP}}\;{ + }\;{\text{TN}}\;{ + }\;{\text{FN}}}} $$
(5)
$$ {\text{Precision}} = \frac{{{\text{TP}}}}{{{\text{TP}}\;{ + }\;{\text{FP}}}} $$
(6)
$$ Recall = \frac{TP}{{TP + FN}} $$
(7)
$$ F1 - {\text{score}} = 2 \times \frac{{{\text{Precision }} \times {\text{ Recall}}}}{{{\text{Precision}}\;{ + }\;{\text{Recall}}}} $$
(8)

True negatives (TN), false negatives (FN), false positives (FP) and true positives (TP) values in Eq. (5), (6), (7) and (8) are obtained from the confusion matrix. These values are as follows: number of correctly identified WBC types: TP, number of WBC correctly distinguished as not the target WBC types: TN, number of incorrectly identified WBC types: FN, number of WBC incorrectly distinguished as not the target WBC types: FP.

4.3 Experimental results

Confusion matrices for datasets containing both 4 classes and 8 classes are given in Tables 4 and 5, respectively. Based on the confusion matrix in Table 4, it appears that all 315 eosinophil images were predicted correctly. Similarly, 293 of the 294 lymphocyte images, all of 297 monocyte and 338 neutrophil images appear to be predicted successfully. Table 4 shows that one prediction incorrectly classified lymphocytes as neutrophils. Considering Table 5, only 1 image (as eosinophil) out of 121 basophil images was incorrectly predicted. Similarly, only 1 image (as neutrophil) out of 324 eosinophil images appeared to be predicted incorrectly. When other classes were examined, 155 of 156 erythroblast images, 289 out of 293 IG images, all 114 lymphocyte images, 125 out of 129 monocyte images, 311 out of 319 neutrophil images, all 253 platelet images were successfully predicted.

Table 4 Confusion matrix obtained for the BCCD dataset consisting of 4 classes
Table 5 Confusion matrix obtained for the dataset consisting of 8 classes

The F1-score, recall, precision and accuracy values of the multibranch lightweight CNN architecture according to each WBC types, as well as the TP, TN, FN and FP values of the proposed method for the BCCD dataset containing 4 classes are shown in Table 6. According to Table 6, it is seen that eosinophil and monocyte images are classified 100% correctly, and lymphocyte and neutrophil images are 99.92% correctly classified. Eosinophils from four cell types achieved 100% accuracy, recall, precision and F1-score. Lymphocytes achieved 99.92% accuracy, 99.83% F1-score, 99.66% recall and 100% precision. Monocytes achieved 100% accuracy, recall, F1-score and precision. Finally, Neutrophils achieved 99.92% accuracy, 100% recall, 99.70% precision and 99.85% F1-score. Considering all evaluation criteria, monocytes and eosinophils have the highest precision, F1-score, accuracy and recall. The macro average classification accuracy of these four cell types is 99.96%, the precision value is 99.925%, the recall value is 99.915%, and the F1-score value is 99.92%. Macro-averaged precision, accuracy, F1-score and recall values are calculated using the arithmetic mean of all precision, accuracy, recall, and F1-score values per class.

Table 6 Performance metrics for the our multibranch lightweight CNN (for dataset consisting of 4 classes)

The precision, accuracy, F1-score and recall values of the multibranch lightweight CNN architecture according to each WBC types, as well as the TP, TN, FN and FP values of the proposed method for the dataset containing 8 classes are given in Table 7. According to Table 7, the precision, F1-score, recall and accuracy values for Basophil are as follows: 100%, 99.58%, 99.17% and 99.94%, respectively. The precision, F1-score, recall and accuracy values for Eosinophil are as follows: 99.69%, 99.69%, 99.69% and 99.88%, respectively. The precision, F1-score, recall and accuracy values for Erythroblast are as follows: 99.36%, 99.36%, 99.36% and 99.88%, respectively. The precision, F1-score, recall and accuracy values for IG are as follows: 97.31%, 97.97%, 98.63% and 99.3%, respectively. The precision, F1-score, recall and accuracy values for Lymphocyte are as follows: 97.44%, 98.70%, 100% and 99.82%, respectively. The precision, F1-score, recall and accuracy values for Monocyte are as follows: 99.21%, 98.04%, 96.9% and 99.71%, respectively. The precision, F1-score, recall and accuracy values for Neutrophil are as follows: 98.42%, 97.95%, 97.49% and 99.24%, respectively. The precision, F1-score, recall and accuracy values for Platelet are as follows: 100%, 100%, 100% and 100%, respectively. According to all the evaluation criteria in Table 7, the best result was found in the Platelet class with 100%. When the macro average of all classes is taken, it is seen that 99.72% overall accuracy, 98.91% F1-score, 98.91% recall and 98.93% precision values are obtained.

Table 7 Performance metrics for the our multibranch lightweight CNN (for dataset consisting of 8 classes)

Another dataset used in the experimental studies is the Raabin WBC dataset containing 5 classes. The confusion matrix obtained as a result of the experimental studies performed on this dataset with the proposed method is given in Table 8. Based on the confusion matrix in Table 8, it appears that all 32 basophil images were predicted correctly. When other classes were examined, 114 of 122 eosinophil images, 335 out of 340 lymphocyte images, 66 out of 73 monocyte images and 876 out of 884 neutrophil images were successfully predicted. The F1-score, recall, precision and accuracy values of the multibranch lightweight CNN architecture according to each WBC types, as well as the TP, TN, FN and FP values of the proposed method for the Raabin WBC dataset containing 5 classes are shown in Table 9. According to Table 9, the precision, F1-score, recall and accuracy values for Basophil are as follows: 100%, 100%, 100% and 100%. The precision, F1-score, recall and accuracy values for Eosinophil are as follows: 95%, 94.21%, 93.44% and 99.03%, respectively. The precision, F1-score, recall and accuracy values for Lymphocyte are as follows: 97.67%, 98.10%, 98.53% and 99.09%, respectively. The precision, F1-score, recall and accuracy values for Monocyte are as follows: 94.29%, 92.31%, 90.41% and 99.23%, respectively. The precision, F1-score, recall and accuracy values for Neutrophil are as follows: 98.87%, 98.98%, 99.10% and 98.75%, respectively. According to all the evaluation criteria in Table 9, the best result was found in the Basophil class with 100%. When the macro average of all classes is taken, it is seen that 99.22% overall accuracy, 96.72% F1-score, 96.30% recall and 97.17% precision values are obtained.

Table 8 Confusion matrix obtained for the Raabin-WBC dataset consisting of 5 classes
Table 9 Performance metrics for the our multibranch lightweight CNN (for Raabin-WBC dataset consisting of 5 classes)

Comparison of the our multibranch lightweight CNN architecture with different methods in the literature is given in Tables 10, 11, 12 and 13. Comparisons were made by taking the macroaverage values of the evaluation criteria calculated for each type of WBC in all methods. The proposed method has 99.96% accuracy, average 99.92% F1-score, recall and precision values for a BCCD dataset containing 4 classes. Similarly, for a dataset containing 8 classes, it has 99.72% accuracy, an average of 99% F1-score, recall and precision values. In addition, it has 99.22% accuracy, 97.17% precision, 96.30% recall and 96.72% F1-score values as a result of experimental studies on the Raabin WBC dataset containing 5 classes. It is seen that the our multibranch lightweight CNN architecture for three datasets gives better results than other CNN-based architectures. The closest result to the our multibranch lightweight CNN was obtained with 99.8% for the BCCD dataset containing 4 classes using the proposed ResNet + Inception method by Habibzadeh et al. [40]. Among the other methods, the closest results to the our multibranch lightweight CNN are Çınar et al. [39] with 99.7% accuracy, Bayat et al. [50] with 99.69% accuracy, Banik et al. [48] with 99.42% accuracy, and Khan et al. [38] with 99.12% accuracy. The worst classification accuracy result obtained using the 4-class dataset was found by Liang et al. [36] with 90.79%. Using the dataset containing 8 classes among the methods used for comparison, Long et al. [23] achieved 99.3% classification accuracy with the BloodCaps (Capsule Network) method they developed. In addition, 94.65% accuracy result was found with the Nucleus segmentation algorithm + SVM method developed by Tavakoli et al. [68] in the Raabin WBC dataset containing 5 classes. Similarly, the classification accuracy results obtained with other studies using the Raabin WBC dataset are as follows. A deep learning framework by coupling the pre-trained ResNet and DenseNet with SCAM method developed by Chen et al. [69] achieved 98.71% accuracy. 98.33% and 98.83% accuracy values were found in the ViT-Base-16 and ConvNeXt-Tiny methods developed by Tsutsui et al. [70], respectively. While 98.86% accuracy was found with the MobileNetV3-Small method developed by Katar et al. [71], 98.00% accuracy was found with the hybrid model (YOLO and Detectron2) method developed by Akalin et al. [72]. When compared with recent studies in the literature using the Raabin WBC dataset, the effectiveness of the proposed method is seen with an accuracy of 99.22%.

Table 10 Comparison of the our multibranch lightweight CNN in WBC classification with different methods in the literature
Table 11 Comparison of the our multibranch lightweight CNN in WBC classification with different methods in the literature (continued)
Table 12 Comparison of the our multibranch lightweight CNN in WBC classification with different methods in the literature (continued)
Table 13 Comparison of the our multibranch lightweight CNN in WBC classification with different methods in the literature (continued)

In addition, comparisons were made with CNN-based methods such as AlexNet, ResNet18, VGG16, ResNet50, InceptionV3, DenseNet121, DenseNet201 and MobileNet to compare the classification accuracy results in all three datasets. All results are given in Table 14. In the BCCD dataset with 4 classes, AlexNet architecture gives the worst classification result with 99.20%. The best classification result is obtained with the proposed method with 99.96%. Among the other methods, classification accuracy is obtained 99.76% with ResNet18, 99.52% with VGG16, 99.84% with ResNet50-InceptionV3-DenseNet121, and 99.92% with DenseNet201-MobileNet. It is seen that the classification accuracy values obtained in the BCCD dataset are very close to each other. In the experimental studies performed on the Raabin WBC dataset containing 5 classes, AlexNet gives the worst classification result with 96.90%. The best classification result is obtained by the proposed method with 99.22%. Among the other methods, classification accuracy is obtained 98.55% with ResNet18, 97.73% with VGG16, 98.55% with ResNet50, 97.24% with InceptionV3, 98.76% with DenseNet121, 98.62% with DenseNet201 and 98.90% with MobileNet. It is clearly seen that the proposed method is more successful than all other methods on the Raabin WBC dataset. Finally, on a large-scale PBC dataset containing 8 classes, the our multibranch lightweight CNN acquired an classification accuracy of 99.72%, surpassing CNN methods such as ResNet50 (98.30%), DenseNet121 (99.01%), DenseNet201 (98.77%), MobileNet (98.60%), InceptionV3 (98.62%), ResNet-18 (98.48%), VGG16 (97.8%), AlexNet (96.96%) and BloodCaps (99.3%). In addition to this, it is seen that the number of trainable parameters is less with the proposed method in all three datasets.

Table 14 Accuracy results (%) and number of trainable parameters of the some methods used for comparison with the our multibranch lightweight CNN

4.4 Ablation analysis

Ablation analysis was performed to demonstrate the effectiveness of the fusion strategy used in the proposed method. The results of the ablation analysis are given in Table 15. The proposed method (Model 4) is a multibranch lightweight CNN method for classification of microscopic PBC images. This CNN method consists of Inception module, depthwise squeeze-and-excitation (DSE) block and pyramid pooling module. When Table 15 is examined, the classification accuracy results obtained with the proposed method (Model 4) are as follows: 99.96% with BCCD dataset containing 4 classes, 99.22% with Raabin WBC dataset containing 5 classes and 99.72% with PBC dataset containing 8 classes. The classification accuracy results obtained in Model 1, where only the Inception module is used, are as follows: 99.76% with BCCD dataset containing 4 classes, 98.14% with Raabin WBC dataset containing 5 classes and 98.71% with PBC dataset containing 8 classes. The classification accuracy results obtained in Model 2, where only the depthwise squeeze-and-excitation (DSE) block is used, are as follows: 99.60% with BCCD dataset containing 4 classes, 97.31% with Raabin WBC dataset containing 5 classes and 98.54% with PBC dataset containing 8 classes. The classification accuracy results obtained in Model 3, where only the Pyramid pooling module is used, are as follows: 99.84% with BCCD dataset containing 4 classes, 97.86% with Raabin WBC dataset containing 5 classes and 98.36% with PBC dataset containing 8 classes. When all model results in Table 15 are analyzed, it is seen that the results are low, especially in Raabin WBC and PBC data sets when the models are used separately. However, the best classification results were obtained in Model 4 where all models were used together.

Table 15 Ablation analysis

5 Conclusions and future prospects

In this paper, we proposed a novel CNN-based architecture (multibranch lightweight CNN) for classification of PBC. The proposed architecture consists of three branches parallel to each other. These branches include the Inception module, depthwise squeeze-and-excitation block (DSEB), and pyramid pooling module (PPM). The proposed CNN method is a hybrid method consisting of the combination of these modules and is called the multibranch lightweight CNN method. With the use of Inception module, it is purposed to improve the efficiency and classification performance of CNNs by performing multiple parallel convolutions at different scales. DSEB offers a structure where the network can selectively learn about informative features and remove useless ones. This block requires almost no additional transaction costs. It can be easily added to any model due to its performance enhancing feature in classification tasks. PPM capture multi-scale contextual information from the input image by pooling features at multiple dissimilar scales. Finally, in the proposed method, the GAP layer is utilized instead of FC layers before the classification layer. The advantage of using this layer is that there is no parameter to optimize and thus overfitting is avoided in this layer. PBC, BCCD, Raabin WBC datasets were utilized to analysis the accuracy of the our multibranch lightweight CNN. According to the experimental studies, 99.96% accuracy in the BCCD, 99.22% accuracy in the Raabin WBC and 99.72% in the PBC was obtained. The our multibranch lightweight CNN has been compared with the CNN-based methods made in the literature in recent years and it has been seen that the our multibranch lightweight CNN gives better results. In addition, experiments were carried out with different CNN methods (ResNet50, DenseNet121, DenseNet201, MobileNet, InceptionV3, ResNet-18, VGG16, AlexNet and BloodCaps) on the datasets consisting of BCCD, Raabin WBC and PBC. The proposed method achieved better results with less trainable parameters. According to these results, it can be deduced that the our multibranch lightweight CNN can be used as an alternative method for clinical experiments, since it can accurately extract PBC features with high efficiency for PBC classification.

In future studies, (1) it is planned to test the proposed approach on different PBC datasets in real time. In addition, studies are being carried out on the development of an expert system so that hematologists can carry out their procedures in a shorter time and more effectively.