Recognition of Different Types of Leukocytes Using YOLOv2 and Optimized Bag-of-Features

White blood cells (WBCs) protect human body against different types of infections including fungal, parasitic, viral, and bacterial. The detection of abnormal regions in WBCs is a difficult task. Therefore a method is proposed for the localization of WBCs based on YOLOv2-Nucleus-Cytoplasm, which contains darkNet-19 as a basenetwork of the YOLOv2 model. In this model features are extracted from LeakyReLU-18 of darkNet-19 and supplied as an input to the YOLOv2 model. The YOLOv2-Nucleus-Cytoplasm model localizes and classifies the WBCs with maximum score labels. It also localize the WBCs into the blast and non-blast cells. After localization, the bag-of-features are extracted and optimized by using particle swarm optimization(PSO). The improved feature vector is fed to classifiers i.e., optimized naïve Bayes (O-NB) & optimized discriminant analysis (O-DA) for WBCs classification. The experiments are performed on LISC, ALL-IDB1, and ALL-IDB2 datasets.


I. INTRODUCTION
White blood cell (WBC), also known as leukocyte/white corpuscle, is a component of blood that is motile and has a nucleus. Which provides the defense mechanism against infectious disease by attacking the infectious cells, ingesting the cellular debris, or producing antibodies [1].
Abnormal count of WBCs indicates a disease or a disorder, that is why it should not be overlooked or ignored [2]. An increased count of WBCs can be related to a disease, injury, or inflammation caused by bacterial infection [3]. The malignant tumor might increase WBCs count as well [4]. On the other side, the low count of WBCs is normally a long term consequence of radiotherapy and chemotherapy or indications of aplastic anemia, autoimmune diseases, or hematopoietic dysfunction [5]. Therefore, morphological structure, quantity, and the ratio of WBCs play a vital role in The associate editor coordinating the review of this manuscript and approving it for publication was Shuihua Wang . clinical diagnosis [6]. Detecting abnormal WBCs manually from blood smear images is a time consuming and tedious work [7]. Leukemia is a kind of blood cancer that begins usually inside the bone marrow and leads to abnormal growth of WBCs [8]. Globally around 2.3 million people have suffered from leukemia while 353,500 deaths occurred in 2015 [9]. New 437,033 leukemia cases are diagnosed and 309,006 deaths are occurred in 2018 [10]. While, 61,780 new cases and 22,840 deaths were expected in 2019 [11]. In the existing literature, most of the work is carried out to analyze the peripheral images of the blood cells, however; accurate detection of blood cells is still a great challenge [12]- [14]. Extensive research has been done on the detection of WBCs [15]. The classification is performed to discriminate cells with respective class labels, i.e., normal or abnormal [16]. Many segmentation techniques for leukocytes employ thresholding methods to segment the image into nuclei or cytoplasm regions [17]. K-mean clustering is employed to segment different types of leukocytes [18]. The HSV color space with Otsu's method is applied to segment blood cells [19]. Recently, owing to the significance of segmentation and classification phases, powerful and complex deep learning architectures are proposed [20]. Several deep learning methods to segment and classify the blood cells are proposed. However, limitations still exist in this domain owing to the variable size and shape of WBCs [21].
Therefore, in this manuscript, the notable contribution steps are mentioned as follows: • The YOLOv2-Nucleus-Cytoplasm model is presented, in which the darkNet-19 model is used as a base-network of the YOLOv2 architecture. In this model, features are extracted from the LeakyReLU-18 of darkNet-19 model & supplied to the YOLOv2 for localization.
• The bag-of-features (BoF) are extracted from blood smear images of WBCs. Then, particle swarm optimization is used for optimum feature selection, which is fed to optimized machine learning classifiers such as O-NB and O-DA.
The organization of the article is as. Section II reviews existing methodologies, Section III contains the presented methodology, and experiments/results are discussed in Section IV. Finally, conclusion & future work is provided in Section V.

