<<

sensors

Article Deep-Learning Based Label-Free Classification of Activated and Inactivated for Rapid Immune State Monitoring

Xiwei Huang * , Jixuan Liu, Jiangfan Yao, Maoyu Wei, Wentao Han, Jin Chen and Lingling Sun

Key Laboratory of RF Circuits and Systems, Ministry of Education, Hangzhou Dianzi University, Hangzhou 310018, China; [email protected] (J.L.); [email protected] (J.Y.); [email protected] (M.W.); [email protected] (W.H.); [email protected] (J.C.); [email protected] (L.S.) * Correspondence: [email protected]

Abstract: The differential count of white cells (WBCs) is one widely used approach to assess the status of a patient’s . Currently, the main methods of differential WBC counting are manual counting and automatic instrument analysis with labeling preprocessing. But these two methods are complicated to operate and may interfere with the physiological states of cells. Therefore, we propose a deep learning-based method to perform label-free classification of three types of WBCs based on their morphologies to judge the activated or inactivated neutrophils. Over 90% accuracy was finally achieved by a pre-trained fine-tuning Resnet-50 network. This deep learning-based method for label-free WBC classification can tackle the problem of complex instrumental operation and interference of fluorescent labeling to the physiological states of the cells, which is promising for future point-of-care applications.

Keywords: label-free; white classification; deep learning; transfer learning;   activation; point-of-care

Citation: Huang, X.; Liu, J.; Yao, J.; Wei, M.; Han, W.; Chen, J.; Sun, L. Deep-Learning Based Label-Free 1. Introduction Classification of Activated and White blood cells (WBCs) are important immune cells in the human body, which are Inactivated Neutrophils for Rapid Immune State Monitoring. Sensors mainly involved in immune response and regulation of inflammation [1]. The three-type 2021, 21, 512. https://doi.org/ differential count of WBCs, i.e., , , and granulocyte, provides an 10.3390/s21020512 important indication for the diagnosis of many diseases, such as [2,3] and can- cers [4]. As the dominant fraction of granulocytes, neutrophils usually show an abnormal Received: 10 November 2020 change in the expected number when dealing with damaged tissues and unresolved infec- Accepted: 11 January 2021 tions [5]. The transition from an inactivated state to an activated state is a basic condition Published: 13 January 2021 for neutrophils to function as immune cells. Therefore, the rapid classification and counting for activated and inactivated neutrophils based on the three-type WBC classification can Publisher’s Note: MDPI stays neu- provide an important reference for human immune state monitoring. tral with regard to jurisdictional clai- Traditionally, the manual method of WBC classification and counting is carried out in ms in published maps and institutio- clinics or laboratories by well-trained professionals. They usually stain the WBCs’ nuclei nal affiliations. and then perform detection, classification, and counting according to the morphological difference of the nucleus [6]. However, there are some disadvantages to the manual method. First, the required manual operation by professionals [7] and the process is cumbersome. Manual classification of WBCs can cause errors, including sampling errors Copyright: © 2021 by the authors. Li- censee MDPI, Basel, Switzerland. or accuracy errors due to statistical probabilities. Second, the staining process may change This article is an open access article the physiological states of WBCs, which would cause changes in their morphologies. distributed under the terms and con- WBCs’ physiological states may be transformed from inactivated to activated so that ditions of the Creative Commons At- their morphological features will be different from the original ones. On the other hand, tribution (CC BY) license (https:// automated analysis equipment, such as the Coulter Counter and Flow Cytometer, is creativecommons.org/licenses/by/ also commonly used for classification, which is based on electrical characteristics or laser 4.0/).

Sensors 2021, 21, 512. https://doi.org/10.3390/s21020512 https://www.mdpi.com/journal/sensors Sensors 2021, 21, 512 2 of 14

scattering characteristics, respectively. The disadvantages of automated analysis equipment are the high cost of the instrument and low portability [8–10]. To tackle the deficiency of manual methods and automated analysis equipment, intelligent image processing methods are applied to WBC classifications. The basic principle of image processing is to obtain the characteristic information from the WBCs images and then classify them automatically. Image processing generally can be divided into the following steps: datasets generation, pretreatment, feature extraction, and classification [11]. In particular, the recent advance of deep learning techniques has provided many powerful image processing solutions. Since the advent of Alexnet in 2012 that refreshed the record of image classification [12], deep learning based blood cell image analysis has become a hot research topic [13]. For example, Qin et al. proposed one fine-grained WBC classification framework that can classify the stained WBCs into 40 sub-categories using a self-built deep learning network. The WBC sample needs to remove the red blood cells (RBCs) in the background and then segmented each WBC into a single frame [14]. In another work, M. S. Wibawa [15] applied a simple 5-layer deep learning Convolutional Neural Network (CNN) to classify stained WBC images into four categories and compared them with machine learning methods, namely Support Vector Machine (SVM), K-Nearest Neighbor (KNN), and Multi- Layer Perceptron (MLP) classifiers, to classify the feature values of WBCs, such as average brightness, entropy, kurtosis, etc. Zhao et al. extracted feature values through texture features then used the SVM classifier to divide stained WBCs into , , and others [16]. They finally used deep learning to extract the feature values of others and used the random forest method to classify them. However, WBC datasets in the above studies are all three-channel RGB images obtained after fluorescent staining. The staining materials affect the physiological state and morphology of WBCs, which would lead to inaccurate WBC classification. Furthermore, the WBC staining process impedes the rapid point-of-care (POC) detection application. To avoid the adverse effects of staining reagents on cell viability and cell signal transduction, label-free WBC classification is of great significance. So far, some label-free WBC classification work has been proposed in the literature and verified the feasibility of the label-free classification method. For example, Y. Li et al. proposed a lensless holographic imaging method to capture label-free WBC images and classify them based on machine learning [17]. They selected morphological features, such as cell ridge, cell diameter, etc., for holographic WBC images based on the analysis of variance (ANOVA). The over-fitting problem was reduced to a certain extent, and the feature values were classified and compared through different machine learning methods (SVM, random forest, etc.). Moreover, T.-F. Wua et al. used a microfluidic system to obtain the forward scattering of cells, and the different feature values of forwarding scattering were classified by SVM to achieve label-free classification [18]. The microfluidic system hardware facilities used in the article can obtain cell volume, membrane capacity, and optical properties of cells by measuring electrical signals, optical signals, etc., and the label-free automatic classification of cells can be performed based on these features. However, there are still challenges remaining for the existing label-free methods. First, since machine learning requires specific screening of the WBC biophysical features and manually selecting appropriate features as learning data through thresholds, the accuracy of feature selection may be limited for existing methods. Second, the existing label-free WBC classification system generally needs custom-designed hardware systems [17,18]. Using the commercially unavailable hardware to automatically classify cells is troublesome in the manufacturing process and may produce deviations due to the inaccurate manufacturing of microfluidic components. Therefore, this paper proposed a label-free WBC classification method based on deep learning to tackle the above-mentioned challenges. The novelty and contributions of our method compared with the existing label-free methods are as follows: Our label-free WBC images are directly captured by an off-the-shelf microscope when WBCs flow through a Sensors 2021, 21, x FOR PEER REVIEW 3 of 15

Sensors 2021, 21, 512 3 of 14 method compared with the existing label-free methods are as follows: Our label-free WBC images are directly captured by an off-the-shelf microscope when WBCs flow through a simple microfluidic channel and are used as training datasets for classification. No manual simple microfluidic channel and are used as training datasets for classification. No manual feature selection or complicated microfluidic device design is required. Considering that feature selection or complicated microfluidic device design is required. Considering that the feature extraction of label-free WBC images is different from fluorescently labeled the feature extraction of label-free WBC images is different from fluorescently labeled WBCs, Resent-50 with short connection structures was employed and trained to reach a WBCs, Resent-50 with short connection structures was employed and trained to reach a high accuracy of around 90%. Based on the deep transfer learning model, the classification high accuracy of around 90%. Based on the deep transfer learning model, the classification and counting of activated and inactivated neutrophils were further realized based on mor- and counting of activated and inactivated neutrophils were further realized based on phological features of aspect ratio and roundness. The proposed method enables highly morphological features of aspect ratio and roundness. The proposed method enables convenient and accurate WBC identification and minimizes the disturbance of the staining highly convenient and accurate WBC identification and minimizes the disturbance of the stainingprocess processto the WBCs. to the WBCs.Hence, Hence, it is promising it is promising for future for future label-free label-free and rapid and rapid immune immune state statemonitoring. monitoring.

2.2. MaterialsMaterials and and Methods Methods 2.1.2.1. WBCWBC Datasets Datasets Generation Generation AsAs thethe proportionproportion of RBCs in in the the whole whole bl bloodood is istoo too large large comp comparedared with with WBCs, WBCs, the theWBCs WBCs in whole in whole blood blood samples samples cannot cannot be bedirectly directly distinguished distinguished through through microscope microscope ob- observation.servation. Separating Separating WBCs WBCs from from RBCs RBCs is is an an essential essential step in generating WBCWBC datasets.datasets. ThisThis paper paper uses uses a a label-free label-free method method based based on on the the spiral spiral microfluidic microfluidic channel channel to to separate separate WBCs.WBCs. Compared Compared with with general general density density gradient gradient separation, separation, spiral spiral inertial inertial separation separation has has thethe advantages advantages of of high high throughput, throughput, fastfast processing,processing, lowlow cost,cost, and and portability, portability, and and it it can can alsoalso reduce reduce the the activation activation rate rate of of WBC WBCin in vitrovitroto to avoid avoid the the impactimpact onon thethe testtest resultsresults [[19].19]. AA more more detailed detailed spiral spiral microfluidic microfluidic channel channel discussion discussion is is beyond beyond the the scope scope of of this this article.article. WithWith spiral spiral microfluidics, microfluidics, the the WBCs WBCs were were separated separated from from peripheral peripheral blood blood samples samples that that werewere collected collected from from healthy healthy donors donors who who reported reported general general health health and and no no use use of of medical medical prescriptionsprescriptions inin thethe lastlast 2 2 weeks weeks before before enrollment enrollment and and were were purchased purchased from from Research Research BloodBlood Components,Components, LLCLLC (Boston,(Boston, MA,MA, USA).USA). TheThe separatedseparated WBCWBC werewerefluorescently fluorescently stained,stained, thenthen bright-fieldbright-field andand fluorescentfluorescent imagingimaging werewere sequentially sequentially performedperformed inin the the samesame field-of-viewfield-of-view area through through a a microscope microscope with with 100× 100 magnification× magnification objective objective lens. lens. Flu- Fluorescentorescent imaging imaging can can show show the the details details of ofWBC WBC nucleolus nucleolus features, features, and and they they are are used used to todistinguish distinguish the the actual actual type type of each of each correspon correspondingding bright-field bright-field WBC WBC image. image. Then Then the label- the label-freefree bright-field bright-field WBC WBC images images with known with known type were type used were to used form to the form training the training or testing or testingdatasets datasets for Resnet-50 for Resnet-50 model. model.The original The originalimage and image the fluorescence and the fluorescence label are labelshown are in shown in Figure1a,b. Figure 1a,b.

