An Ecient Approach for Segmentation and Classication of Acute Lymphoblastic Leukemia via Optimized Spike-based Network

Identiﬁcation of uncontrolled accumulation of abnormal blood cells (lymphoblasts) considered to be a challenging task. Despite a wide variety of image processing and deep learning techniques, the task of extracting the features from Acute Lymphoblastic Leukemia (ALL) images and detection of ALL cells is still challenging and complex issue due to morphological variations in cells. In order to over-come these drawbacks, in this study, we proposed a new framework with a combination of spiking and residual network for the detection and classiﬁcation of lymphoblasts cells from healthy ones in blood sample images. According to this, features are extracted using a novel First-Spike-based approach, and then the Gaussian function is applied to remove the low-intensity edges. To reduce dimensional-ity, Principal Component Analysis (PCA) is used and ﬁnally, a developed deep residual architecture is employed to diag-nose the ALL blood cells from the reconstructed images. To show the effectiveness of the proposed model, it is evaluated on microscopic images of blood samples from ALL Images (ALL-IDB) and ISBI-2019 C-NMC dataset. The results show the superiority of the model to be an appropriate choice for future biomedical imaging tasks.


Introduction
Blood cells are often affected by various types of diseases, such as leukemia (blood cancer). Leukemia is perceived as a hematologic malignant disease that affects blood or bone marrow and can be defined as rising in the number of abnormal or irregular leukocytes which known as "blast cells" in blood [1]. Leukemia is categorized into four main classes: Acute Lymphoblastic Leukemia (ALL), Chronic Lymphoblastic Leukemia (CLL), Acute Myelogenous Leukemia (AML) and Chronic Myelogenous Leukemia (CML). The current research is focused on ALL, in which abnormal growth of immature leukocytes exacerbate the patient's situation [1,2]. Early detection of ALL is vital and has the potential to reduce cancer mortality. Recently, Computer-Aided Diagnosis (CAD) systems are used to help doctors in reading and analyzing ALL images and detect ALL cells. CAD systems are designed with a variety of image processing and computational intelligence techniques [3][4][5]. These CAD systems usually follow up some procedures such as: preprocessing, feature extraction, and classification. However, to get better results and have a reasonable classification, an efficient segmentation method can be used [5,6]. Many of the suggested techniques which have been proposed for leukemia detection, are based on classification of the two common types of leukemia: AML and ALL [2,5,[7][8][9][10][11][12][13][14][15][16]. Vogado et al. [5] proposed a transfer learning approach in order to extract the image features for classification. In their research, three stateof-the-art CNN architectures were tested and the features were selected according to their gain ratios and considered as input to the Support Vector Machine (SVM) classifier. In their study, the set of 4096 out of 12288 features were used for the classification task. They increased their accuracy to 99.76%. Negm et al. [4] proposed a decision support system that includes panel selection, segmentation using K-means clustering, feature extraction, and image refinement. The al-gorithm obtained an overall accuracy of 99.517%, a sensitivity of 99.348%, and specificity of 99.529%. In another research by Matek et al. [17], over 18000 compiled annotated images were utilized to train a convolutional neural network for leukocyte classification. They also have evaluated the network's performance by comparing to inter-and intra-expert variability. Many recent approaches were focused on feature extraction methods due to morphological variations in cells [18][19][20][21][22]. Sudha and Geetha [18] proposed a novel approach to segment leukocytes. In their research, they have counted the leukocyte region including the overlapped cells using the novel Gradient Circular Hough Transform (GCHT) method. The proposed segmentation approach was achieved high performance in terms of precision, recall, and f-measure. Loey et al. [23] proposed two automated classification models for 2820 blood microscopic images to detect leukemia using transfer learning. In the first part of their framework, features were extracted by AlexNet, a pre-trained deep convolutional neural network. In the second part, they fine-tuned AlexNet for both feature extraction and classification. According to their study, the highest performance was attained using the AlexNet model, in which they performed the classification on a set of 4096 features, and obtained 99.82% accuracy based on the Cross-Fold technique and 100% without it. In [13], the authors have studied two issues, White Blood Cells (WBC) location and sub-image segmentation. First, they used multiple windows obtained by scoring multiscale cues to locate the leukocytes, and second the GrabCut algorithm was iteratively run to segment the leukocytes and obtain more precise results. Sahlol et al. [24] proposed an improved hybrid approach to categorize the WBC leukemia. In their research, a pre-trained VGGNet architecture was used for feature extraction. For the selection of the most relevant features and removing highly correlated and noisy features, they applied a statistically enhanced Salp Swarm Algorithm (SESSA). Their proposed strategy, SESSA optimization, selected only 1K out of 25K features which were extracted with VGG-Net. Their research was implemented on two datasets of ALL-IDB and C-NMC, and attained the accuracy of 96.11% and 87.9%, respectively. Mohapatra et al. [25] proposed two novel shape features, Hausdorff Dimension and contour signature for classifying a lymphocytic cell nucleus. In their study, a total of 108 blood smear images were considered for feature extraction and then as an input to SVM for classification and final performance evaluation. They achieved an accuracy of 95%. Motivated by two famous deep learning networks, spiking and residual network, we propose a new framework for the detection and classification of lymphoblasts cells in blood images. The rest of this paper is organized as follows. The dataset and the proposed methods are presented in Sect. 2, The results are reported in Sect. 3. A discussion is presented in Sect. 4. Finally, we conclude the paper in Sect. 5.