II. RELATED WORK
In literature, the maximum techniques for blood cell localization [22], [23], segmentation and classification are based on thresholding [13], [24]- [35]. Thresholding methods cannot provide precise results if cells on the blood smear image are occluded with other cells. To solve this problem, different transforms are utilized such as distance transform and circular Hough transform [36], [37]. The distance transform provides precise results only when cells are adjacent to each other. However, the circular Hough transform detects the circularshaped inner portion of the leukocyte [38]. The sliding window is used to determine cell presence in the bounding box. However, this method is costly, and with a high false-positive rate [39].
Recently, conventional approaches are going to be replaced with the deep learning methodologies [40]. Inspired by the power of deep learning, several methods are presented for blood cell detection but still, there is a room for improvement. Regional (R-CNN) is used for the detection of different types of WBCs. The VGG16, Resnet50, GoogLeNet, and Alexnet are also used with full learning as well as transfer learning for WBCs classification [41]. The modified version of the capsule network is used for the detection of WBCs [42].
The YOLO model is used for the localization of WBCs [43]. Moreover, the cycle-consistent adversarial network is used for WBCs classification [44].
The WBCs nuclei provide help to classify the cell and diagnose the disease. In literature, extensive research is carried out for computational efficient WBCs detection based on the color and shape of the nuclei [19], [45]. The whole segmented region of WBC as well as its nucleus are further used to classify the different type of the cell. However, the localization of different types of WBCs is still a great challenge due to the different sizes, location, texture, and shape of WBCs [46]- [48].
The YOLO model is an efficient to detect an object in realtime imaging. This end to end model is trained to predict the location as well as classes of the objects using single network in less computational time. YOLOv2 is the enhanced version of the YOLO model owing to the addition of batch normalization in the convolutional layers which significantly improve the accuracy [49]. In contrast to the existing techniques, this work presents a new approach based on the YOLOv2-Nucleus-Cytoplasm model for the recognition of different types of WBCs with improved accuracy.

III. PROPOSED METHODOLOGY
There are two-phases of the proposed method. In phase-I, WBC localization is performed through the proposed YOLOv2-Nucleus-Cytoplasm model. Phase II is the classification of the blast/non-blast and different types of WBCs using Bag-of-Features (BoF). The best features are selected using a PSO. The overview of two-phase designed approach is shown in Figure 1.

A. LOCALIZATION OF WHITE BLOOD CELLS
Darknet deep learning models such as darknet-19 [50] are small having low power and latency parameters to fulfill the required tasks. These models use separable depth wise convolutions and provide discriminative features vectors for the detection and classification of required objects. In this work, the pre-trained darknet-19 and YOLOv2 [51] model are used for WBCs detection. The size of the input images with 300 × 300 × 3 is passed to the input layer. The feature extraction layer in the YOLOv2 model is effective when the height and width of the output feature vector are 8 and 16 times smaller than the height and width of the input layer, respectively [52]. YOLOv2-Nucleus-Cytoplasm model is designed to localize the different types of blood cells. In this network, YOLOv2 model takes the extracted features as input from LeakyReLU-18 layer of the darkNet-19 model The pre-trained darkNet-19 model consists of the 64 layers (i.e., 01 input, 19 convolutional, 18 batchnormalization, 18 LeakyReLU, 05 max-pooling, 01 global average max-pooling, 01 softmax, and 01 classification output). YOLOv2-Nucleus-Cytoplasm model is developed by using darkNet-19 as a base-network of the YOLOv2 model. In this model 60 layers of darkNet-19 such as 01 input, 018 convolutional, 018 batch-normalization, 018 leaky ReLU, and 05 max-pooling layers and 09 layers of YOLOv2 model such as 03 YOLOv2-Convolutional, 02 YOLOV2-batchnormalization, 02 YOLOv2 ReLU, 01 YOLOv2 transform, and 01 YOLOv2 output layers are used. The proposed model detect/localize the different types of WBCs with high confidence scores. The architecture of the YOLOv2-Nucleus-Cytoplasm is illustrated in Figure 2.   YOLOv2-Nucleus-Cytoplasm model detects object classes by using anchor boxes. The proposed model predicts three attributes for anchor boxes that are defined as follows: (i) Intersection over Union (IoU), (ii) offset, and (iii) class probability. IoU predicts the score of the objects across anchor boxes and the offset is used to refine the position of anchor boxes. While the class probability is computed to predict the corresponding class labels that are assigned to respective anchor boxes.
YOLOv2 model is trained to minimize the MSE loss among the predicted bounding boxes and ground truth labels. The loss function is defined as follows: where N shows grid cells and B shows bounding boxes per grid cell. W 1 , W 2 , W 3 , andW 4 denote weights to update the loss function using the YOLOv2 output layer.

B. CLASSIFICATION OF WBCs USING BAG-OF-FEATURES
BoF technique extracts features from textual data [53].
In which construction of visual vocabulary is needed. The visual vocabulary is constructed using speeded-up robust features (SURF) that represent the category of the class labels. The SURF detector is employed to increase the scale invariance. The bag-of-visual-words are used to detect blood cells instead of cell localization. The extracted SURF features are grouped into k clusters using k-mean clustering and k defines the visual vocabulary size. In other words, the visual vocabulary (also called dictionary) is constructed by minimizing the feature space using k-means clustering. Each feature is associated with a nearest visual word i.e., cluster centroid. The k-mean groups the feature descriptors into 500 clusters iteratively. The final clusters are separated and compact through the same characteristics as shown in Figure 3. In the features extraction process, the point features are selected utilizing a grid approach with [8 8] step size and block width of 32, 64, 96, and 128. The 80% strongest features are selected from each class. In BoF, the encoder method is utilized to count the occurrence of the visual words in an input image. It creates a histogram to represent the new image. The histogram encodes the image in a feature vector. The features are optimized through PSO and the best features are selected to create a final optimized feature vector. The final vector is supplied to the different classifiers for the classification of the WBCs. The whole process for feature extraction and selection is illustrated in Figure 4.