FigureFigure 1. 1.White White blood blood cells cells (WBC) (WBC) images images taken taken by by microscope microscope (a ()a bright-field) bright-field WBC WBC images, images, (b ()b the) correspondingthe corresponding fluorescent fluorescent WBC WBC images, images, (c–e) ( bright-fieldc–e) bright-field granulocyte, granulocyte, lymphocyte, lymphocyte, and monocyteand mon- ocyte images, (f–h) the corresponding fluorescent granulocyte, lymphocyte, and monocyte images. images, (f–h) the corresponding fluorescent granulocyte, lymphocyte, and monocyte images.

2.2. Datasets Preprocessing The preprocessing flow is shown in Figure2. This paper used the threshold segmen- tation method to achieve WBC and background segmentation. Threshold segmentation

Sensors 2021, 21, 512 4 of 14

Sensors 2021, 21, x FOR PEER REVIEWmethods are widely used in image analysis applications where a significant gap between5 of 15

the target and background pixel gray levels exist.

Datasets Separate WBC Original WBC Blood sample fluorescent generation WBCs & RBCs label images

Threshold Opening WBC images & segmentation closing segmentation Datasets preprocessing WBC images Manual Datasets filtration classification enhancement

Monocyte

Three-type WBC Input three Resnet-50 Lymphocyte classification parts of datasets

Granulocyte

Granulocyte Yes Inactivated Roundness>0.76 Convolution Activated & Inactivated filtering No No neutrophil classification Yes Proportion<1.2 Proportion Activated

Figure 2. Whole processing flowchart for WBC classification. Figure 2. Whole processing flowchart for WBC classification.

We employed the Otsu [20] method of adaptive threshold and obtained the threshold value in (1), 2 g = ω1∗ ω2 ∗ (µ1 − µ2) (1)

where g represents the final threshold value, ω1 represents the proportion of background pixels, ω2 represents the proportion of foreground pixels, µ1 represents the average grayscale value of the background, µ2 represents the average grayscale value of the foreground. After threshold segmentation, the open operation and close operation were performed on the WBC images to make the cell contour clear. Then the cell images were segmented after

determining the specific coordinates of the cell according to the cell contour. We screened the segmentedFigure 3. Examples WBC results of three-type to eliminate WBC images the cells in onthe thedatasets edges after or multiplesegmentation. adhesions to ensure that there was only one WBC in the center of an image, which is more favorable for the extraction2.3. Deep Neural of WBC Network feature Classifier values. After that, WBCs were classified manually according to their correspondingIn this paper, we fluorescent used WBC labels, image and datasets, finally, including three types 10,400 of WBCMonocytes, datasets 10,392 (granulo- Lym- cyte,phocytes, lymphocyte, and 10,266 monocyte) Granulocytes. were achieved. Among Amongthem, 80% them, of granulocytesthe WBC image include datasets basophil, were neutrophil,used as the and training eosinophil. set, while The 20% datasets were after used segmentation as the testing are set. shown The whole in Figure processing3. flow is shown in Figure 2. The Resnet-50 network was used in our task for transfer training [21], whose structure included two basic blocks, as shown in Figure 4. Resnet-50 network adds a residual unit through a short connection system. The advantages of joining the residual unit network are as follows: First, the training process connects the network characteristics of different layers. Using the globalization of the Resnet-50 network can better classify the label-free WBC images because they have more details than labeled WBC images, which typically only show the features of the nu- cleus. Second, the short connection mechanism can suppress phenomena, such as gradient disappearance, gradient explosion, overfitting, and network degradation. Resnet-50’s short connection makes it more “flexible” during training. The work can choose between “more convolution and nonlinear transformation” (connection) or “more inclined to do

Sensors 2021, 21, x FOR PEER REVIEW 5 of 15

Datasets Separate WBC Original WBC Blood sample fluorescent generation WBCs & RBCs label images

Threshold Opening WBC images & segmentation closing segmentation Datasets preprocessing WBC images Manual Datasets filtration classification enhancement

Monocyte

Three-type WBC Input three Resnet-50 Lymphocyte classification parts of datasets

Granulocyte

Granulocyte Yes Inactivated Roundness>0.76 Convolution Activated & Inactivated filtering No No neutrophil classification Yes Proportion<1.2 Proportion Activated

Sensors 2021, 21, 512 5 of 14

Figure 2. Whole processing flowchart for WBC classification.

Figure 3. Figure 3. ExamplesExamples ofof three-typethree-type WBCWBC imagesimages inin thethe datasetsdatasets afteraftersegmentation. segmentation.

2.3. DeepFrom Neural Table1 ,Network it can be Classifier seen that the number of various WBCs was unbalanced because the numberIn this paper, of WBCs we used in the WBC body image is unbalanced. datasets, including To improve 10,400 the , accuracy and10,392 reduce Lym- over-fitting,phocytes, and enhanced 10,266 Granulocytes. processing of Among different them, types 80% of WBCof the datasets WBC image is necessary. datasets Thiswere paperused as used the rotation training and set, flippingwhile 20% methods were used (other as methods the testing will set. affect The the whole details processing of WBCs) flow to amplifyis shown various in Figure types 2.of The cells Resnet-50 to about network 10,000. This was method used in will our produce task for a transfer black frame. training To reduce[21], whose the impact structure of the included black frame two basic on the blocks accuracy,, as shown we used in theFigure interpolation 4. Resnet-50 method network to enlargeadds a residual the cell picture. unit throug Afterh thea short rotation, connection we uniformly system. intercepted the 200 ∗ 200 picture withoutThe a advantages black frame. of Finally, joining the the numbers residual ofunit WBCs network used are after as the follows: balancing First, process the training was obtained,process connects as shown the in network Table1. characteristics of different layers. Using the globalization of the Resnet-50 network can better classify the label-free WBC images because they have Table 1. more detailsComparison than labeled of white WBC blood images, cells (WBC) which datasets typically before only and aftershow enhancement. the features of the nu- cleus.WBC Second, Type the short connection Monocyte mechanism can Lymphocyte suppress phenomena, Granulocyte such as gradient disappearance, gradient explosion, overfitting, and network degradation. Resnet-50’s Segmentation 211 444 1540 shortEnhancement connection makes it more 10,400 “flexible” during training. 10,392 The work can choose 10,266 between “more convolution and nonlinear transformation” (connection) or “more inclined to do 2.3. Deep Neural Network Classifier In this paper, we used WBC image datasets, including 10,400 Monocytes, 10,392

Lymphocytes, and 10,266 Granulocytes. Among them, 80% of the WBC image datasets were used as the training set, while 20% were used as the testing set. The whole processing flow is shown in Figure2. The Resnet-50 network was used in our task for transfer training [21], whose structure included two basic blocks, as shown in Figure4. Resnet-50 network adds a residual unit through a short connection system. The advantages of joining the residual unit network are as follows: First, the training process connects the network characteristics of different layers. Using the globalization of the Resnet-50 network can better classify the label-free WBC images because they have more details than labeled WBC images, which typically only show the features of the nucleus. Second, the short connection mechanism can suppress phenomena, such as gradient disappearance, gradient explosion, overfitting, and network degradation. Resnet- 50’s short connection makes it more “flexible” during training. The work can choose between “more convolution and nonlinear transformation” (connection) or “more inclined to do nothing” (skip), or a combination of both. “Flexible” Resnet-50 network structure can better adapt to the polymorphic label-free leukocytes. Previous work using this short connection also achieved a good effect on the feature extraction of WBC [14]. Third, the residual block in the Resnet-50 network can make the network easier to train and get better weight values. It relatively eliminates the parameters of each layer in the network so that the training speed becomes faster. Sensors 2021,, 21,, 512x FOR PEER REVIEW 76 of 15 14

Figure 4. DiagramDiagram of of Resnet-50 Resnet-50 neural neural network network with with Id Identityentity Block Block shown shown on on the the bottom bottom left left and and Conv Block shown on the bottom right.

2.4. ActivatedThere are and also Inactiva someted other Neutrophil typical Classification deep learning models, such as Inception V3 or Resent-101The neutrophils. Compared can with be theclassified Inception into V3acti modelvated withoutand inactivated short connection states based structures, on the cellthe shortmorphologies. connection Inactivated structure ofneutrophils Resnet-50 are is more spherical. suitable Once for featurethere is extractionbiochemical of label-stim- ulationfree WBCs. or mechanical Resnet-101 stimulation, and Resnet-50 there only will differ be obvious in the numbermorphological of layers. changes, Considering changing the number of datasets and only three classifications we selected, a complex classification model from round to worm (some contain synapses) and become activated. Consider the char- would cause overfitting and increase the training time. For label-free WBC classification, acteristics of the morphological changes of neutrophils after activation, we used the aspect too many layers in the model will cause overfitting. Therefore, the Resnet-50 network was ratio and roundness of the cell to distinguish between activated and inactivated neutro- selected as the WBC three-type classification in our study. phils. The aspect ratio is the ratio between length and width, as shown in (4), The Resnet-50 network and transfer learning were implemented through a pre-trained model under the TensorFlow framework. Training based𝑥 on pre-trained models will reduce Aspect Ratio = training time and prevent overfitting. The weight value𝑦 in the selected pre-training model(4) was close to the local optimal value. Therefore, the pre-training weight value can be kept wherein the highx represents gradient length range and in future y represents training width for effective (the longer adjustment. one has The a diameter last layer as of long the inpre-training the default model image, was and removed, the shorter and one the has remaining a wide diameter). parameters Roun weredness reloaded, is based then on the we ratiocontinued of the trainingmeasured with cell the area output to the of circ threeumference type classifications. to determine Thethe similarity original Resnet-50 between theis suitable cell and for the three-channel circle, as shown images. in (5), But the WBC images were single-channel grayscale images, so the datasets were superimposed to convert single-channel grayscale images to three-channel grayscale images. In the model,4 ∗ 𝜋 we ∗ added 𝑎𝑟𝑒𝑎 dropout and learning rate, Roundness = (5) decreasing optimization methods. The dropout𝑝𝑒𝑟𝑖𝑚𝑒𝑡𝑒𝑟 method can increase the sparsity of the model and reduce overfitting. The learning rate decreasing method will gradually reduce wherethe learning the area rate represents during training,the area of which the image, can reduce and the the perimeter training timerepresents and find the theperime- best terlearning of the rateimage. that maximizes the gradient descent effect. If the learning rate remains the

