# Complete Blood Cell Detection and Counting Based on Deep Neural Networks
## 3 Materials and Methods
### Proposed Architecture  
Figure 1 shows the proposed architecture. The blood smear images are first preprocessed by four stages: image augmentation, enlargement, sharpening, and blurring. CNN, which was devoted to extracting and generating fundamental feature maps, served as the backbone of the model. In this paper, VGG-16 [31] was adopted. We then added the Region Proposal Network (RPN) introduced in Faster R-CNN [36; 37; 38; 39; 40; 41] to hypothesize blood cell locations. In the RoI (Region of Interest) Pooling layer, the information from the feature maps and RPN are combined to generate potential feature vectors. The following classifier uses these feature vectors to predict the coordinates and categories of the detected blood cells. To improve the performance of small detection, we adopted the feature fusion method [42; 43] to yield better feature maps. In addition, we leveraged the Convolutional Block Attention Module (CBAM) [44] for adaptive feature refinement. VGG-16 [31] can be considered to be a composition of five blocks with a total of 13 convolutional layers, 5 pooling layers, and 3 fully-connected layers, as shown in the upper part of Figure 2. In the convolutional layers, VGG-16 employs 3 \(\times\) 3 filters to generate feature maps with different resolutions. The pooling layer performs max-pooling by a 2 \(\times\) 2 window to reduce the resolution of the feature maps. The last fully-connected layer is a softmax layer in charge of classification. VGG-16 has shown its powerful capability in many visual recognition applications [34]. When an image is processed in VGG-16, the feature maps generated by the convolution layers will be reduced by max-pooling layers. The last feature maps might have insufficient information for the detection of very small objects, such as platelets. However, the feature maps generated in the middle layers still have abundant information. We adopted the feature fusion method to yield additional feature maps [42; 43]. Feature fusion includes three kinds of approaches: feature ranking, feature extraction, and feature combination. Here feature combination was adopted, and the process is illustrated in Figure 2. The feature maps generated by convolution layers Conv 3-3 and Conv 5-3 were combined to provide information in higher resolution. Figure 1: The proposed architecture. Figure 2: Feature fusion in the proposed architecture. We further adopted the Convolutional Block Attention Module (CBAM) [44] to emphasize the meaningful features. CBAM learns channel attention and spatial attention separately. It generates channel attention maps by exploiting the inter-channel relationship between the features and then generates spatial attention maps by utilizing the channel attention maps. Channel attention focuses on what is meaningful, given the input image. Spatial attention focuses on the location of informative parts, which is complementary to channel attention. We then adopted the architecture of Faster R-CNN [41] for blood cell detection, classification, and counting. In 2014, [PERSON] et al. proposed Region-Based CNN (R-CNN) [36] for object detection. It associated CNNs with domain-specific fine-tuning. R-CNN consists of three modules: region proposals, feature extraction, and object category classifiers. Later, Fast R-CNN [39] was proposed to speed up the computation of detection networks. It generated region proposals by selective search. RoI (Region of interest) Pooling layer extracted a set of fixed-size feature maps for projected region proposals. In 2015, Faster R-CNN was proposed; it introduced a Region Proposal Network (RPN), sharing feature maps with the CNN to yield region proposals [41]. In the RPN layer, it slid a window over the feature map to generate region proposals, also known as anchor boxes, and the corresponding lower-dimensional features. Each feature was fed into two sibling fully-connected layers in charge of regression and classification.