C. BEST FEATURES SELECTION USING PSO
PSO is a computational method that is used for the optimization of a problem [54]. Feature selection is a vital approach for data normalization. However, it becomes complex in a large search space. PSO is an evolutionary the method that provides optimization in large search space using global best and the personal best updating mechanism. In presented methodology, PSO parameters are listed in Table 1 to achieve best classification performance.
PSO removes redundant features and selects optimize feature vector length is 263 out of 500 features using selected personal and global learning coefficients that updated the optimized cost function as visualized in Figure 5.
In Figure 4, bag-of-features are extracted using SURF. The length of the original feature vector is 500, out of which 263 optimum features are selected by applying the PSO algorithm. The features space 1 × 500 is reduced to 1 × 263 using PSO which removed the redundant features.
The final optimized feature vector is selected with a minimum error rate and is supplied to optimized naive Bayes (O-NB) [55] and optimized discriminant analysis classifiers (O-DA) [56].

D. OPTIMIZED MACHINE LEARNING CLASSIFIERS
O-NB is a probabilistic classifier that finds the more probable prediction on the training input data and prediction on new data is performed based on the space of hypotheses. The conditional probability is computed using Bayes theorem.
O-DA is a statistical model that yields higher predictive accuracy. In this work, O-DA is employed to greater than zero dimension in which linear, quadratic, diagonal linear, and diagonal quadratic hyperparameters search range is used. The parameters used for selected classifiers are mentioned in Table 2.
In this work, two models are trained in 30 iterations using O-NB and O-DA. These models are trained using the Gaussian kernel along with Bayesian optimizer for  classification. These models take 70obs/sec and 780obs/sec prediction speed and 198.76 sec and 65.103 sec training time, respectively.

IV. EXPERIMENTAL RESULTS
In this research, two tests are completed to validate the proposed technique performance. In the first experiment, the model is trained to localize the whole region of WBCs.
The testing is performed on the trained model that draws the bounding box around the WBCs with predicted scores. In the second experiment, BoF are extracted for blood cell classification.
The experiments are performed on the benchmarks datasets LISC and ALL-IDB of WBCs.

A. EXPERIMENT#01 LOCALIZATION OF THE NUCLEUS AND THE CYTOPLASM
To localize the required region more precisely, the YOLOv2-Nucleus-Cytoplasm model is proposed. The configuration parameters of the proposed YOLOv2-Nucleus-Cytoplasm mentioned in Table 3.
The model training is graphically presented in Figure 6. The method localizes the nucleus and cytoplasm with the highest confidence score as presented in Figure 7 to 12.        basophils, eosinophil, lymphocyte, neutrophil, monocyte, and mixture images, respectively.
Localization results with confidence scores on the ALL-IDB dataset are shown in Figure 13-14. It achieves a maximum of 1.00 intersection of union (IoU) on monocyte and mixture of blood cells. Figure 13 shows localization of the blast cells with 0.95234, 0.9503, 0.94369, 0.93128 and 0.92589 confidence scores.
The designed approach outcomes are also computed in terms of IoU and listed in Table 4.