Sensors 2021, 21, 512 7 of 14

same, it may cause the loss value to stop decreasing without reaching the minimum. The gradient descent is a deep learning algorithm to continuously and iteratively update the model. The Root Mean Square Prop (RMSProp) algorithm was used in the model as an optimizer for gradient descent, and it solved the problem of excessive swing in the optimization loss and further accelerated the convergence speed [22]. We trained 2000 steps, set batch size to 256, dropout value to 0.5, and basic learning rate to 0.001. For every 100 steps, the learning rate dropped to 0.99 times the base learning rate. The activation function was Rectified Linear Unit (ReLU), and the objective function to be minimized was (2), ∗ min ω = arg ∑ L(yi, f (xi)) (2) ω i

The Loss value formula is shown in (3), where yi represents the label input by the model (real sample), xi represents the input of the model, f (xi) represents the predicted value of the model output, ω represents the weight value of the model, ω∗ represents the new weight value after the model has been updated.

M 1 1  L = ∑ Li = ∑ − ∑ yic log pic (3) N i N i c=1

In (3), M represents the number of categories, N represents the total sample size, yic represents the indicator variable. If the current category is the same as the sample i category, yic = 1; otherwise yic = 0. pic represents the predicted probability that sample i belongs to class sample c.

2.4. Activated and Inactivated Neutrophil Classification The neutrophils can be classified into activated and inactivated states based on the cell morphologies. Inactivated neutrophils are spherical. Once there is biochemical stimulation or mechanical stimulation, there will be obvious morphological changes, changing from round to worm (some contain synapses) and become activated. Consider the characteristics of the morphological changes of neutrophils after activation, we used the aspect ratio and roundness of the cell to distinguish between activated and inactivated neutrophils. The aspect ratio is the ratio between length and width, as shown in (4), x Aspect Ratio = (4) y

where x represents length and y represents width (the longer one has a diameter as long in the default image, and the shorter one has a wide diameter). Roundness is based on the ratio of the measured cell area to the circumference to determine the similarity between the cell and the circle, as shown in (5),

4 ∗ π ∗ area Roundness = (5) perimeter2

where the area represents the area of the image, and the perimeter represents the perimeter of the image. For inactivated neutrophils, aspect ratio and roundness are both close to 1 [5]. But activated neutrophils will be different from inactivated neutrophils in aspect ratio and roundness value. In this paper, when calculating the aspect ratio and roundness value of the cell, convolution filtering was performed on the WBC images. The convolution kernels used in convolution filtering were K1 and K2:

 −1 −1 −1   −1 0 1  K1 =  0 0 0 , K2 =  −1 0 1  1 1 1 −1 0 1 SensorsSensorsSensors 2021 2021 2021,, 21, 21,,, xx21, FORFORx, xFOR FOR PEERPEER PEER PEER REVIEWREVIEW REVIEW REVIEW 8 of8 8of15 of 15 15 SensorsSensorsSensors 2021 2021 2021,, 21, 21,, xx21, FORFORx, xFOR FOR PEERPEER PEER PEER REVIEWREVIEW REVIEW REVIEW 8 of8 8 of15 of 15 15 SensorsSensorsSensors 20212021 2021 2021,, 2121, 21,, xx21, FORFORx, xFOR FOR PEERPEER PEER PEER REVIEWREVIEW REVIEW REVIEW 88 ofof8 8 of 1515 of 15 15 SensorsSensorsSensors 2021 2021 2021,, 21, 21,, xx21, FORFORx, xFOR FOR PEERPEER PEER PEER REVIEWREVIEW REVIEW REVIEW 8 of8 8 of15 of 15 15

