In the segmentation task, inspired by [1]}, [2]}, we introduce a novel loss in crowd counting which is based on the dice coefficient. The loss is optimized to predict the segmentation map for the human head. The dice coefficient \(D(\hat{s_{i}},s_{i})\)  is between 0 and 1. In the process of optimization, \(D(\hat{s_{i}},s_{i})\)  is expected to maximize, and the loss \(L_{seg}\)  is expected to minimize. They are formulated as;
\(D(\hat{s_{i}},s_{i}) = \frac{2\sum _{i}^{U}\hat{s_{i}}s_{i}}{\sum _{i}^{U}\hat{s_{i}}^{2} + \sum _{i}^{U}s_{i}^{2} },\) 
\(L_{seg} = 1 - D(\hat{s_{i}},s_{i}),\) 
