In some scenarios where individual and collective safety has to be constantly monitored, like people aggregations during the recent COVID-19 pandemic, estimating the number of people present in a region of interest is crucial to monitor the occupancy area. By measuring, and limiting, the number of people who can visit a location at any one time, it is possible to reduce the likelihood of setting up people gatherings and, consequently, minimize human virus transmission. Our solution relies on a dedicated plug-in that can work in two different modalities that the user can conveniently pick out, depending on the considered scenario. The first one, named Instance-based Pedestrian Counter, is better suited for not particularly crowded environments and relies on the pedestrian detector component previously described. The second, named Density-based Pedestrian Counter, is instead a more holistic approach more appropriate for highly crowded scenarios; it aims to compute a mapping between the features of the captured image and its pedestrian density maps, skipping the detection of the single instances. The estimated number of people present in the controlled area can then be obtained by integrating this density map. More information about this technique are provided in Section sec:back:visual-counting:traditional-approaches. We build our density map estimator upon the Congested Scene Recognition Network (CSRNet) [1]}, a CNN-based algorithm that can understand highly congested scenes and perform accurate density estimation, already described in sec:back:visual-counting:cnn-based and that we exploited also in ch:uda-counting and ch:counting-with-uncertainty, for estimating urban traffic density and counting cells in microscopy images, respectively.