ForForFor inactivated i nactivatedinactivated neutrophils, neutrophils, neutrophils, aspect aspect aspect ratio ratio ratio an an dan droundnessd roundness roundness are are are both both both close close close to to 1to 1[5]. 1[5]. [5]. But But But ForForFor inactivated i nactivatedinactivated neutrophils, neutrophils, neutrophils, aspect aspect aspect ratio ratio ratio an an dan droundnessd roundness roundness are are are both both both close close close to to 1to 1[5]. 1[5]. [5]. But But But activatedactivatedactivatedForForFor i nactivated neutrophilsi nactivatedneutrophilsi nactivatedneutrophils neutrophils, willneutrophils, neutrophils,will will be be bedifferent different differentaspect aspect aspect from ratiofrom ratiofrom ratio inactivated inactivatedan inactivated an inactivateddan droundnessd roundness roundness neutrophilsneutrophils neutrophils neutrophils are are are both both both inin closein aspectaspectinclose closeaspect aspect to to 1ratioratioto 1ratio[5]. 1ratio[5]. [5]. andandBut andBut andBut activatedactivatedactivatedForForFor i nactivated neutrophilsi nactivatedneutrophilsi nactivatedneutrophils neutrophils, willneutrophils, neutrophils,will will be be bedifferent different differentaspect aspect aspect from ratiofrom ratiofrom ratio inactivated inactivatedan inactivated aninactivated dan droundnessd roundness roundness neutrophilsneutrophils neutrophils neutrophils are are are both both both inin closein aspectinaspectclose closeaspect aspect to to 1ratioratioto 1ratio[5]. 1ratio[5]. [5]. andandBut andBut andBut roundnessactivatedroundnessactivatedactivatedroundness neutrophils value.neutrophils value.neutrophils value. In In thisIn thiswill this will paper,will paper,be paper, be bedifferent whendifferent differentwhen when calcul fromcalcul calculfrom fromating inactivatedatinginactivated atinginactivated inactivated the the the aspect aspect aspect neutrophilsneutrophils neutrophils rationeutrophils ratio ratio and and and roundnessinin roundnessin aspectroundnessinaspect aspect aspect ratioratio valueratio ratiovalue value andand andof and of of roundnessactivatedactivatedroundnessroundnessactivated neutrophils value.neutrophils value.neutrophils value. In In thisIn thiswill thiswill paper,will paper, bepaper, be bedifferent whendifferent differentwhen when calcul calculfrom calculfrom fromating inactivatedating atinginactivated inactivated the the the aspect aspect aspect neutrophils neutrophils rationeutrophils ratio ratio and and and roundnessin roundnessin aspectroundnessin aspect aspect ratio valueratio ratiovalue value and andof and of of theroundnesstheroundnesstheroundnessroundnessthe cell,cell, cell, cell, convolutionconvolution convolution convolutionvalue.value. value. value. InIn In thisfilteringthisfilteringIn thisfiltering thisfiltering paper,paper, paper, paper, waswas was whenwhenwas performedwhenperformed when performed performed calculcalcul calcul calculating ononating onating onthethe thethe the WBCtheWBC the WBCaspect WBC aspect aspect images.images. images. images.ratio ratio ratio TheTheand Theand Theand convolutionconvolutionroundness convolutionroundness convolutionroundness value kernelskernels value kernelsvalue kernels of of of theroundnessroundnessthetheroundness cell, cell, cell, convolution convolution convolutionvalue. value. value. In In thisfilteringIn thisfiltering thisfiltering paper, paper, paper, was was whenwas performedwhen when performed performed calcul calcul calculating onating onating onthe thethe the WBCthe the WBCaspect WBC aspect aspect images. images. images.ratio ratio ratio Theand Theand Theand convolutionroundness convolutionroundness convolutionroundness value kernels value kernelsvalue kernels of of of usedthetheusedthetheused cell,cell, cell,in cell, in convolutionconvolutionin convolution convolution filteringfiltering filtering filtering waswerewas waswere waswere performedperformed K performed 1performedK Kand1 1and and K 2:K on onK 2: on2: onthethe the the WBCWBC WBC WBC images.images. images. images. TheThe The The convolutionconvolution convolution convolution kernelskernels kernels kernels usedthetheusedusedthe cell, cell,in cell, in convolutionconvolutionin convolution convolution filtering filtering filtering waswere waswere waswere performed K performed 1performedK Kand1 1and and K 2:K onK 2: on2: onthe the the WBC WBC WBC images. images. images. The The The convolution convolution convolution kernels kernels kernels usedusedused in in convolutionin convolution convolution filtering filtering filtering were were were K 1K Kand1 1and and K 2:K K 2:2: Sensors 2021, 21, 512 usedusedused in in convolutionin convolution convolution filtering filtering filtering were were were−1 −1K −11K Kand1 −1 1and −1 and −1 K −12:K −1K2: −12: −101−101−101 8 of 14 −1−1−1 −1 −1 −1 −1 −1 −1 −101−101−101 𝐾1𝐾1𝐾1 = −1000 =−1 =000−1 000 −1 −1 −1 −1 −1 −1,, 𝐾2𝐾2, 𝐾2, 𝐾2 = =−101 =−101 =−101 𝐾1𝐾1𝐾1 = −1 =000−1 =000 −1000 −1 −1 −1 −1 −1 −1,, 𝐾2𝐾2, 𝐾2, 𝐾2 = =−101 =−101 =−101 𝐾1𝐾1𝐾1 = 111000 = =111000 000111,, 𝐾2𝐾2, 𝐾2, 𝐾2 = =−101 =−101 =−101 𝐾1𝐾1𝐾1 = =111000 =000111 111000, 𝐾2𝐾2, 𝐾2, 𝐾2 = =−101 =−101 =−101 111111111 −101−101−101 AfterAfterAfter filtering, filtering, filtering, the the the same same same segmentation segmentation segmentation111111111 meth meth methodod odwas was was−101 used−101 used−101 used as as aboveas above above to to obtainto obtain obtain the the the WBC WBC WBC AfterAfterAfter filtering, filtering, filtering,filtering, the the the same same same segmentation segmentation segmentation meth meth methodmethodod odwas was waswas used used usedused as as asaboveas above aboveabove to to obtain toto obtain obtainobtain the the thethe WBC WBC WBCWBC contourcontourcontourAfterAfterAfter coordinates, coordinates,filtering, coordinates, filtering, filtering, the determinethe the determinesame determine same same segmentation segmentation thesegmentation the the length length length an meth an meth dan meth dwidthd odwidth widthod odwas wasof was of usedWBCs,of usedWBCs, usedWBCs, as asand aboveas and above and above the the tothe size to obtainsizeto sizeobtain ofobtain of theof thethe the theperim- the WBCperim- perim-WBC WBC contourcontourcontourAfterAfterAfter coordinates, coordinates,filtering, coordinates,coordinates, filtering, filtering, the determinethe the determine determinesame determine same same segmentation segmentation thesegmentation the the length length length an meth andan methdan meth dwidthd widthodwidth widthod odwas wasof was of of usedWBCs,of WBCs, usedWBCs, WBCs,used as asand andaboveas and aboveand above the the the tothe size sizeto obtainsizeto sizeobtain of obtain of theof thethe the the perimeterperim- the WBCperim- perim-WBC WBC etercontourcontouretercontoureter area, area, area, coordinates, andcoordinates, coordinates,and and finally finally finally determinecalculate determinecalculate determinecalculate the thethe the aspectthe lengthaspect aspectlength length rati anrati ratiano dan o anddwidtho d andwidth andwidth roundness roundness ofroundness of WBCs,of WBCs, WBCs, value. andvalue. value.and and the For the Forthe sizeFor the size thesize the ofcells of cells the ofcells the withthe perim- with perim-with perim- an an an etercontourcontoureterarea,etercontour area, area, area, coordinates, and andcoordinates, coordinates,and and finally finally finally finally calculate determinecalculate determinecalculate determinecalculate thethe thethe the aspect aspectthe lengthaspect aspectlength length ratiorati anrati ratiano dan o anddwidtho d andwidth and width roundness roundness roundness ofroundness of WBCs,of WBCs, WBCs, value. value. andvalue. value.and and the For the Forthe Forsize the size the size the ofcells of cells cellsthe ofcells the withthe perim- with withperim-with perim- an an anan aspecteteraspectetereteraspect area, area, ratioarea, ratio andratio andgreater and greaterfinally greater finally finally than calculatethan thancalculate calculate 1.2, 1.2, 1.2, it itthewas itthewas the wasaspect identified aspect identifiedaspect identified rati rati ratio as oand aso andanas and an roundnessanactivation roundnessactivation roundnessactivation state.value. state.value. state.value. If For Ifit ForIf itForwas theit was thewas the lesscells lesscells lesscells than with than withthan with 1.2, an 1.2, an1.2, an aspectetereteraspectaspecteter area, area, ratioarea, ratio ratioand and greater and greaterfinally greater greaterfinally finally than calculatethan thancalculate than calculate 1.2, 1.2, 1.2, 1.2,it itthewas it thewas it thewas aspect wasidentified aspect identifiedaspect identified identified rati rati ratio as oand aso andanas and an as roundnessanactivation roundness anactivation roundnessactivation activation state.value. state.value. state.value. state. If For If itForIf itForwas itthe Ifwas thewas the it lesscells waslesscells lesscells than with than less withthan with 1.2, an than1.2, an1.2, an theaspectthetheaspectaspectthe roundnessroundness roundness roundnessratio ratio ratio greater greater wasgreaterwas was was furtherfurtherthan furtherthan furtherthan 1.2, 1.2, judged.judged.1.2, itjudged. judged. itwas it was was identifiedWhenWhen identifiedWhen identifiedWhen thethe the the asroundness asroundness anasroundness an anactivation activation activation value value value state. wasstate. state.was was Ifgreater Ifgreaterit Ifgreater itwas it was was than less than lessthan less than0.76, than0.76, than0.76, 1.2,the 1.2,the 1.2,the theaspectaspectthe1.2,theaspect roundness roundness theroundnessratio ratio ratio roundness greater greater wasgreater was was furtherthan furtherthan was furtherthan 1.2, further1.2, judged.1.2, itjudged. judged. itwas it was was judged. identifiedWhen identifiedWhen identifiedWhen the When the the asroundness asroundness anasroundness the an anactivation roundnessactivation activation value value value state. wasstate. value state.was was Ifgreater Ifgreateritwas Ifgreater itwas it was greaterwas than less than lessthan less than0.76, than0.76, than0.76, 1.2,the 0.76,1.2,the 1.2,the WBCthetheWBCthethetheWBC roundnessroundness roundnesswas WBCroundness was was identified identified wasidentified waswas was identifiedwas furtherfurther asfurther asfurther inas in thein judged.judged.the as thejudged. activatedjudged. inactivated activated the WhenWhen When activated When state. state. thethestate. the the Otherwise, roundnessroundness Otherwise, state.roundness Otherwise,roundness Otherwise, itvaluevalue itvaluewas itvalue was was waswasidentified wasidentified it wasidentified wasgreatergreater greater greater identified as asthanthan in asthan in than thein 0.76,the0.76, the 0.76,inacti- as0.76, inacti- ininacti-thethe the thethe WBCthetheWBCWBCthe roundness roundnesswas roundness was was identified identified identified was was was further asfurther asfurther inas in thein judged.the thejudged. activatedjudged. activated activated When When When state. state. thestate. the the Otherwise,roundness Otherwise, roundness Otherwise,roundness itvalue itvaluewas itvalue was was wasidentified wasidentified wasidentified greater greater greater as asthan inas than in than thein 0.76,the the 0.76,inacti- 0.76, inacti- inacti-the the the vatedWBCvatedWBCinactivatedWBCvated wasstate. wasstate. wasstate. identified identifiedSome identifiedSome state.Some examples examples Someas examples as inas in thein examples the ofthe activated of activatedtheof activatedthe the morphologi ofmorphologi morphologi thestate. state. state. morphological Otherwise, Otherwise,cal Otherwise,cal calanalysis analysis analysis it analysisitwas areit was arewas are identifiedshown identifiedshown identifiedshown are shownin in Tableasin Tableas inTableas in the in2. Tablethe 2.the Asinacti-2. Asinacti- Asinacti-2the .the Asthe vatedWBCWBCvatedvatedWBC wasstate. wasstate. wasstate. identified identifiedSome identifiedSome Some examples examples asexamples as inas in thein the ofthe activated of activatedtheof activatedthe the morphologi morphologi morphologi state. state. state. Otherwise, Otherwise,cal Otherwise,cal calanalysis analysis analysis it itwas areit was are wasare identifiedshown identifiedshown identifiedshown in in Tableasin Tableas inTableas in the in2. the 2.the Asinacti-2. Asinacti- Asinacti-the the the granulocytevatedgranulocytevatedthevatedgranulocyte state. granulocyte state. state. Someclassified Someclassified Someclassified examples classified examples examples by by byour our ourof by modelof themodelof our modelthe the morphologi model containedmorphologi morphologicontained contained contained calthreethree calthree calthreeanalysis analysis types:types: threeanalysis types: types: types:arebasophil,basophil, arebasophil, arebasophil, shown shown basophil,shown neutrophil,neutrophil, inneutrophil, neutrophil,in Tablein Table neutrophil,Table 2. andand 2. As 2.and Asand As theeo-eo- theeo- and theeo- granulocytevatedvatedgranulocytegranulocytevated state. state. state. Someclassified Someclassified Someclassified examples examples examples by by byour our ourof modelof themodelof modelthe the morphologi containedmorphologi morphologicontained contained calthree calthree calthreeanalysis analysis types:analysis types: types: arebasophil, arebasophil, arebasophil, shown shown shown neutrophil, inneutrophil, neutrophil,in Tablein Table Table 2. and2. As 2.and Asand As theeo- theeo- theeo- sinophil,granulocytesinophil,granulocyteeosinophil,granulocytesinophil, and and andclassified classified and basophilsclassified basophils basophils by andby byandour and our eosinophilsourand modeleosinophils eosinophilsmodel model contained contained containedaccounted accounted accounted accounted threethree three three for fortypes:types: for onlytypes: types:only foronly aboutbasophil,basophil, only aboutbasophil, aboutbasophil, about5% 5% 5% ofneutrophil,neutrophil, ofneutrophil, 5%granulocytes,ofneutrophil, granulocytes, granulocytes, of granulocytes, andand and and eo-weeo- eo-we eo- we sinophil,granulocytegranulocytesinophil,sinophil,granulocyte and and andclassified basophilsclassified basophilsclassified basophils by andby byandour and our eosinophilsour modeleosinophils eosinophilsmodel model contained contained containedaccounted accounted accounted three three three for fortypes: for onlytypes: types:only only aboutbasophil, aboutbasophil, aboutbasophil, 5% 5% 5% ofneutrophil, ofneutrophil, granulocytes,ofneutrophil, granulocytes, granulocytes, and and and eo-we eo-we eo-we treatedsinophil,treatedtreatedsinophil,wesinophil,treated treated thethe andthe the andgranulocytes granulocytesand granulocytesbasophils thegranulocytes basophils basophils granulocytes and asasand andas neneaseosinophils neeosinophils utrophils neeosinophils asutrophilsutrophils neutrophils accountedwhen accountedwhen accountedwhen doing when doing doing for forthe doing for onlythe theonly morphologicalonly morphological aboutmorphological the about about morphological 5% 5% 5% of of granulocytes,analysisof granulocytes,analysis granulocytes,analysis analysis for for foracti- weacti- acti-we forwe treatedsinophil,sinophil,treatedtreatedsinophil, the andthe the andgranulocytes and granulocytesbasophils granulocytes basophils basophils and asand andas neaseosinophils neeosinophils utrophils neeosinophilsutrophilsutrophils accountedwhen accountedwhen accountedwhen doing doing doing for forthe for onlythe theonly morphologicalonly morphological aboutmorphological about about 5% 5% 5% of of granulocytes,ofanalysis granulocytes,analysis granulocytes,analysis for for for acti- weacti- acti-we we vatedtreatedtreatedvatedtreatedactivatedtreatedvated and thetheand andthe theinactivated granulocytesgranulocytes andinactivated granulocytesinactivated granulocytes inactivated neutrophils. neutrophils. asasneutrophils. as ne neutrophils.asne ne utrophilsneutrophilsutrophils The The The resultswhen The resultswhen resultswhen results doing were doing weredoing were were thenthe thenthe thenthe morphological then correctedmorphological morphologicalcorrected corrected corrected by by bythe byanalysis the analysisthe theanalysisproportion proportion proportion for for foracti- acti- ofacti- of ofof vatedtreatedtreatedvatedvatedtreated and theand andthe theinactivated granulocytes inactivated granulocytesinactivated granulocytes neutrophils. neutrophils. asneutrophils. as neas ne utrophilsneutrophilsutrophils The The The resultswhen resultswhen resultswhen doing were doing weredoing were thenthe thenthe thenthe morphological correctedmorphological morphologicalcorrected corrected by by bythe analysis the analysisthe analysisproportion proportion proportion for for foracti- acti- ofacti- of of basophil,vatedbasophil,vatedbasophil,vated and and andeosinophil, inactivated eosinophil, eosinophil,eosinophil,inactivated inactivated and neutrophils.and andandneutrophils. neutrophilicneutrophils. neutrophilic neutrophilicneutrophilic The The granulocThe granulocresults granulocytes. granulocresults results ytes.were ytes.were ytes.were The then The thenTheThe thenprevious correctedprevious previous previouscorrected corrected work work by workwork by bythealso thealso alsothealso proportion mentions proportion mentionsproportion mentionsmentions the of the theofthe of basophil,vatedvatedbasophil,basophil,vated and and andeosinophil, inactivated eosinophil, eosinophil,inactivated inactivated and neutrophils.and andneutrophils. neutrophilicneutrophils. neutrophilic neutrophilic The The granulocThe granulocresults granulocresults results ytes.were ytes.were ytes.were The then The thenThe thenprevious previouscorrected previouscorrected corrected work work bywork by bythealso thealso thealso proportion mentions proportion mentionsproportion mentions the of the ofthe of methodbasophil,methodbasophil,methodbasophil, of eosinophil,of ofusingeosinophil,of eosinophil,using usingusing proportional proportional proportional and and and neutrophilic neutrophilic neutrophilic numbers numbersnumbers numbers granuloc granulocto togranuloc to correctto correct correct correctytes.ytes. ytes. thethe Thethe the The resultsresults The resultsprevious results previous previous [ 23[23]. [23].]. [23]. work Through Through work Throughwork Through also also also color mentionscolor mentionscolor mentionscolor adjustment, adjust- adjust- adjust- the the the methodbasophil,basophil,methodmethodbasophil, of eosinophil,of usingofeosinophil, eosinophil,using using proportional proportional proportional and and and neutrophilic neutrophilic neutrophilic numbers numbers numbers granuloc granulocto granuloc to correctto correct correctytes.ytes. ytes.the Thethe the Theresults The resultsprevious results previous previous [23]. [23]. [23]. work Through work Throughwork Through also also also mentionscolor mentionscolor mentionscolor adjust- adjust- adjust- the the the ment,methodment,methodthresholdmethodment, threshold thresholdof threshold of usingof using segmentation, using segmentation, proportional segmentation, proportionalsegmentation, proportional and numbersand spot numbersand numbersand spot detectionspot spot todetecti todetecti correcttodetecti correct correct methods,onon onmethods,the methods,the methods,the results results theresults the RBC, [23].the the [23].RBC, [23]. RBC, WBC, ThroughRBC, Through WBC,Through WBC, andWBC, andcolor andcolor andcolor platelets adjust-platelets plateletsadjust- adjust- in the ment,methodmethodment,ment,method threshold thresholdof threshold of usingof using using segmentation, proportional segmentation, proportionalsegmentation, proportional numbersand numbersand numbersand spot spot spot todetecti todetecti correcttodetecti correct correctonon onmethods,the methods,the methods,the results results results the [23].the the [23].RBC, [23]. RBC, RBC,Through Through WBC,Through WBC, WBC, andcolor andcolor andcolor platelets adjust-platelets plateletsadjust- adjust- inment,ininment, thebloodthement,in the the thresholdbloodblood thresholdblood werethresholdblood werewere separatelywere weresegmentation, segmentation, separatelyseparatelysegmentation, separately separately identified identifiedidentified andidentified andidentified and andspot spot spot counted,detectiandand detectiand detectiand counted, counted,on counted,on then onmethods, methods, methods, thethen then then final thethe thethe the count the finalRBC, finalRBC, finalRBC, ofcountWBC, count WBC, each countWBC, ofand WBC of andeach ofand eachplatelets each platelets type plateletsWBC WBC WBC was inment,inment,in theinthement, the the thresholdbloodblood thresholdblood thresholdblood werewere were weresegmentation, segmentation, separatelyseparatelysegmentation, separately separately identifiedidentified andidentified andidentified and spot spot spot detectiandand detectiand detectiand counted, counted,on counted,on onmethods, methods, methods, then then then thethe thethe the the finalRBC, finalRBC, finalRBC, countWBC, count WBC, countWBC, ofand of andeach ofand each plateletseach platelets plateletsWBC WBC WBC typeintypeintypein proportionallytheinthetype the waswasthe bloodwasblood wasblood proportionallybloodproportionally proportionally proportionally werewere were were obtained. separatelyseparately separately separately obtained.obtained. obtained. obtained. identifiedidentified identified identified andand and and counted, counted, counted, then then then the the the final final final count count count of of eachof each each WBC WBC WBC typeinintype thetypein the wasthe bloodwas wasblood proportionallyblood proportionally proportionally were were were separately separately separately obtained. obtained. obtained. identified identified identified and and and counted, counted, counted, then then then the the the final final final count count count of of eachof each each WBC WBC WBC typetypetypetype waswas was was proportionallyproportionally proportionally proportionally obtained.obtained. obtained. obtained. typetypetype was was was proportionally proportionally proportionally obtained. obtained. obtained. TableTableTableTable 2. 2.The 2.2. The TheThe identification identification identificationidentification process process processprocess of of activated ofof activated activatedactivated or or orinactivatedor inactivated inactivatedinactivated WBCs. WBCs. WBCs.WBCs. TableTableTable 2. 2.The 2. The The identification identification identification process process process of of activated of activated activated or or inactivatedor inactivated inactivated WBCs. WBCs. WBCs. TableTableTable 2. 2.The 2. The The identification identification identification process process process of of activated of activated activated or or inactivated or inactivated inactivated WBCs. WBCs. WBCs. TableTableOriginalTableOriginalOriginal 2. 2.The 2. The The identification identification ConvolutionidentificationConvolutionConvolutionConvolution process process process ofMask of activated of activated activated orContour or Contour inactivatedorContour inactivated inactivated AspectWBCs.Aspect AspectWBCs. AspectWBCs. OriginalOriginalOriginal ConvolutionConvolutionConvolution Mask MaskMask Image Image Image Contour ContourContour AspectAspectAspect Roundness RoundnessRoundnessRoundness StatusStatus StatusStatus OriginalOriginalOriginalImage ConvolutionConvolutionConvolutionFiltering Mask MaskImageMask Image Image Image ContourImageContourContour AspectRatioAspectRatioRatioAspectRatio Roundness RoundnessRoundness StatusStatusStatus OriginalOriginalOriginal ConvolutionConvolutionConvolution Mask MaskMask Image Image Image ContourContourContour AspectRatioAspectRatioAspectRatio Roundness RoundnessRoundness StatusStatusStatus MaskMaskMask Image Image Image RatioRatioRatio RoundnessRoundnessRoundness StatusStatusStatus RatioRatioRatio 1 11 1 0.890.89 0.89 InactivatedInactivatedInactivatedInactivatedInactivated 1 1 1 0.890.890.89 InactivatedInactivatedInactivatedInactivated 1 1 1 0.890.890.89 InactivatedInactivatedInactivatedInactivated 1 1 1 0.890.890.89 InactivatedInactivatedInactivated