Data description
In this paper, we used two different datasets. One was a microscopic image of blood samples from the ALL image database, namely ALL-IDB. It contains the blood samples provided by Labati et al. [26]. It has been used for detection [7,10,25], segmentation [1,2,18,27,28] and classification [2,4,5,29]. The images of this dataset have been captured with an optical laboratory microscope coupled with a Canon PowerShot G5 camera. The proposed dataset is covering microscopic images of blood samples in JPG format with a color depth of 24-bit, and a native resolution of 2592 * 1944. This dataset has two distinct versions (ALL-IDB1 and ALL-IDB2). The ALL-IDB1 dataset contains approximately 3900 blood elements, in which lymphocytes have been labeled by the expert oncologists. The quantity of candidates lymphoblasts present in the ALL-IDB1 is equal to 510. The lymphoblasts which completely represented in the image have been taken into consideration and classified. Fig. 1 illustrates two samples taken from ALL-IDB1. The second dataset was ISBI-2019 C-NMC [11][12][13]. It is consisting of a considerable number of labeled images of normal and malignant cells and was used for the classification of the B-ALL normal versus malignant cell at IEEE ISBI-2019 challenge. Fig. 2 demonstrates two blood samples taken from the C-NMC dataset.
The cell images were extracted from blood smear microscopy images after normalizing the stain. Dataset consists of 10661 images gathered from 76 subjects. 7,272 images (68%), are taken from 47 ALL patients and the rest are from 29 normal subjects. The detailed characteristics of these datasets are given in Table. 1.

