# A Cell Counting Framework Based on Random Forest and Density Map
## 4 Experiments and Results
### Results and Discussion
#### 4.3.4 The Effectiveness of CCF  
To demonstrate the effectiveness of suppressing the wrong detections by average, the detection maps of 10 RFs have been converted to density maps, as shown in Figure 14. Figure 14a,b are the true density map and the final density map, respectively. Figure 14c-l are the predicted density maps of 10 RFs, which are the smooth versions of detection maps. If paying attention to the regions marked with red boxes, we could see that the cells detected by several RFs in the largest box and smallest box have lower densities in the final density map, which are shown as the color is close to blue. There are four cases to be discussed which are similar to Figure 9a-d. (a) The cells that are detected by all RFs are also well reserved in the final density map. (b) The medium box where most RFs detected a cell has the highest error in the final density map. (c) The result of the large box is supported by  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Method** & **N = 10** & **N = 25** & **N = 50** \\ \hline CellProfiler [32] & \multicolumn{2}{c}{\(-25.06\pm 2.6\)-} \\ Adiposoft [33] & \multicolumn{2}{c}{\(-14.8\pm 13.6\)-} \\ Count-ception [6] & \(25.1\pm 2.9\) & \(21.9\pm 2.8\) & \(19.4\pm 2.2\) \\ SAU-Net [21] & N/A & N/A & \(14.2\pm 1.6\) \\ CCF & \(16.9\pm 1.9\) & \(14.5\pm 0.4\) & \(14.5\pm 0.4\) \\ \hline \hline \end{tabular}
\end{table}
Table 4: The comparison MAE on the Adipocyte cells. The testing set is fixed and 10 times training with different training data and different network initializations are used to calculate the mean and standard deviation.  
Figure 13: A test image of Adipocyte cells. The adipocyte cells are very various in shape and size. Some small cells are tightly surrounded by large cells. The results show that the proposed CCF can detect both small cells and large cells. The ground truth of the density map and the predicted density map are also listed.  
several RFs, whose bias is lower. (d) In the smallest box, there is only an RF detected a cell so the detection contributes 0.1 cells to the final result. This indicates that detection with low confidence can be suppressed differently depending on how many detection maps contain it. In this way, the final predicted result gets more robust.  
Someone may be curious that what happens if we use an RF that has as many DTs as CCF. Except for the number of DTs, we kept all parameters the same. However, we found the result gets worse. There are two reasons: (1) Too many trees cause overfitting. (2) The count result is decided by only one probability map and it is susceptible to noise, which is the motivation we proposed the CCF.  
Besides, we also displayed the strength of CCF intuitively by curves. To compare the bias and variance between CCF and RF, we took MAE and mean square error (MSE) as the metric to evaluate performance. MSE is defined as:  
\[MSE=\frac{1}{N}\sum_{i=1}^{N}(\hat{y_{i}}-y_{i})^{2} \tag{8}\]  
where, \(N\) is the number of images, \(\hat{y_{i}}\) and \(y_{i}\) are the predicted count and the ground truth of the \(i\)-th image.  
Figure 15 plots MAEs and MSEs on three datasets. The solid lines represent the results for the proposed CCF that consists of 10 RFs in this paper and the dot-dash lines represent the base RF. It can be observed that the MAEs of CCF are lower than the averaged MAE of 10 RFs and MSEs of CCF are also lower than the averaged MSE of 10 RFs, which means both the bias and variance are getting lower.  
Figure 14: The illustration of the suppression effect by average: (**a**) the true density map, (**b**) the final predicted density map, and (**c**-l) are the predicted density maps for 10 RFs.