1.041.041.04 0.860.860.86 InactivatedInactivatedInactivatedInactivated 1.041.041.041.04 0.860.86 0.86 InactivatedInactivatedInactivatedInactivatedInactivated 1.041.041.04 0.860.860.86 InactivatedInactivatedInactivatedInactivated 1.041.041.04 0.860.860.86 InactivatedInactivatedInactivated

1.221.221.22 0.640.640.64 ActivatedActivatedActivated 1.221.221.22 0.640.640.64 ActivatedActivatedActivated 1.221.221.221.22 0.640.64 0.64 ActivatedActivated ActivatedActivated 1.221.221.22 0.640.640.64 ActivatedActivatedActivated

1.341.341.34 0.670.670.67 ActivatedActivatedActivated 1.341.341.34 0.670.670.67 ActivatedActivatedActivated 1.341.341.34 0.670.670.67 ActivatedActivatedActivated 1.341.341.341.34 0.670.67 0.67 ActivatedActivated ActivatedActivated

3.3. R3.esults R Resultsesults 3.3. R3.esults R Resultsesults 3.3. R3.esults R Resultsesults WeWeWe se segmented segmentedgmented the the the WBC WBC WBC images, images, images, extracted extracted extracted the the the features features features of of the of the the WBCs WBCs WBCs from from from the the the training training training 3.3. R3.esults RWe ResultsResultsWeesultsWe se segmented segmentedgmented the the the WBC WBC WBC images, images, images, extracted extracted extracted the the the features features features of of theof the the WBCs WBCs WBCs from from from the the the training training training setset setthrough Wethrough throughWeWe se segmented sethegmented gmentedthe the Resnet-50 Resnet-50 Resnet-50 the the the WBC WBC network, WBC network, network,images, images, images, and andextracted and extracted classifi extracted classifi classified theed the ed themthe features them featuresthem features into into into of three of three theof three the the WBCscategories. WBCscategories. WBCscategories. from from from The the The theThe the training training training setset setthrough Wethrough throughWeWe se segmented segmented sethegmented gmentedthe the Resnet-50 Resnet-50 Resnet-50 the the thethe WBC WBC network, WBCWBC network, network, images, images, images,images, and andextracted and extracted classifi extractedextracted classifi classified theed the ed themthethe features them featuresthem featuresfeatures into into into of three of three theof ofthree the thethe WBCscategories. WBCscategories. WBCsWBCscategories. from from fromfrom The the The theThe thethe training training trainingtraining setset setthroughwas throughwas throughwas composed composed composed the the the Resnet-50 Resnet-50 Resnet-50of of 8621of 8621 8621 network, Granulocytes, network, Granulocytes,network, Granulocytes, and and and classifi classifi8384 classifi8384 8384 edLymphocytes,, edLymphocytes, edthemLymphocytes, them them into into into three threeandand three and and categories. 83918391 categories. 8391categories. 8391 Monocytes.Monocytes. Monocytes. Monocytes. The The The training training AfterAftertraining After After setsetset throughwas throughwas throughwas composed composed composed the the thethe Resnet-50 Resnet-50 Resnet-50Resnet-50of of 8621of 8621 8621 network, Granulocytes, network, network,Granulocytes,network, Granulocytes, and and andand classifi classifi8384 classified classifi8384 8384 edLymphocytes,Lymphocytes, edLymphocytes, edthemLymphocytes, them themthem into into intointo three threeandand threethree and and categories. 83918391 categories. categories.8391categories. 8391 Monocytes.Monocytes. Monocytes. Monocytes. The The TheThe training training trainingAfterAftertraining After After everysetsetevery seteverywas was 100was 100composed 100 composedsteps composed steps steps of of training, ofof training, of training,8621of 8621 8621 Granulocytes,the Granulocytes, theGranulocytes, the testing testing testing sets sets sets8384 we8384 8384we rewe Lymphocytes,Lymphocytes,re usedLymphocytes,re Lymphocytes,used used to to testto test test the andandthe theand model,and model,83918391 model, 8391 8391 Monocytes.Monocytes.and Monocytes.and Monocytes.and the the the 200 200 200 AfterstepsAfter Aftersteps Aftersteps everysetseteveryset everywas was was100was 100composed 100 composedsteps composedcomposed steps steps of of training,ofof training, of training, of8621of 8621 86218621 Granulocytes,the Granulocytes, the Granulocytes, Granulocytes,the testing testing testing sets sets sets8384 we8384 83848384we were Lymphocytes,re usedLymphocytes,re Lymphocytes, Lymphocytes,used used to to testto test test the andthe theand andmodel,and model,8391 model, 8391 83918391 Monocytes.and Monocytes.and Monocytes. Monocytes.and the the the 200 200 200 Aftersteps Aftersteps AfterAftersteps ofeveryofevery trainingeveryof training training100 100 100 steps weresteps stepswere were of usedof training,ofused training,used training, to to saveto savethe save the the andtesting andtesting andtesting evaluate evaluate evaluatesets sets sets we wethethe wererethe rethe usedusedmodel.remodel. usedmodel. usedmodel. toto to testThen,testThen,to testThen, testThen, thethe the thethethe model,model,the themodel, classifiedclassifiedmodel, classified classified andand and and the the granulocytegranulocyte the granulocytethe 200granulocyte200 200 200 stepssteps steps steps ofeveryeveryof everytrainingof training training100 100 100 steps weresteps stepswere were of usedof training, ofused training,used training,training, to to saveto savethe save the thethe andtesting andtesting and testingtesting evaluate evaluate evaluatesets sets setssets we wethethe were werethe rethe usedmodel.remodel. usedmodel. usedusedmodel. to to test toThen,Then,to testThen, testtestThen, the the the thethe model,the themodel, model,classifiedclassifiedmodel, classified classified and and andand the granulocytegranulocyte the thegranulocytethe granulocyte200 200 200200 steps steps stepssteps imagesofimagesimagesof trainingofimages training training werewere were were were furtherfurtherwere werefurther further used used used identifiedidentified identifiedto identified to saveto save save andasas andas activatedandactivatedas activatedevaluate activatedevaluate evaluate state thethestate statethe the ormodel.model. ormodel. inactivatedormodel. inactivated inactivated Then,Then, Then, Then, thestatethe thestate thestate classifiedclassified throughclassified classifiedthrough through morpholog-granulocytegranulocyte morpholog-granulocyte granulocytemorpholog- imagesofimagesofimages oftrainingimages training trainingtraining werewere were were were furtherwerefurther were werefurther further used used usedused identifiedidentified identifiedto identified to tosaveto save savesave andasas andas and activatedandactivatedas activatedevaluate activatedevaluate evaluateevaluate state thestate statethe thethe ormodel. ormodel. model.inactivatedormodel. inactivated inactivated Then, Then, Then,Then, thestate thestate thethestate classified throughclassified classifiedclassifiedthrough through morpholog-granulocyte granulocytemorpholog- granulocytemorpholog-granulocyte icalimagesicalimagesicalimagesimagesical examination.examination. examination. examination. werewere were were furtherfurther further further identifiedidentified identified identified asas as activatedactivatedas activated activated state state state or or inactivatedor inactivated inactivated state state state through through through morpholog- morpholog- morpholog- icalimagesicalimagesicalimagesicalimages examination.examination. examination. examination. were were werewere further further furtherfurther identified identified identified identified as as activatedas activatedactivated activated state statestate state or oror inactivatedor inactivatedinactivated inactivated state state state state through through through through morpholog- morphological morpholog- morpholog- icalicalicalical examination.examination.This examination. Thisexamination.This training training training was was was carried carried carried out out out under under under a 64-bia a64-bi 64-bitt LinuxLinuxt tLinux Linux system,system, system, system, usingusing using using NvidiaNvidia Nvidia Nvidia KeplerKepler Kepler Kepler K80K80 K80 K80 icalicalexamination.ical examination.This examination. Thisexamination.This training training training was was was carried carried carried out out out under under under a a64-bi a64-bi 64-bit Linuxt tLinux Linux system, system, system, using using using Nvidia Nvidia Nvidia Kepler Kepler Kepler K80 K80 K80 GPUGPUGPUThis acceleratorThis acceleratorThis accelerator training training training card, wascard, wascard, was ancarried ancarried ancarriedeight-channel eight-channel eight-channel out out out under under under high-p a high-p 64-biahigh-p a64-bi 64-bierformancett erformanceLinuxLinuxterformance tLinux Linux system,system, system, system,SAS SAS SAS usingRAIDusing usingRAID usingRAID NvidiaNvidiacard Nvidiacard Nvidiacard (4 (4 KeplerKepler GB(4 Kepler GB KeplerGB cache), cache), cache),K80K80 K80 K80 GPUGPUGPUThis acceleratorThis acceleratorThis accelerator training training training card, wascard, card,was was ancarried ancarried carriedaneight-channel eight-channel eight-channel out out outout under under underunder high-p a high-p a64-bihigh-p aa64-bi 64-bit64-bierformancet erformanceLinuxterformance tLinux LinuxLinux system, system, system, system,SAS SAS SAS usingRAID usingRAID usingusingRAID Nvidiacard Nvidiacard NvidiaNvidiacard (4 (4 Kepler GB(4 Kepler GB KeplerKeplerGB cache), cache), cache),K80 K80 K80K80 GPUGPUGPU accelerator accelerator accelerator card, card, card, an an aneight-channel eight-channel eight-channel high-p high-p high-performanceerformanceerformance SAS SAS SAS RAID RAID RAID card card card (4 (4 GB(4 GB GB cache), cache), cache), GPUGPUGPU accelerator accelerator accelerator card, card, card, an an aneight-channel eight-channel eight-channeleight-channel high-p high-p high-performancehigh-performanceerformanceerformance SAS SAS SAS RAID RAID RAID card card card (4 (4 GB (4 GB GB cache), cache), cache), and 16 G ECC Registered DDR4 2133 memory. The code was written using Python 2.7, TensorFlow 1.13.1 version. We used a confusion matrix to obtain Precision, Recall, and F1_Score for evaluation. The confusion matrix was used to summarize the result of a classifier. For classification, the confusion matrix was a k ∗ k table, which was used to record the relationship between the predicted result and the actual label. The Recall formula is shown in (6), which represents the probability of being predicted as a positive sample in a sample that was positive. The Sensors 2021, 21, 512 9 of 14