Proposed edge location detection method
In the current study, we have used a novel feature extraction method which was motivated by Mozafari et al. [30] and Masquelier and Thorpe's model [31]. This method uses the First-Spike-based approach for extraction of features in blood samples images. First, the grayscale normalization was performed on the dataset to reduce the effect of illumination differences. Moreover, the model converges faster on [0,. . . ,1] data than on [0,. . . ,255], then it was followed by applying a series of transformations to convert an image into a Spike-wave tensor. In order to turn the images into spike latencies, a one-layer network was proposed to extracts the oriented edges from the gray scaled input images. To this end, the Gabor filter of four different orientations convolved the input images. Thus, the proposed layer contains four feature maps illustrating the saliency of the edges in a particularly preferred orientation. If we consider I as the gray scaled input image, G(⊗) a Gabor filter (convolution kernel) with the window size 4×4, wavelength 2.5, effective width 2, and orientation ⊗, then, the lth feature map of this layer is produced according the following equations: where ⊗ indicates the convolution operator and l ∈ {1, 2, 3, 4}.
In order to introduce invariance to image negative operation, the absolute value of the convolution is used. Because of the vertical and horizontal edges which are common in blood cell images, a π 8 offset is applied. The proposed network was used in an event-based manner, in which spikes were sorted by their latencies in the ascending order and propagated sequentially. To propagate spikes, we have used a 2-D grid of the same size containing dummy neurons for each feature maps [30]. On the next step, we have used the Gaussian Blur technique to remove the noise of images. Gaussian blurring is the result of blurring an image by a Gaussian function. The formula of a Gaussian function in one dimension is: It is a widely used in graphics software, typically to reduce image noise and reduce details. Because the noise is considered as high pass signal, so by the application of low pass filter the noise was restricted. Fig. 3 shows a sample of blood image before and after preprocessing. Normalization was performed on the dataset using the following equation: where x is the original feature vector,x is the mean of that feature vector, and σ is the standard deviation. Algorithm 1 illustrates the steps of the proposed edge location detection approach.
Algorithm 1: The proposed edge location detection model Input: f(x,y) → Blood Sample Images (ALL-IDB and C-NMC datasets).
Initializing the kernels parameters: Θ, ws, wl, ef , G(Θ) for each f(x,y) do 3 Transform the images into grayscale format. Transform the images into tensor. Add time dimension to the tensor. Convolve the images with defined kernels. Propagate spikes using the same size 2-D grid containing dummy neurons. Convert the obtained feature maps to spike latencies using intensity-to-latency coding scheme. 4 Performing Gaussian Blur operation to remove the noise of preprocessed images. Performing normalization.
Even though residual networks have a significant perfor- mance on many computer vision tasks, they are heavily reliant on big data to avoid over fitting [32]. Many of the applications do not have access to big data. In order to tackle this issue, data augmentation technique is used to increase the datasets' images by applying several transformations. In this study, the following transformations are used for data augmentation: the images are flipped horizontally, random width shift and height shift is performed by 10% along width and height of the images, random zoomed by 20% and random rotation of images by 30 degrees is also performed to increase the images. According to this, the number of images in the first dataset reached to a total of 1558 images, in which 809 images were labeled as unhealthy and 749 images considered healthy, and in the second dataset in respect to the imbalanced number of images in two classes of data, we increased the samples in the normal subjects from 3389 to 4200 and the number of images reached to a total of 11472 in which 8400 samples were randomly selected for the experiments (4200 unhealthy images + 4200 healthy images).
Principle Component Analysis (PCA) technique is used for the purpose of image dimensions reduction. In this technique, by identification of covariance, the desired dimensions are reduced. In the current study, the PCA technique was implemented on the gray scale images to reduce the dimensions down to 1200, and then the images were reconstructed using the reduced selected features with more than 99% variation. The same procedures were applied to the second dataset, in which the dimensions were reduced to 500 from 30K, and then the images were reconstructed using these selected features. The block diagram of the proposed preprocessing framework is shown in Fig. 4.

The proposed deep learning model
In this section, we developed a 31-layer 2D convolutional neural network for classification of Leukemia in blood slides. It takes a preprocessed blood slide image as input and output a probability indicating the presence or absence of Leukemia in blood slide. The model proposed here is based on the modified version of the residual learning techniques, which optimization is significantly easier and can lead to an effective training process.

Model architecture
The proposed model uses a 2D residual network (2D ResNet) architecture, which consists of 9 residual blocks in two types (after an initial 7*7 convolutional layer and 3*3 max pooling layer). There are two structures of residual blocks in the current model: one is the identity block: this block is the standard block using in ResNets, and relates to the case where the input activation has the same dimension of the output activation. In the proposed model we implemented a slightly more powerful version of this identity block, in which the skip connection "skips over" 3 hidden layers rather than 2 layers (Fig. 5). Structure of identity block consists of three main components: (I) 1*1 convolutional layer, 2D batch Normalization layer, a ReLU nonlinearity, (II) 3*3 convolutional layer, 2D batch Normalization layer, a ReLU nonlinearity, (III) 1*1 convolutional layer, 2D batch Normalization layer, a ReLU nonlinearity.
The second type of block is the convolutional block: the main path of these types of block is resembling to identity block with three main components, the most prominent feature of the block is using a 2D convolutional layer with 1*1 and 2D batch normalization layer to resize the input x to different dimension, so that the dimension matches up in the final addition needed to add the shortcut value back to the main path (Fig. 6).
After the 9 blocks (convolutional block, two identity blocks, convolutional block, two identity blocks, convolutional block, two identity blocks), global average pooling is applied, followed by a fully connect with two classes. Eventually a Softmax function is applied to output of this layer to obtain the final probability. Schematic diagram of the proposed model is illustrated in Fig. 7. The details and parameters of the different layers are given in Table. 2.
Algorithm 2 represents the training and evaluation steps to show how the procedures were performed. Select mini-batch from inputs and targets with the size of β. Forward propagation and compute the loss using µ. monitor the validation accuracy using callbacks, if there is no improvement reduce the µ by the specific factor. Back-propagation and update ω with Adam optimization. 5 Performance evaluation Report the training and validation results Fig. 7 The architecture of the proposed model.

