# A Cell Counting Framework Based on Random Forest and Density Map
## 2 Related Work  
Since [PERSON] and [PERSON] creatively put forward a learning framework for object counting [1], the counting task has made great progress. They cast the counting task as the prediction of the objects' distributions and placed a dot near the center of an object to represent the object. With the discrete and sparse labels, it was tough to predict objects. To solve the problem, they defined a density function to smooth the isolated labels. The ultimate task was to predict the pixel-wise density value and the sum over the images was equal to the predicted count. In contrast, [PERSON] et al. proposed to learn the mapping between the feature vector and density by a regression forest with structured labels [2]. This model is very efficient and is an open-source project in an interactive toolkit [3]. [PERSON] et al. attempted to count cells using two RFs [4]. One judged if there is any cell in the superpixel and the other one predicted the number of cells in each superpixel. The CNNs are also popular in the counting task. [PERSON] et al. used a fully convolutional regression network (FCRN) to estimate the density map and it performed well in both synthetic images and real images [5]. [PERSON] et al. proposed to count cells by redundant counting [6] and improved the performance further. On the predicted density map, cells can be located by finding the local maxima or applying the non-maxima suppression algorithm [7; 8; 9]. [PERSON] et al. took the fully convolutional network (FCN) as the backbone and found the local maxima beyond the threshold on predicted density maps, the detection result was regarded as the counting results [10]. [PERSON] et al. combined the U-Net [11] with the residual network [12] and multi-scale dilated network [13] to enlarge the receptive fields and located the centroids of cells on predicted maps [14]. [PERSON] et al. presented a CNN to regress structured patches and the detections get more robust [15]. Another way to count cells is by detecting cells one by one. [PERSON] et al. detected objects by integer programming on the predicted density map, which worked for small instances [16]. [PERSON] et al. adopted two CNNs to segment cells, whose by-product was the number of cells. The first CNN predicted cell proposals with bounding boxes and the second CNN predicted the masks for segmented cells [17]. [PERSON] leveraged the sparsity of labels to encode the positions of cells by compressive sensing and recovered the positions by decoding the prediction [18]. Recently, the attention mechanism [19; 20] has been widely used to improve the performances of CNN-based models. U-Net with a self-attention module (named SAU-Net) [21] incorporates a self-attention module to explore the long-range dependencies between pixels by a huge attention matrix. Excluded the learning frameworks, some approaches based on traditional image processing techniques can also count cells automatically. [PERSON] et al. used Hough transform to detect red blood cells [22], but it was highly dependent on the shape of cells. [PERSON] et al. leveraged the luminance information of fluorescence cells and treated the appearance as a topological surface, then analyzed the gray histogram and divided the image into different connected components [23]. The count result was obtained by selecting the target components. It is obvious that the method requires the particular appearance of cells and thus it cannot handle the complex images. To count the cell clusters, researchers tried to take advantage of the concavity where cells overlap to analyze how many cells the cluster contains. [PERSON] et al. implemented the counting task in two steps [24]. The first was to extract the cluster's edge and the second was to separate the single cells by detecting concavities. The premise of this work is the clear boundaries. The defocused cells or debris will degrade the detection. The distance transform algorithm is a common way to segment cell clusters. However, it may fail when cells overlap too much. [PERSON] et al.