formula for the Precision is shown in (7), which represents the probability of a positive sample among all the samples predicted to be positive. The higher Recall and Precision are, the better the classification results we get, but they are also a pair of contradictions. F1_Score, as shown in (8), is a trade-off between them. Both Precision and Recall estimate positive samples, and the overall estimate still uses Accuracy as the standard. The formula of Accuracy is as shown in (9). Among them, True Positive (TP) means positive samples predicted to be positive, True Negative (TN) means negative samples predicted to be negative, False Positive (FP) means negative samples predicted to be positive, and False Negative (FN) represents a positive sample predicted to be negative. We also used 95% confidence intervals (CI) to evaluate the reliability of Accuracy. The formula of CI is as shown in (10), where n represents the number of Accuracy values selected, µˆ represents the average of selected Accuracy values, σ represents the standard deviation of selected Accuracy values, and M represents the number of 95% confidence intervals. We also applied the Receiver Operating Characteristic (ROC) curve to evaluate the model, where the vertical axis of the ROC curve is True Positive Rate (TPR) as in (11), and the horizontal axis is False Positive Rate (FPR) as in (12). The ROC curve can accurately reflect the relationship between TP and FP, which is a comprehensive representation of the detection accuracy. The ROC curve expresses the correctness of the selected eigenvalues. The closer the deviation of the curve to the (0,1) point, the more successful the feature value selection is. The Area Under the ROC Curve (AUC) value refers to the area of the ROC curve. The larger the AUC value is, the more successful model feature value selection is. TP Recall = (6) TP + FN TP Precision = (7) TP + FP 2 ∗ Precision ∗ Recall F1_Score = (8) Precision + Recall TP + TN Accuary = (9) TP + TN + FP + FN  σ σ  P µˆ − 1.96 √ ≤ M ≤ µˆ + 1.96 √ ≈ 0.95 (10) n n TP TPR = (11) TP + FN FP FPR = (12) TP + TN After 2000 steps of training, it was finally concluded that the accuracy of the Resnet-50 training set was about 95%, and the accuracy of the Resnet-50 testing set could reach more than 90%. The 95% confidence interval of the testing set was [0.943 − 0.004, 0.943 + 0.004]. Testing accuracy was close to the training accuracy, indicating that there was no overfitting phenomenon in Resnet-50. The value of Accuracy was relatively stable in both testing and training sets, so it proved the effectiveness of the Resnet-50 model. Besides, the Recall and Precision of the Resnet-50 testing set were about 90% and 96%, respectively, F1_Score of the testing set was about 93%, which proved that the relationship between Recall and Precision was relatively balanced. The curves of Loss and Accuracy are shown in Figure5. After 1000 steps, the loss value of the Resnet-50 testing set fluctuated greatly around 0.3. This could be caused by the fact that the label-free WBC images have more feature values and less regular than the fluorescently labeled WBCs. Sensors 2021, 21, x FOR PEER REVIEW 10 of 15

overfitting phenomenon in Resnet-50. The value of Accuracy was relatively stable in both testing and training sets, so it proved the effectiveness of the Resnet-50 model. Besides, the Recall and Precision of the Resnet-50 testing set were about 90% and 96%, respectively, F1_Score of the testing set was about 93%, which proved that the relationship between Recall and Precision was relatively balanced. The curves of Loss and Accuracy are shown in Figure 5. After 1000 steps, the loss value of the Resnet-50 testing set fluctuated greatly around 0.3. This could be caused by the fact that the label-free WBC images have more feature values and less regular than the fluorescently labeled WBCs. We used two other transfer learning models for comparative analysis, including In- ceptionV3 network and Resnet-101 network with pre-trained models (the pre-trained Sensors 2021, 21, 512models are all from ImageNet). As a classic network model, InceptionV3 has been applied 10 of 14 to classification tasks in many works. The only difference between Resnet-101 and Resnet- 50 is the number of their layers.