Statistical methods
In order to study the performance of the proposed model to determine whether a microscopic image of blood sample contained lymphoblasts, we have used confusion matrix, and some commonly used performance metrics such as accuracy, sensitivity, specificity, precision and F-measure (F1). The definitions of these measures are as follows: Specif icity = TN TN + FP , P recision = TP TP + FP , where "TP" (true positive) refers to the unhealthy samples which correctly labeled positive, "TN" (true negative) refers to the healthy samples which correctly labeled negative, "FP" (false positive) refers to healthy samples which inaccurately labeled positive, "FN" refers to unhealthy samples which inaccurately labeled negative. Moreover, the area under curve (AUC) of receiving operating characteristic (ROC) has been taken into account to evaluate the model performance. ROC curve, is a graphical plot that illustrates the overall achievement of the model and it is created by plotting the true positive rate (TP) against the false positive rate (FP). The model's output probabilities were binarized by finding the cutoff probability. It was perceived as positive if the probability predicted by the model is higher than the model's cutoff probability, and negative otherwise. 95% confidence intervals were computed for the AUC using DeLong's method, and Wilson method was used for sensitivity, specificity and accuracy.

Implementation environment
The experiments were implemented on a computer running a windows operating system equipped with Intel Core i7 and accelerated by NVIDIA K80 GPUs. The proposed model was developed using Python programing language on the Anaconda distribution.

Results
In order to obtain a reliable model, test sets were randomly selected from the original samples before using data augmentation technique. In the first dataset (ALL-IDB), 22 samples were randomly selected as the test set. After augmenting the data, the remained 1536 blood sample images were divided into training set consisting of 1228 samples and the validation set consisting of 308 samples. In the second series of experiments on the C-NMC dataset, 6048 images were selected for training set, the validation set consisted of 672 samples and the holdout set consisted of 1680 samples. Fig. 8 represents the flow diagram of dataset selection. The proposed model consists of 489,922 parameters. We have used Adam optimizer with learning rate of 0.001 which was obtained from the linear attenuation strategy to update parameters in the network and the following cross-entropy is used as a loss function: where p is a vector of probabilities corresponding to k classes and y is a one-hot encoded vector of labels. To demonstrate our method's reliability, the performance was evaluated using 4-fold cross-validation procedure for binary classification problem in four independent runs. The model was trained at a total of 40 epochs (10 epochs for each fold). The initial values of different parameters in Algorithm 2 are shown in Table. 3. Fig. 9 shows the evaluation results of accuracy and loss for each fold during its training process on ALL-IDB dataset.  Fig. 9 Training curves for ALL-IDB dataset. On the holdout test set and validation set, the model reached an AUC of 1.0 and at its high-sensitivity operating point, it attained a sensitivity of 100% (CI 95% 0.70 1.00). In terms of specificity and accuracy, the proposed model reached 100% (CI 95% 0.851 1.0) and 100% (CI 95% 0.771, 1.0), respectively. The confusion matrix and the ROC curve of the model evaluation on the ALL-IDB holdout set are shown in Fig. 10.
We also provided a comprehensive evaluation of the proposed model on the validation set which contains a high amount of blood cell samples. In ALL-IDB dataset, 148 samples were considered as healthy, without any indication of blast cells, and 160 samples were selected as positive, include at least one blast cell. The experimental results were also repeated on the validation set. The proposed model obtained an accuracy of 100% (CI 95% 0.988, 1.000) mark. In terms of other criteria, the model attained a sensitivity of 100% (CI 95% 0.977, 1.000), and specificity of 100% (CI 95% 0.974, 1.000). The proposed model has also illustrated a substantial performance in terms of precision and f1-score, both with 100% mark. Table. 4 summarizes the ex-   dataset, the proposed model's performance is evaluated on C-NMC dataset. Fig. 11 shows the evaluation results of accuracy and loss for each fold during its training process on C-NMC dataset. On the holdout test set and validation set, it reached to an AUC of 0.9881 (CI 95% 0.9829, 0.9932) and 1.0, respectively. The confusion matrix and the ROC curve of the model evaluation on the C-NMC holdout set are shown in Fig. 12.
At its high-sensitivity operating point, the proposed model attained a sensitivity of 99.64% (CI 95% 0.9895, 0.9988). In terms of specificity and accuracy, the proposed model achieved 97.98% (CI 95% 0.9680, 0.9874) and 98.80% (CI 95% 0.9817, 0.9923), respectively. Table. 5 summarizes the experimental results obtained from the proposed model evaluation on the holdout and validation sets.