B. EXPERIMENT#02 CLASSIFICATION USING BOF
In this experiment, results are computed using BoF that is extracted from each input images as shown in Figure 15. The confusion matrix shows the classification results related to class labels in Figure 16.
Then, a suitable extracted feature vector is passed to two machine learning classifiers, i.e., O-NB and O-DA for white blood cell classification. Figure 17 shows the classification VOLUME 8, 2020  The classification results are computed through different measures such as precision, accuracy, and F1 scores. The experiment is performed on the ALL-IDB datasets for classification.    Table 4. The proposed method achieves 0.94 and 1.00 precision rate on blast and non-blast cells, respectively. Overall, 97% accuracy is obtained using O-NB. Whereas, 92.5% accuracy is achieved using O-DA classifiers as shown in Table 6. Similarly, classification outcomes on the ALL-IDB2 dataset are presented in Table 7-8. The O-NB classifier obtains 100% accuracy and the O-DA classifier achieves 94.5% accuracy, overall.
The classification results are depicted in Table 9. Table 9 demonstrates the comparison of the results with the existing approaches such as [62], [63]. The existing methods achieve 97.1 ACC on ALL-IDB1 and 98.6 ACC on ALL-IDB2 datasets, whereas the proposed method achieves 97.2 ACC, 100 ACC on ALL-IDB1-2 datasets, respectively. On ALL-IDB1-2 datasets, the O-NB classifier achieves maximum accuracy compared to the O-DA classifier.
The experimental evaluation shows that the suggested technique outperforms as compared with existing methods [62], [63] for the WBCs classification. The classification results of different types of WBCs as presented in Figure 18.
The numerical results are analyzed using two machine learning classifiers such as O-NB and O-DA as mentioned in Table 10-11. Table 10 shows classification results of five types of WBCs, in which 99.56% accuracy, 1.0 PRE, 0.38 REC,            [64]. Therefore, in this work DA achieves a better precision rate compared to NB with 98.98% accuracy.
The classification results using O-DA are shown in Table 11, in which O-DA achieves 100% accuracy on basophil and lymphocyte, and 99.47% on eosinophil and monocyte blood cells. The overall 99.47% accuracy is achieved using the O-DA model. The proposed models efficiently classify the different types of WBCs that are visually represented in Figure 19.
The results are compared with recent approaches [41] are mentioned in Table 12, on the same benchmark dataset. The detailed experimental results as well as a visual representation to localize the nuclei and cytoplasm are conducted.

V. CONCLUSION
This article presents a YOLOv2-Nucleus-Cytoplasm based method for WBCs localization using blood smear images. The presented model achieves IOU 0.9482, 0.9522, 0.9870, 0.9674, 0.9825, 1.00 on blast, basophil, eosinophil, lymphocyte, neutrophil, and monocyte respectively. The BoF are extracted which are optimized by using PSO for the classification of WBCs. The classification results are computed on two challenging datasets such as LISC and ALL-IDB. The method achieves maximum accuracy of 97.2% on ALL-IDB1, 100% on ALL-IDB2 using the O-NB classifier. While 99.5% accuracy is achieved using the O-DA classifier on the LISC dataset. The experimental results show that the O-NB classifier performed better on ALL-IDB1-2 datasets compared to the O-DA classifier. Whereas, on the LISC dataset, the O-DA classifier performed better than the O-NB classifier. In the future, this work further may be extended to use reinforcement learning to classify WBCs.

ACKNOWLEDGMENT
The work was supported by the Qatar National Library, Doha, Qatar. He is a member of leading professional organizations such as the DSI, SWDSI, ABIS, FBD, and EFMD. He is a reviewer of leading journals of his research field and also working as an editor of some journals.
MUHAMMAD SHERAZ ARSHAD MALIK received the Ph.D. degree from University TEKNOIOGI PETRONAS, Malaysia. He has industrial, research, and academia experience of more than ten years in various countries at various research and senior administration roles. He is currently working as an Assistant Professor with the Department of Information Technology, Government College University Faisalabad, Pakistan, where he is also the Chairman of the Department of Estate Care. His research interests include machine learning and human interaction, data visualization, big data, digital image processing, and artificial intelligence.
MUHAMMAD ALMAS ANJUM is a Professor with the College of Electrical and Mechanical Engineering, National University of Sciences and Technology (NUST), Pakistan. Apart from his more than 50 international publications in his research areas of specialization, he has authored a book Face Recognition a Challenge in Biometrics-Image Resolution Issues in Face Recognition. He has evaluated more than ten Ph.D. thesis. He has completed different projects around the globe. His research interests include pattern recognition, security systems (biometrics), and computer vision. He has been the Team Leader of establishing the Centre of Excellence Information Technology, College of E and ME, and served as its first pioneer head. He also designed and established a Centre of Innovation and Entrepreneurship at the College of E and ME. He has also served as the Dean for Faculty of Computer Sciences, University of Wah, and the Director for Research and Development at the College of E and ME, NUST. He is a reviewer/member of more than dozen international technical committees as well as he is the Executive Editor of the University of Wah Journal of Computer Science.
SEIFEDINE KADRY (Senior Member, IEEE) received the bachelor's degree in applied mathematics from Lebanese University in 1999, the M.S. degree in computation from Reims University, France, and the EPFL, Lausanne, in 2002, the Ph.D. degree from Blaise Pascal University, France, in 2007, and the Habilitation degree in engineering science from Rouen University in 2017. He is working as an Associate Professor with Beirut Arab University, Lebanon. His current research interests include education using technology, smart cities, system prognostics, stochastic systems, and probability and reliability analysis. He is a Fellow of the IET and ACSIT, and an ABET Program Evaluator. He is an Associate Editor of IEEE ACCESS journal. VOLUME 8, 2020