Figure 5. ComparisonFigure 5. Comparison results of Loss results and Accuracyof Loss and during Accuracy training during and testingtraining for and Inception testing for V3, Inception Resnet-101, V3, and Resnet-50: (a) is the trainingResnet-101, loss, (b and) is theResnet-50: testing ( loss,a) is (thec) is training the training loss, accuracy,(b) is the testing and (d) loss, is the (c testing) is the accuracy.training accuracy, and (d) is the testing accuracy. We used two other transfer learning models for comparative analysis, including Incep- From the comparisontionV3 network of the and loss Resnet-101 values of networkthe training with set pre-trained and the testing models set (thein Figure pre-trained models 5a,b, it can be seenare all that from the ImageNet).loss value of Asthe a Resnet-50 classic network model was model, the InceptionV3lowest. In the has accu- been applied to racy comparisonclassification of the training tasks set in manyand testin works.g set The of onlyFigure difference 5c,d, although between the Resnet-101 accuracy and Resnet-50 of Resnet-50 andis the Resnet-101 number of was their almost layers. the same, it can be seen from the comparison value of the three modelsFrom thein Figure comparison 6 that th ofe F1_score the loss of values Resnet-50 of the was training the highest, set and which the testing set in proved that theFigure overall5a,b, performance it can be seen of thatResnet-50 the loss was value better of the than Resnet-50 the other model two wasmodels. the lowest. In the In addition, theaccuracy 95% confidence comparison interval of the of training the Resnet-50, set and Resnet-101, testing set of and Figure InceptionV35c,d, although are the accuracy shown in Tableof Resnet-503. The fluctuation and Resnet-101 of Resnet-50 was almost (±0.004 the same,) was itless can than be seen the from Resnet-101 the comparison value (±0.005) and theof theInceptionV3 three models (±0.008 in Figure), which6 that proved the F1_score that the of accuracy Resnet-50 of was Resnet-50 the highest, was which proved more stable thanthat the the other overall two performance models. It can of Resnet-50 also be seen was in better the comparison than the other of two the models.ROC In addition, curve as in Figurethe 95% 7 that confidence the curve interval of Resn ofet-50 the Resnet-50,was the closest Resnet-101, to the and(0,1) InceptionV3 point. The are shown in straight-line y Table= x in3 Figure. The fluctuation 7 represents of the Resnet-50 result of ( ±a 0.004classifier) was using less thana random the Resnet-101 guessing (±0.005) and strategy. It canthe be InceptionV3 seen that the (± Resnet0.008), whichmodel provedwas on thatthe theROC accuracy curve above of Resnet-50 the y = was x more stable straight line, whichthan theproves other that two the models. Resnet It model can also was be better seen inthan the the comparison randomly ofguessed the ROC curve as in classifier. The Figurereason7 forthat the the poor curve performa of Resnet-50nce of wasthe InceptionV3 the closest to model the (0,1) could point. be that The straight-line y = x in Figure7 represents the result of a classifier using a random guessing strategy. It can be seen that the Resnet model was on the ROC curve above the y = x straight line, which proves that the Resnet model was better than the randomly guessed classifier. The reason for the poor performance of the InceptionV3 model could be that there is no residual network structure in the model and the feature value extraction is not accurate enough. Resnet-101 is deeper than Resnet-50, but the loss value was not lower than Resnet-50, and the value of F1_Score and AUC were not better than Resnet-50, indicating that increasing more layers may not be effective. From the data of the confusion matrix in Figure8, it can be seen that the classification accuracy of granulocyte (95.6%) and lymphocyte (94%) were high, while the monocyte (84.3%) was low. It indicated that the characteristics of monocyte cells after training were not very obvious and were easily misidentified as lymphocytes. The above results prove that it is feasible to use the Resnet-50 network with a pre-training model to realize a three-type classification for WBCs. Sensors 2021, 21, x FOR PEER REVIEW 11 of 15

there is no residual network structure in the model and the feature value extraction is not accurate enough. Resnet-101 is deeper than Resnet-50, but the loss value was not lower than Resnet-50, and the value of F1_Score and AUC were not better than Resnet-50, indi- cating that increasing more layers may not be effective. From the data of the confusion matrix in Figure 8, it can be seen that the classification accuracy of granulocyte (95.6%) Sensors 2021, 21, x FOR PEER REVIEWand lymphocyte (94%) were high, while the monocyte (84.3%) was low. It indicated11 ofthat 15

Sensors 2021, 21, 512 the characteristics of monocyte cells after training were not very obvious and were11 easily of 14 misidentified as lymphocytes. The above results prove that it is feasible to use the Resnet- 50 network with a pre-training model to realize a three-type classification for WBCs. there is no residual network structure in the model and the feature value extraction is not accurate enough. Resnet-101 is deeper than Resnet-50, but the loss value was not lower than Resnet-50, and the value of F1_Score and AUC were not better than Resnet-50, indi- cating that increasing more layers may not be effective. From the data of the confusion matrix in Figure 8, it can be seen that the classification accuracy of granulocyte (95.6%) and lymphocyte (94%) were high, while the monocyte (84.3%) was low. It indicated that the characteristics of monocyte cells after training were not very obvious and were easily misidentified as lymphocytes. The above results prove that it is feasible to use the Resnet- 50 network with a pre-training model to realize a three-type classification for WBCs.

FigureFigure 6. 6.Comparison Comparison results results of of Recall, Recall, Precision, Precision, F1_score F1_score for for three three models. models.

Table 3. Comparison of Confidence Intervals (CI) and Average Accuracy for different models.

Model 95% Confidence Intervals Average Accuracy Resnet-18 – 0.649 InceptionV3 [0.767 − 0.008, 0.767 + 0.008] 0.767 Resnet-101 [0.9126 − 0.005, 0.9126 + 0.005] 0.9126 Resnet-50 [0.943 − 0.004, 0.943 + 0.004] 0.943 Figure 6. Comparison results of Recall, Precision, F1_score for three models.

Figure 7. Comparison results of ROC curves for the three models.

FigureFigure 7.7. ComparisonComparison resultsresults ofof ROCROC curvescurves forfor thethe threethree models.models. Based on the automatic classification and counting of the activated and inactivated

WBCs, a total of 1771 granulocyte cells were tested, the number of activated cells obtained was 365, and the number of inactivated cells was 1328. According to the ratio of basophil and eosinophil, they account for 1% and 5% of the entire granulocytes, respectively. There- fore, the number of activated neutrophils was about 346, and the number of inactivated neutrophils was about 1261.

Sensors 2021, 21, 512 12 of 14 Sensors 2021, 21, x FOR PEER REVIEW 12 of 15

FigureFigure 8. ComparisonComparison results results of of the confusion matrix for the three models.

4. DiscussionsBased on the automatic classification and counting of the activated and inactivated WBCs,Similar a total work of 1771 [24 granulocyte] has used the cells similar were te Resnet-18sted, the number model to of classify activated label-free cells obtained WBCs was(neutrophils 365, and the and number monocytes) of inactivated with the cells highest was accuracy1328. According of 64.9%, to the but ratio the accuracyof basophil of andour eosinophil, method reached they account about 90%,for 1% as and shown 5% of in the Table entire3. granulocytes, The article pointed respectively. out that There- the fore,reason the for number the unsatisfactory of activated modelneutrophils was the wa imbalances about 346, of and the datasetthe number and lowof inactivated resolution neutrophilsof the obtained was images.about 1261. The impact of dataset imbalance on Accuracy is also reflected in the Resnet-50 model: we found that the Recall of monocyte was not very high, so it 4.was Discussions sometimes recognized as a lymphocyte, but other types of WBCs did not have such problems.Similar This work could [24] be has due used to thethe imbalancesimilar Resnet-18 of the initial model dataset to classify since label-free the monocyte WBCs in (neutrophilsthe human blood and monocytes) at the time ofwith sampling the highest is less. accuracy Although of 64.9%, we have bu expandedt the accuracy the dataset, of our methodthe real featuresreached ofabout the monocyte90%, as shown were stillin Table less than3. The the article other pointed two classes, out that so the the accuracy reason forof thethe monocyteunsatisfactory was relativelymodel was low. the imbalance of the dataset and low resolution of the obtainedThere images. are probably The impact three of reasons dataset for imbalanc our highere on accuracy Accuracy results. is also First, reflected the WBC in the image Res- net-50resolution model: used we was found higher that (obtained the Recall by of a 100mo×nocyteobjective was microscope),not very high, compared so it was with some- the timescell resolution recognized taken as a bylymphocyte, flow cytometry but other in [ 23ty],pes the of resolutionWBCs did ofnot our have dataset such wasproblems. much Thishigher. could Second, be due the to Resnet-50 the imbalance model of we the used initial had dataset more layers since thanthe monocyte the Resnet-18 in the model, human so bloodthe extracted at the time feature of sampling values were is less. more Although accurate. we Third, have the expanded pre-training the modeldataset, we the added real featureswas helpful of the to monocyte improve the were accuracy. still less Compared than the other with two the deepclasses, learning so the modelaccuracy that of uses the monocytestained WBC was images relatively as a low. dataset, the results of our model are also impressive. In previous work [25], the four-layer model built by itself was used to classify the stained WBCs, in Tablewhich 3. the Comparison obtained of Accuracy Confidence and Intervals Recall were (CI) and similar Average to our Accuracy experimental for different results. models. Previous work [26] also used deep learning methods to extract features of stained WBCs, the author used Lenet-5,Model Alexnet model 95% forConfidence comparison, Intervals and finally used theAverage self-built Accuracy WBCsNet structureResnet-18 to get the highest accuracy rate-- of 93%. During the experiment, 0.649 we also tried to useInceptionV3 Lenet-5 and Alexnet’s[0.767 migration − 0.008, learning0.767 + 0.008] models for three classifications. 0.767 Because theResnet-101 feature values of label-free[0.9126 cells− 0.005, are 0.9126 more difficult + 0.005] to extract, the effect 0.9126 was not good for modelsResnet-50 with fewer layers.[0.943 Our− 0.004, classification 0.943 + 0.004] results based on unstained 0.943 WBC were similar to those based on stained WBC, indicating the feasibility of our label-free WBC classificationThere are method. probably three reasons for our higher accuracy results. First, the WBC im- age resolutionHowever, used our method was higher of extracting (obtained feature by a 100× values objective using the microscope), Resnet-50 model compared can still with be thefurther cell resolution improved. taken In [27 ],by it flow proposed cytometry the use in of[23], the the IDEAS resolution tool to of extract our dataset the characteristic was much higher.values ofSecond, five types the ofResnet-50 WBCs, and model the accuracywe used reachedhad more was layers about than 97%. the Similarly, Resnet-18 in [model,17], the soproposed the extracted manual feature extraction values of feature were valuesmore accurate. method toThird, classify the WBCs pre-training had an accuracymodel we of added99%. Compared was helpful with to machineimprove learningthe accuracy. methods, Compared Resnet-50 with is notthe verydeep accurate learning in model extracting that usesfeature stained values, WBC resulting images in as the a classificationdataset, the re accuracysults of beingour model not as are high also as usingimpressive. machine In previouslearning orwork even [25], manual the four-layer classification. model Therefore, built by the itself automatic was used extraction to classify of WBC the featuresstained using deep learning requires further improvement. Although the accuracy of the Resnet-50 WBCs, in which the obtained Accuracy and Recall were similar to our experimental re- model is not prominent, it can be used as a method of initial medical diagnosis. In some sults. Previous work [26] also used deep learning methods to extract features of stained remote and resource-limited places where cell sorting equipment or manual sorting conditions WBCs, the author used Lenet-5, Alexnet model for comparison, and finally used the self- are lacking, this method provides a convenient solution. built WBCsNet structure to get the highest accuracy rate of 93%. During the experiment,