Discussion
In the current study, a hybrid strategy is proposed which targets a prominent issue in the field of deep learning, producing an accurate and highly sensitive model using the small set of features extracted from a small number of training data. It leads to reducing time consumption and computation resources. Experimental results shows that using the First-Spike approach for extraction of prominent features and combining it with several preprocessing techniques for normalization and noise reduction, employing PCA for reducing the dimensions from 150K to approximately 1K (ALL-IDB dataset) and 30K to 500 (C-NMC dataset), and then selection of deep features and classification using a modified version of well-known ResNet architecture, without any reduction in accuracy can be considered as a successful approach. Using a small dataset that contains 108 blood sample images in which 22 were retained for the holdout set for evaluation of proposed model's performance considered to be challenging task. Examining previous researches, one can see that to produce an accurate, highly sensitive (especially in the area of medical image analysis) and efficient model require a large amounts of training data. However, to meet this challenge, a well-known data augmentation technique was employed. Additionally, in order to illustrate the reliability of our approach, all the experiments were repeated to a second, independent and more recent dataset, the well-known C-NMC dataset. Experimental results obtained from the current study shows that our novel edge detection strategy can accurately identify the prominent edges in blood samples images which considered to be vital in the classification task. Enhancing the ResNet architecture by skipping over three convolutional layers positively affected the model's performance by reducing the training period, stronger training, and avoidance from over fitting issues. Furthermore, in order to demonstrate the reliability of the proposed model, the K-Fold cross-validation technique is used in which our proposed model showed a noticeable performance. Table. 6 illustrates a comparison of the proposed method with other approaches. Different features extraction and classification techniques with their performance are shown in Table. 6. As can be seen in the experimental results, our proposed approach attained the highest performance in terms of selected criteria compared to other stateof-the-art techniques. A comparison between previous studies and the current research reveal that using these approaches combine as a hybrid framework, improve the reliability of the proposed model in complex classification problems. The proposed approach leads to saving computational resources and simultaneously reducing the training period which can take days of training and enhancing the performance.

Conclusion
In this research, a hybrid classification framework is proposed for the identification of uncontrolled accumulation of abnormal blood cells in blood sample images. It is based on a novel First-Spike approach and PCA technique for feature extraction, dimensionally reduction, and improved ResNet architecture for deep feature selection and classification. The method performed very well in terms of different statistical measures. Our proposed framework managed to reduce the number of features from 150K to approximately 1200 in the ALL-IDB dataset and 30K to 500 in the C-NMC dataset and simultaneously improved the performance in the blood samples classification task. The results demonstrate the usefulness of the proposed hybrid network in a variety of image classification problems, and employment of this approach as a CAD system for health centers.

Compliance with ethical standards
Conflict of interest The authors declare that they have no conflict of interest.
Ethical approval This article does not contain any studies with human participants or animals performed by any of the authors.