White Blood Cell Classification Using Convolutional Neural Network 2019
White Blood Cell Classification Using Convolutional Neural Network 2019
Contents
Abstract The density of white blood cells in bloodstream provides a glimpse into the
state of the immune system and any potential risks such as heart disease or infection.
A dramatic change in the white blood cell count relative to your baseline is generally
a sign that your body is currently being affected by an antigen. A variation in a
specific type of white blood cell generally correlates with a specific type of antigen.
Currently, a manual approach is followed for white blood cell classification; however,
some semi-automated approaches have been proposed which involves manual feature
extraction and selection and an automated classification using microscopic blood
smear images. In this work, we propose deep learning methodology to automate
the entire process using convolutional neural networks for a binary class with an
accuracy of 96% as well as multiclass classification with an accuracy of 87%.
White blood cell classification [1–3] deals with two objectives: first, given a stained
image of a white blood cell, classify it as either polynuclear or mononuclear. Note
that Eosinophils and Neutrophils are polynuclear while Lymphocytes and Monocytes
are mononuclear [4]. Second, given a stained image of a white blood cell, classify
it as Eosinophils and Neutrophils, Lymphocytes and Monocytes. White blood cells
can be distinguished from other cells due to the presence of nucleus . WBCs can be
further identified into different types from their nuclear structure.
2 Literature Review
We have used BCCD Dataset [11]. The dataset consists of 352 microscopic images
of dyed white blood cells. White blood cells (also known as Leukocytes) can be
easily distinguished from other types of blood cells due to the presence of nucleus.
Each image is of size 640 × 480 and is in following distribution: 21 Monocyte, 33
Lymphocyte, 207 Neutrophil, 88 Eosinophil, 3 Basophil. The preprocessing was
done in three stages: (1) dataset balancing and image augmentation, (2) downsizing
image (Tables 1 and 2).
White Blood Cell Classification Using Convolutional Neural Network 137
Since the original dataset was not balanced and images in each class were not suf-
ficient for training, additional images were derived from the original images using
operations such as rotation(the images are rotated by 90◦ , 180◦ and 270◦ ), flip (the
images are flipped along the horizontal axis and the vertical axis using opencv) and
shear (the images are sheared at 30◦ both vertically and horizontally). The dataset size
increased from 352 images to 12,444 images after the application of these operations.
Each class had 3100 images approximately, thus balancing the dataset.
The images were original of the size 640 × 480. These were downsized to a size of
120 × 160 in order to reduce the computational time in training as well as testing.
4 Methodology Used
Convolutional neural network [12] or CNN is a special type of deep neural networks
that deal with the phenomena such as localization of the receptive field in high volume
data, copying of weights forward as well as image sub-sampling using various kernels
in each convolution layer. Convolution is a mathematical operation that employs
feature extraction over the image.
138 M. Sharma et al.
LeNet [13] architecture was used primarily. This section describes in more detail
the architecture of LeNet-5, the convolutional NN used in the experiments. LeNet-
5 comprises seven layers, not counting the input, all of which contain trainable
parameters (weights) [13]. The input is a 120 × 160 pixel image. The pixel values
are normalized with respect to 255, and hence, black is associated with a pixel value
of 0 and white is associated with a pixel value of 1 (Figs. 1 and 2).
White Blood Cell Classification Using Convolutional Neural Network 139
Fig. 2 Training and testing loss graphs for the best results so obtained in binary and multiclass
classification
InceptionV3 [15] gets rid of the linear convolutions that are the bread and butter
of CNNs and instead connects convolutional layers through multi-layer perceptrons
that can learn nonlinear functions. These perceptrons are mathematically equivalent
to 1 × 1 convolutions and thus fit neatly within the CNN framework. InceptionV3
adopts convolution factorization and improved normalization.
140 M. Sharma et al.
Xception [16] is an extension of the Inception architecture which replaces the stan-
dard Inception modules with depthwise separable convolutions.
5 Experimental Implementation
As part of dataset collection, 352 microscopic images of dyed white blood cells from
BCCD Dataset [11] were collected. These files were then rotated, flipped and sheared
along with image augmentation to increase the size of dataset to 12,444 images with
approximately 3100 images of each white blood cell type. The dataset consists of
images of size 640 × 480 which are then resized to 120 × 160 for faster computation.
For multiclass classification, 9957 images (2470 of each class approximately) were
used for training while 2487 images (620 images of each class approximately) were
used for testing purpose. For binary classification, 9957 images (4961 images of
each class approximately) were used for training while 2487 (1240 images of each
class approximately) were used for testing purpose. LeNet-5 [13] architecture was
implemented for both binary and multiclass classifications. String labels of each
white blood cell type are encoded using one hot encoding. Binary cross entropy was
used for binary class classification of polynuclear and mononuclear white blood cells.
Categorical Cross entropy was used for classification into Lymphocyte, Monocyte,
Eosinophil or Neutrophil. A batch size of 32 images were used. The models were
implemented and executed using the Keras wrappers with Tensorflow framework as
the backend to run the models on the Nvidia GTX960M GPU. Each of the models was
trained using the RMSprop optimizer, and a suitable dropout was used to maintain a
strong resistance to overfitting. The mean squared error function is used for designing
the loss function for all the models.
Additionally, Transfer learning using VGGNet [14], InceptionV3 [15] and Xcep-
tionNet [16] was performed. The last 10% layers of these models were removed, and
a fully connected layer with number of neurons depending upon number of classes
was added and only the last layer was trained. This was done to compare results of
fine-tuning models with stand-alone Le-Net architecture described above.
6 Results
This section presents the results of the experiment using a LeNet inspired architecture
as well as a comparison with transfer learning-based models (Tables 3, 4, 5, 6, 7, 8
and 9).
White Blood Cell Classification Using Convolutional Neural Network 141
The current work is aimed at automating the feature extraction and selection process
along with the classification of white blood cell. A comparison with transfer learning-
based models as well as previous works has been made. Experimental results show
that the plain CNN architecture with seven layers shows better results than transfer
learning modules as well as other previous semi-automated works. Future work
can be done in accommodating medical images in transfer learning architecture to
improve results over a large database of several disease images and in a short time.
An unbalanced dataset [17] can also be accommodated in future using Breiman’s
random forest [18].
White Blood Cell Classification Using Convolutional Neural Network 143
References
1. S. Manik, L.M. Saini, N. Vadera, Counting and classification of white blood cell using Artificial
Neural Network (ANN), in IEEE International Conference on Power Electronics, Intelligent
Control and Energy Systems (ICPEICES), IEEE (2016)
2. J. Chung et al., Counting white blood cells from a blood smear using fourier ptychographic
microscopy. PloS one 10(7), e0133489 (2015)
3. M. Habibzadeh, A. Krzyak, T. Fevens, White Blood Cell Differential Counts Using Convo-
lutional Neural Networks for Low Resolution Images and Soft Computing (Springer, Berlin,
Heidelberg, 2013)
4. M. LaFleur-Brooks, Exploring medical language: a Student-Directed Approach (7th ed.). St.
Louis, Missouri, US: Mosby Elsevier. p. 398. ISBN 978-0-323-04950-4 (2008)
5. G. Ongun, et al., An automated differential blood count system. Engineering in Medicine and
Biology Society, in 2001 Proceedings of the 23rd Annual International Conference of the IEEE,
vol. 3. IEEE (2001)
6. W.-L. Tai et al., Blood cell image classification based on hierarchical SVM, in 2011 IEEE
International Symposium on Multimedia (ISM), IEEE (2011)
7. H. Ramoser, Leukocyte segmentation and SVM classification in blood smear images. Mach.
Graph. Vis. Int. J. 17(1), 187–200 (2008)
8. N. Theera-Umpon, S. Dhompongsa, Morphological granulometric features of nucleus in auto-
matic bone marrow white blood cell classification. IEEE Trans. Inf. Technol. Biomed. 11(3),
353–359 (2007)
9. I. Guyon, A. Elisseeff, An Introduction to Feature Extraction (Berlin, Heidelberg, Feature
extraction. Springer, 2006), pp. 1–25
10. S.J. Pan, Q. Yang, A survey on transfer learning. IEEE Trans. Knowl. Data Eng. 22(10), 1345–
1359 (2010)
11. GitHub - Shenggan/BCCD_Dataset: BCCD Dataset is a small-scale dataset for blood cells
detection. BCCD Dataset is under MIT licence. [Online]. Available: https://github.com/
Shenggan/BCCD_Dataset
12. Krizhevsky, A., I. Sutskever, G.E. Hinton. Imagenet classification with deep convolutional
neural networks. Adv. Neural Inf. Proc. Syst. (2012)
13. Y. LeCun et al., Gradient-based learning applied to document recognition. Proc. IEEE 86(11),
2278–2324 (1998)
14. K. Simonyan, A. Zisserman. Very deep convolutional networks for large-scale image recogni-
tion. arXiv preprint arXiv:1409.1556 (2014)
15. C. Szegedy, et al. Rethinking the inception architecture for computer vision, in Proceedings of
the IEEE Conference on Computer Vision and Pattern Recognition (2016)
16. J. Carreira, H. Madeira, J.G. Silva, Xception: a technique for the experimental evaluation of
dependability in modern computers. IEEE Trans. Softw. Eng. 24(2), 125–136 (1998)
17. N.V. Chawla, Data Mining for Imbalanced Datasets: An Overview. Data mining and knowledge
discovery handbook (Springer, Boston, MA, 2009), pp. 875–886
18. L. Breiman, Random forests. Mach. Learn. 45(1), 5–32 (2001)
19. I. Goodfellow et al., Deep Learning, vol. 1 (MIT press, Cambridge, 2016)
20. Agostinelli, F., et al., Learning activation functions to improve deep neural networks. arXiv
preprint arXiv:1412.6830 (2014)