Sensors 2021, 21, 512 13 of 14

In terms of the method used in this paper to distinguish activated and inactivated neutrophils, it was based on obvious changes in morphological characteristics. The ideal result can be obtained by simple convolution filtering and calculation of cell characteristics on the cell image with less time consumption. Its advantages are high speed and low requirements for computer performance. The fast testing speed can be reflected in the testing of 1771 cell images in only 60 s. If the deep learning method is used for testing, the training process and the test process will take a long time, and the computer configuration requirements are relatively high. The lower error rate is also a major advantage of this method. If deep learning or machine learning is used for two-class training, it will increase the difficulty and time consumption. So this is a more convenient and concise method. The disadvantage is that the total number of cells tested was 1771, but the total number of activated cells and inactivated cells was only 1693, which proves that this system was insufficient to identify the contours of cells because some cells were not detected, so that the predicted number was smaller than the total number before the test. In this respect, further improvement is still needed.

5. Conclusions This paper proposed a label-free three-type WBC classification method using the transfer learning technique based on the Resnet-50 neural network. The features of label- free WBCs could be extracted and divided into three categories, such as granulocyte, lymphocytes, and monocytes. The activated and inactivated neutrophils, which are the dominant granulocytes, could be detected for immune state monitoring. The Resnet-50 model-based method was faster and more convenient than other machine learning or manual detection methods. The accuracy of this article can reach about 90%, which verifies the feasibility of using label-free WBC images for classification. Although the accuracy is not as high as that of manually extracting feature values using machine learning, our method is more convenient and time-saving. The research in this article is helpful for the development of label-free cell classification methods. Using label-free cell images for classification is becoming a future trend. In future work, we will improve the network so that it will be more suitable for the extraction of label-free WBC feature values to increase the accuracy of the results.

Author Contributions: Conceptualization, X.H.; Data curation, J.L.; Formal analysis, J.L.; Funding acquisition, X.H. and L.S.; Investigation, J.L.; Methodology, X.H. and J.L.; Resources, L.S.; Software, X.H. and J.L.; Supervision, X.H.; Validation, J.Y., M.W., W.H., and J.C.; Writing–review & editing, X.H., J.Y., and M.W. All authors have read and agreed to the published version of the manuscript. Funding: This work was supported by the National Natural Science Foundation of China (Grant No. 61827806), Qianjiang Talent Project Type-D of Zhejiang (Grant No. QJD1802021), Fundamental Research Funds for the Provincial Universities of Zhejiang (Grant No. GK209907299001-305), and 2020 Talent Cultivation Project of Zhejiang Association for Science and Technology (Grant No. CTZB-2020080127-19). Institutional Review Board Statement: The study was conducted according to the guidelines of the Declaration of Helsinki, and approved by the Ethics Committee of Hangzhou Dianzi University (protocol code 20200608YY001). Informed Consent Statement: Informed consent was obtained from all subjects involved in the study. Data Availability Statement: Data available on request due to privacy restrictions. Conflicts of Interest: The authors declare no conflict of interest.

References 1. Peltola, V.; Mertsola, J.; Ruuskanen, O. Comparison of total count and serum C-reactive protein levels in confirmed bacterial and viral infections. J. Pediatrics 2006, 149, 721–724. [CrossRef][PubMed] 2. Khobragade, S.; Mor, D.D.; Patil, C.Y. Detection of leukemia in microscopic white blood cell images. In Proceedings of the 2015 International Conference on Information Processing (ICIP), Pune, India, 16–19 December 2015; pp. 435–440. Sensors 2021, 21, 512 14 of 14

3. De Jonge, H.J.M.; Valk, P.J.M.; De Bont, E.S.J.M.; Schuringa, J.J.; Ossenkoppele, G.; Vellenga, E.; Huls, G. Prognostic impact of white blood cell count in intermediate risk acute : Relevance of mutated NPM1 and FLT3-ITD. Haematologica 2011, 96, 1310–1317. [CrossRef][PubMed] 4. Feng, F.; Sun, L.; Zheng, G.; Liu, S.; Liu, Z.; Xu, G.; Guo, M.; Lian, X.; Fan, D.; Zhang, H. Low lymphocyte-to-white blood cell ratio and high monocyte-to-white blood cell ratio predict poor prognosis in gastric cancer. Oncotarget 2016, 8, 5281–5291. [CrossRef] [PubMed] 5. Ekpenyong, A.; Toepfner, N.; Fiddler, C.; Herbig, M.; Li, W.; Cojoc, G.; Summers, C.; Guck, J.; Chilvers, E.R. Mechanical deformation induces depolarization of neutrophils. Sci. Adv. 2017, 3, e1602536. [CrossRef][PubMed] 6. Moshavash, Z.; Danyali, H.; Helfroush, M.S. An Automatic and Robust Decision Support System for Accurate Acute Leukemia Diagnosis from Blood Microscopic Images. J. Digit. Imaging 2018, 31, 702–717. [CrossRef] 7. Gulati, G.; Song, J.; Florea, A.D.; Gong, J. Purpose and Criteria for Blood Smear Scan, Blood Smear Examination, and Blood Smear Review. Ann. Lab. Med. 2013, 33, 1–7. [CrossRef] 8. Young, N.A.; Flaherty, D.K.; Airey, D.C.P.; Varlan, P.A.; Aworunse, F.; Kaas, J.H.P.; Collins, C.E. Use of flow cytometry for high-throughput cell population estimates in brain tissue. Front. Neuroanat. 2012, 6, 27. [CrossRef] 9. Xu, D.; Huang, X.; Guo, J.; Ma, X. Automatic smartphone-based microfluidic biosensor system at the point of care. Biosens. Bioelectron. 2018, 110, 78–88. [CrossRef] 10. Huang, X.; Xu, D.; Chen, J.; Liu, J.; Li, Y.; Song, J.; Ma, X.; Guo, J. Smartphone-based analytical biosensors. Analyst 2018, 143, 5339–5351. [CrossRef] 11. Su, M.-C.; Cheng, C.-Y.; Wang, P.-C. A Neural-Network-Based Approach to White Blood Cell Classification. Sci. World J. 2014, 2014, 1–9. [CrossRef] 12. Krizhevsky, A.; Sutskever, I.; Hinton, G.E. Imagenet classification with deep convolutional neural networks. Commun. ACM 2017, 60, 84–90. [CrossRef] 13. Moen, E.; Bannon, D.; Kudo, T.; Graf, W.; Covert, M.; Van Valen, D. Deep learning for cellular image analysis. Nat. Methods. 2019, 16, 1233–1246. [CrossRef] 14. Qin, F.; Gao, N.; Peng, Y.; Wu, Z.; Shen, S.; Grudtsin, A. Fine-grained leukocyte classification with deep residual learning for microscopic images. Comput. Methods Programs Biomed. 2018, 162, 243–252. [CrossRef][PubMed] 15. Wibawa, M.S. A Comparison Study between Deep Learning and Conventional Machine Learning on White Blood Cells Classifi- cation. In Proceedings of the International Conference on Orange Technologies (ICOT), Nusa Dua, Indonesia, 23–26 October 2018. 16. Zhao, J.; Zhang, M.; Zhou, Z.; Chu, J.; Cao, F. Automatic detection and classification of leukocytes using convolutional neural networks. Med. Biol. Eng. Comput. 2016, 55, 1287–1301. [CrossRef] 17. Li, Y.; Cornelis, B.; Dusa, A.; Vanmeerbeeck, G.; Vercruysse, D.; Sohn, E.; Blaszkiewicz, K.; Prodanov, D.; Schelkens, P.; Lagae, L. Accurate label-free 3-part leukocyte recognition with single cell lens-free imaging flow cytometry. Comput. Biol. Med. 2018, 96, 147–156. [CrossRef][PubMed] 18. Wu, T.-F.; Mei, Z.; Lo, Y.-H. Label-free optofluidic cell classifier utilizing support vector machines. Sens. Actuators B Chem. 2013, 186, 327–332. [CrossRef] 19. Jundi, B.; Ryu, H.; Lee, D.-H.; Abdulnour, R.-E.E.; Engstrom, B.D.; Levy, B.D.; Higuera, A.; Pinilla-Vera, M.; Benson, M.E.; Lee, J.; et al. Leukocyte function assessed via serial microlitre sampling of peripheral blood from patients correlates with disease severity. Nat. Biomed. Eng. 2019, 3, 961–973. [CrossRef] 20. Otsu, N. A threshold selection method from gray-level histograms. IEEE Trans. Syst. Man Cybern. 1979, 9, 62–66. [CrossRef] 21. He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016. 22. Reddy, R.V.K.; Rao, B.S.; Raju, K.P. Handwritten Hindi Digits Recognition Using Convolutional Neural Network with RMSprop Optimization. In Proceedings of the 2nd International Conference on Intelligent Computing and Control Systems (ICICCS), Madurai, India, 14–15 June 2018; pp. 45–51. 23. Meimban, R.J.; Fernando, A.R.; Monsura, A.; Ranada, J.; Apduhan, J. Blood Cells Counting using Python OpenCV. In Proceedings of the 14th IEEE International Conference on Signal. Processing (ICSP), Beijing, China, 12–16 August 2018; pp. 50–53. [CrossRef] 24. Lippeveld, M.; Knill, C.; Ladlow, E.; Fuller, A.; Michaelis, L.J.; Saeys, Y.; Filby, A.; Peralta, D. Classification of Human White Blood Cells Using Machine Learning for Stain-Free Imaging Flow Cytometry. Cytom. Part A 2019, 97, 308–319. [CrossRef] 25. Banik, P.P.; Saha, R.; Kim, K.-D. Fused Convolutional Neural Network for White Blood Cell Image Classification. In Proceedings of the 2019 International Conference on Artificial Intelligence in Information and Communication (ICAIIC), Okinawa, Japan, 11–13 February 2019; pp. 238–240. 26. Shahin, A.; Guo, Y.; Fouad, M.M.M.; Sharawi, A.A. White blood cells identification system based on convolutional deep neural learning networks. Comput. Methods Programs Biomed. 2019, 168, 69–80. [CrossRef] 27. Nassar, M.; Doan, M.; Filby, A.; Wolkenhauer, O.; Fogg, D.K.; Piasecka, J.; Thornton, C.A.; Carpenter, A.E.; Summers, H.D.; Rees, P.; et al. Label-Free Identification of White Blood Cells Using Machine Learning. Cytom. Part A 2019, 95, 836–842. [CrossRef] [PubMed]