Humans are social species as demonstrated by the fact that in everyday life people continuously interact with each other to achieve goals, or simply to exchange states of mind. One of the peculiar aspects of our social behavior involves the geometrical disposition of the people during an interplay, and in particular regards the interpersonal distance, which is also heavily dependent on cultural differences. However, the recent pandemic emergency has affected exactly these aspects, as the extraordinary capability of COVID-19 coronavirus of transferring between humans has imposed a sharp and sudden change to the way we approach each other, as well as rigid constraints on our inter-personal distance.
This recently imposed restriction is widely, but imprecisely, referred to as "social distancing" (SD) since prevention of the virus diffusion does not require us to weaken our social bonds. The likely reason of SD naming is that, from a cognitive point of view, physical and social aspects of distance are deeply intertwined [47] , a phenomenon that popular wisdom captures The VSD can be estimated in a single frame as the interpersonal distance between people (a 1m radius disk in this example). People that are closer than the imposed distance (red disks), i.e. not respecting geometry, might still respect public rules if having a bond of kinship. Results obtained using the following code: https://github.com/IIT-PAVIS/Social-Distancing. through a proverb that, in slightly different versions, appears in different languages and cultures, namely "far from eyes, far from heart".
Not surprisingly, the time spent in physical proximity with others, in opposition to the time spent in individual activities, is a crucial factor in the "social brain hypothesis", one of the most successful theories of human evolution [26] . Similarly, Attachment Theory, probably the development model most widely accepted in child psychiatry, revolves around the ability of children and parents to establish and maintain physical proximity [13] . Finally, the different modulation of interpersonal distances is known to be one of the main obstacles in intercultural communication [37] .
The above suggests that dealing with interpersonal distances means to deal with evolutionary, developmental and cultural forces that shape, to a significant extent, our everyday life. As a consequence, the role of technologies for the analysis of such distances becomes crucial during pandemics, given that they must mediate between the forces above, responsible for the human tendency to get too close to avoid contagion, and the pressure of prophylactic measures, artificially designed to fight a pathogen inaccessible to our senses and cognition.
One possible solution is to go beyond simply measuring how far we are are from one another, as most of the applications on the market are doing (see Sec. II-C) and try to make sense of what distances mean. In other words, to inform technologies with principles and laws of Proxemics, the psychology area showing how people convey social meaning through interpersonal distances and, ultimately, how social and physical dimensions of space interplay with one another [74] . Proxemics is strictly linked to the definition of people gath-erings, namely groups, and as such, it depends on its spatial organization and the number of people involved. In general, the surrounding space around a person is characterized by interpersonal distance classes [38] , namely: intimate, personal, peri-personal or social, and public spaces (see Fig. 3 ), all associated to different SDs, in turn, also dependent by the degree of kinship and familiarity between the subjects and by the geometrical configuration and size of the environment in which an interplay occurs. A blind application of social distancing rules, encouraging to stay further than 1-2 meters, will eliminate an entire interpersonal distance class and all of the social interactions which take play within it, including for example those between children and relatives. As can be noticed, behavior, social interactions, and space arrangements are tightly coupled, and affect each other. This is why it is important to take into considerations all these aspects when constraints in this respect are to be imposed, in particular when people health is in play.
For all these reasons, the focus of this paper lies on Visual Social Distancing (VSD), i.e. on approaches relying on video cameras and other imaging sensors (see Fig. 1 for an example) to analyse the proxemic behaviour of people. The main reason behind the choice of VSD is that computer vision and social signal processing have already developed methods for automatic measurement and understanding of interpersonal distances (see Sec. II for more details). Furthermore, VSD approaches have shown advantages that can complement other technologies like, e.g., mobile applications based on large-scale mobility patterns. In particular, VSD approaches can characterize interpersonal distances in terms of social relations (e.g., whether people at a certain distance are friends, family members or partners), thus allowing one to modulate interventions according to such an information. Furthermore, vision-based technologies can detect contextual information helpful to understand whether social distancing rules are actually being broken or not. For example, VSD can understand whether people get too close because the situation makes it necessary (e.g., when someone rescues a person in troubles) or whether the distance is not a problem (e.g., when people wear personal protective equipment and can safely stay close). Finally, VSD helps to understand the reason why some people stand close, distinguishing whether they are socializing among themselves, or if they are interacting with the environment (as for example looking at a timetable in the airport) thus suggesting the most proper countermeasure to ensure SD (eg. rising an audio alarm to discourage social interactions or putting markers into the floor so that people can watch the time table while keeping the right distances).
The advantages above appear to be of particular importance since at the moment social distancing rules have to be expressed in simplistic terms (e.g., people have to be at least 2 meters far from one another) that require one to distinguish between the intention (avoid contagion) and the rule (keep a minimum interpersonal distance). Such a distinction, evident to humans, poses a real and new challenge to a computational algorithm for VSD that could solve the problem by leveraging, for instance, the use of contextual information. Differently, the number of false alarms would be so high that any benefit resulting from the use of technology would be canceled.
In the following, we will discuss in detail the VSD problem and its connection to the Computer Vision and Social Signal Processing research domains. Starting from a geometrical point of view, i.e. estimating inter-personal distances between people from an image, we show that this first step does not take into account the scene and social contextual. For this reason, a further stage needs to elaborate the geometrical VSD in order to interpret if the violation of the distance is a real cause of alert or an acceptable situation (e.g. a family walking together). We then contextualise the VSD in a range of application that can benefit from its application and finally conclude with a description of the possible ethical shortcomings of the application.
Estimating the VSD requires the solution of a set of classical Computer Vision and Social Signal Processing tasks as identified in Fig. 2 , namely, scene geometry understanding (Sec. II-A), person detection/body pose estimation (Sec. II-B) and social distance characterization (Sec. II-C). Indeed, the geometry of the scene is a first important to define a local reference system for measuring inter-personal distances. Clearly, a second and important task is the detection of people in the scene in possibly crowded environments. Once the target people are correctly localised in a scene, their distance can be locally estimate in order to understand if the mutual distance is lower than a threshold (e.g. 1m or 2m). Afterwards, this metric information is analysed to output whether there is a violation of the protocol or the short distance is due to a legitimate situation, e.g. a family walking together.
In the following, we will describe these modules in detail retargeting, when possible, previous Computer Vision methods that can provide a solution to these problems.
The task of measuring social distancing from images requires the definition of a (local) metric reference system. This problem is strongly related to the single view metrology topic [20] as we consider the most common case of a fixed camera. An initial solution for estimating inter-personal distances requires the identification of the ground plane where people walks [50] , [79] , [40] , [62] , [1] , [102] , [107] . Such ground plane serves in many video-surveillance systems to visualise the scene as a bird's eye view for ease of visualisation and data statistics representation. Most works impose the assumption that the ground plane is planar. Then, the problem is to estimate an homography given some reference elements (e.g., known objects or manual measurements) extracted from the scene or using the information of detected vanishing points in the image [60] , [20] , [77] , [69] , [109] , [5] , [4] , [51] , [113] , [58] . Another common approach is to calibrate fixed cameras by observing the motion of dynamic objects such as pedestrians [53] , [95] , [59] , [91] . Recently, approaches based on deep learning attempts at estimating directly camera pose and intrinsic parameters on a single image [41] , [57] .
Even if these approaches might provide an estimate of the camera intrinsic/extrinsic parameters and the detection of the ground plane, still VSD estimation requires a metric reference. Such information can be coarsely computed in the scene given objects of known dimension or by using a standardised height of pedestrians as a rule of thumb [102] , [8] , [100] . Given the current state of the art, we have the following observations related to the geometrical aspects of VSD:
• Although the planarity constraint might not hold for the entire image, VSD has to do a local estimation of proximity for which is safe to relax the scene being piecewise planar. • Self-calibration approaches highly rely on the existence of a Manhattan world (e.g. vanishing points are detectable) or pedestrian walking in straight trajectories, which limit the applicability of such methods. Depth from single image might be a viable option, but a metric reference is still needed. • Estimating a metric reference for precise SD measures from images is an issue. Such reference extracted from pedestrians might be unreliable given the variations in anthropometric characteristics. Reasoning on the geometrical context of the scene (e.g., object shapes) can lead to a more robust metric estimate. It is also important to emphasizes here that VSD is a simpler problem than estimating every metric distances among people in any position in the image. SD is necessary when two or more pedestrians get close enough for triggering the necessity of a measure. At this point, a local reference system can be estimated and metric references can be leveraged by using surrounding objects and the height of the local cluster of people.
To this end, the SSP problem of detecting and tracking the formation of groups [6] , [21] , [28] , [83] , [88] can be useful for selecting which pedestrians should be used as a subset for estimating the local VSD. These local estimates with an associated metric reference can be useful whenever a global camera pose is hard to estimate or if the single ground plane assumption is violated, a likely occurrence in an unconstrained scenario.
Person detection has reached impressive performance in the last decade given the interest in automotive industry and other application fields [9] . Real-time approaches can now estimate people pose even in complex scenario [14] and even reconstruct a 3D mesh of the person body [35] . The majority of the approaches estimate not only people location as a bounding box but also 2D stick-like figures, so conveying a schematic representation of the pose. Recently, several methods augment 2D poses in 3D or infer directly a 3D pose in a normalised reference system [103] , [71] , [93] , [68] , [63] , [11] , [67] , [75] , [114] .
Capturing diffused small SDs with Computer Vision requires to individuate multiple people, realizing the hardest scenario for pedestrian detection techniques. Specific pedestrian techniques have been designed to work in crowded scenes [97] , [106] , [55] , [29] , where skeleton-based representations are often drop in favour of saliency-based masks, especially focusing on heads. When the image resolution becomes too low to spot single people, regression-based approaches are employed [12] , [15] , [54] , [80] , [104] , [111] , [92] , providing in some case density measures [87] , [110] , [73] , [86] . This information, merged with a geometric model of the scene, will directly lead to a measure of the average SD in the field of view. Obviously, regression or density-based approaches cannot provide additional cues on pose which are highly important for capturing human actions and interactions. To fill this gap, ad-hoc approaches individuate general crowd activities, classifying them as normal or not (e.g. a person collapsing and many people getting close) [25] , [34] , [70] , [72] .
Recently, new efforts tend towards solving the human detection and body pose estimation in crowded environments [32] , [52] , the very same scenario social distancing is dealing with. Yet, finding the location of people in such cases is of relevant importance to alert or creating statistics of overcrowded areas. To this end, a people detection module has to be robust to severe self and other objects/people occlusions, different image scales, and indoor/outdoor scenarios. Although a person detection (i.e., without the pose) may be enough for estimating the VSD, finding joints and body parts of pedestrian has certain advantages. This is due the fact that to obtain an approximate metric reference, or even calibrating cameras, usually the person height is used as a coarse proxy as computed from a bounding box or by more precise techniques [102] , [100] , [8] , [24] , [36] . However, bounding boxes do not account for different body poses (e.g., sitting, riding) that might negatively impact the estimate of height and thus a wrong VSD. Another issue is related to occlusions, i.e. how much is reliable to extract a person height without having a full body information? This is necessary in the likely case of crowded environments or whenever an object partially hides person body parts (e.g., a person seated at a desk).
Given a metric reference from scene geometry and the position/pose of the people in the scene, the SD can be calculated as a distance on the ground plane (feet/body pose centroid) among all the possible detected pedestrians. As previously discussed, this information can be estimated locally or pairwise in order to reduce the complexity of estimating a global reference system for the whole image.
Social distances should be complemented with additional contextual information to understand whether social distancing rules are actually being broken or not, suggesting as a consequence the most proper reaction. Fig. 4 reports a multi-layer pipeline, which will be detailed in the following, indicating which information can be accessed with the current Computer Vision technology. The deeper the layer (indicated by a darker color), the finer the visual analysis which is needed and the harder the corresponding request for Computer Vision.
As previously stated, SDs taking values above a certain threshold would certainly comply with social distancing rules. On the contrary, the presence of SDs under a certain threshold (SD<Thresh in Fig. 4 ) could be considered as breaking the rules, but actually many are the scenarios where this should not raise any concern.
For example, occasional small SDs holding for few frames, especially in a crowded scenario (the few and occasional small SDs blob in the figure), can be allowed, considering that they are detected by automatic approaches which are not exact. Instead, small SDs can be critical if they are 1) diffused and/or 2) persistent.
In the former case, a high percentage of small SDs is characterizing the monitored area: This may occur at a crossing intersection or walking in a corridor of an airport. Here, many persons stand close, without an explicit will, possibly for a short (∼seconds) period. Computer Vision helps here providing robust approaches for pedestrian detection and counting, discussed in Sec. II-B.
Persisting small SDs mean that specific people stand close to each other for a certain time interval. This condition addresses a more interesting situation, since it likely indicates people that stay close by intention. Under a Computer Vision point of view, persisting small SDs are more difficult to capture, since they require people to be tracked continuously, maintaining their identity. Interested readers may refer to [23] , [56] , discussing the problem of tracking in crowded situations. In Social Signal Processing, diffused and/or persisting small SDs individuate gatherings [30] , [31] , [47] , [84] , addressed generically as "groups" or "crowds" in Computer Vision. The term gathering refers precisely to "any set of two or more individuals in mutual presence at a given moment who are having some form of social interaction" [31] . With the expression social interaction we mean the process by which we act and react to those around us [84] . Many types of gatherings are documented in the sociological literature, depending on:
• number of people being part of the gathering; • type of social interaction; • spatial dynamics. As for the number of people, we may have small (2 to 6 people), medium (7 to 12-30 people), or large gatherings (larger than 13-31) [39] .
Small gatherings happen in private (home, private garden, car), semi public (classroom, office, club, party area) and public places (open plaza, transportation station, walkway, park, street). Medium gatherings occur in private, but mostly in semi-public and public places, the latter being also the preferred venues of large gatherings [39] .
As for the type of social interaction, unfocused interaction occurs whenever individuals find themselves by circumstance in the immediate presence of others. For instance, when forming a queue, or when walking in the crowded corridor of an airport. On such occasions, simply by virtue of the reciprocal presence, some form of interpersonal communication must take place regardless of individual intent.
For our study, having people forming an unfocused gathering and exhibiting small SD may indicate a problematic scenario, since it is the context which encourages the formation of tight gatherings and not the will of people. As a consequence, to avoid such type of gathering may require a change of the context itself, for example discouraging the queues with markers on the floor, or creating lanes with barricades.
Conversely, focused interaction occurs whenever two or more individuals willingly agree -although such an agreement is rarely verbalised -to sustain for a period a single focus of cognitive and visual attention [30] .
Focused gatherings can be further distinguished in common focused and jointly focused [46] . In the former case, the focus of attention is common and not reciprocal, for example watching a timetable screen at the airport, watching a map in the metro station, being at a concert. Common focused gathering exhibiting small SDs can be dealt more easily than in presence of unfocused gathering, since in this case the reason of the gathering is easier to be captured, which is the item or event attracting the common attention of people.
Jointly focused gathering, finally, entails the sense of mutual, instead of merely common, activity. In a jointly focused gathering the participation, in other words, is not at all peripheral but engaged; people are -and display to be -mutually involved [31] . Since the presence of a jointly focused gathering depend on the will of people, when this is characterized by a small social distance, it can be discouraged by simply alerting the people about the ongoing critical setup. An exception for this scenario occurs when a jointly focused gathering involves children, since children have to be accompanied, and are usually at a physical contact with their relatives.
Some combinations of these attributes give rise to specific types of gatherings (shown in Fig. 5) , some of them addressed by explicit definitions: small gatherings of jointly focused people, mostly static, are dubbed by Kendon freestanding conversational groups [47] , highlighting their spontaneous aggregation/disgregation nature, implying that their members are jointly focused, and specifying their mainly-static proxemic layout. Large gatherings of unfocused people are named casual crowds [10] ; commonly focused large gathering refers to spectator crowd [10] and, finally, large gatherings of jointly focused people are demonstration/protest or Acting crowd [66] .
As anticipated above, most Computer Vision approaches do not build upon this taxonomy, distinguishing merely gatherings depending on the number of individuals involved, leading to groups (= small gathering for sociology) and crowds (= large gatherings), with some exception presented in the following. Groups have been usually identified exploiting positional and velocity cues (people in a group is close and move with similar oriented velocity) [33] , [76] , [42] , [81] , [88] , [89] , [90] , [78] , [94] . Explicit focus on free-standing conversation groups is given in [21] , [44] , [84] , [82] , [98] , [99] . In most of these latter approaches, positional and velocity cues are enriched by pose information, fully capturing the people proxemics. Coming back to the characterization of SDs, and to Fig. 4 , joint-focused groups where people stand closer than a given threshold requires maximal attention, since their vicinity is by choice, and not by external circumstances. At this level of characterization, avoiding false alarms would mean to focus on the age of the interactants: Having children in a small gathering would probably indicate a family. Approaches like [112] estimate the age from pedestrian detections, but solving this task efficiently seems to be still at its early stages.
As for the modelling of crowd, some approaches allow to estimate the number of individuals [12] , [15] , [54] , [80] , [104] or their density [86] , [87] , [110] . Social Signal Processing approaches for large gatherings focus specifically on commonfocused formations (aka spectator crowd), here too capturing proxemic cues including the body pose [19] , [18] . Medium gatherings have never been properly addressed neither by Computer Vision nor Social Signal Processing literature. Finally, we should consider the static/dynamic axis concerning the degree of freedom and flexibility of the spatial, positional, and orientational organisation of gatherings. Distinguishing between uncommon, common-focused and jointly focused is hard, since when a gathering is moving, their members spend attention to follow safe trajectories, avoiding collisions. Therefore, the aforementioned taxonomy holds especially for static formations, with few exceptions [17] . When people are moving, the only valid distinction that Computer Vision and Social Signal Processing do follow is that of small and large gathering.
For small gathering, temporal information allows one to provide stronger grouping estimations, analyzing pedestrians motion paths instead of static positions [64] , [88] , [101] . For large gathering, many approaches identify dominant flows and segment crowd according to coherent motion [16] , [45] , [96] , [105] , and to identity collective/abnormal behaviors [25] , [34] , [70] , [72] .
Summarizing, once small SDs are detected, it is necessary to understand if they are persistent and/or diffused in the scene. Then, proxemic analysis is needed to characterize the gatherings which are generating the SDs. Unfocused gatherings would indicate SDs are caused by no explicit will; common-focused gatherings come usually because of the presence of precise environmental conditions (a manufact or an event attracting the attention); jointly-focused gatherings indicate explicit will of interacting, and could be further described by capturing the age of interactants (kinship). Each of these formations may demand for different interventions, thus going beyond the simple alarm when SDs are too small, and diminishing false positive alarms.
Computer vision approaches following this taxonomy exist for jointly focused (small) gatherings, (large) common focused gatherings, and show that positional and body pose cues are of primary importance. Future work has to be done to cover all the possible types of gatherings, as current technology is still struggling to achieve a solution, especially when they are composed by several people.
While potentially playing a crucial role in the case of a virus outbreak, technology developed for the analysis of social distancing can be useful in a large number of application domains that, therefore, can benefit from the approaches proposed in this work.
The detection of mental health issues is one of the areas that will benefit most from the application of AI 1 , supported 1 According to the Gartner Group, a relevant strategic consulting company: http://www.gartner.com/smarterwithgartner/ 13-surprising-uses-for-emotion-ai-technology/ by the World Health Organization observing that a pathology like depression affects around 300 millions people around the world [108] . In such a particular case, the tendency to avoid physical proximity and engagement with others is an important symptom. The technologies proposed in this work can also help the increase of SD, especially when it is hard to observe. Similarly, the analysis of interpersonal distances can help to identify children with insecure attachment, known to manifest their condition through irregular proximity patterns (among other cues) [13] .
Another important domain where the analysis of SD is important is social robotics. In particular, the International Federation of Robotics pointed out that public relation robots are the fastest growing area of service robotics with estimates in sales moved from a total of USD 319 million in the period 2015-2017, to a total of USD 746 million between 2018 and 2020.In this field, the use of proxemics appears to be particularly important to ensure that a robot is perceived to play correctly its role (e.g. whether it is expected to be a servant or a companion in playing) [49] and to establish a sense of intimacy [48] , an aspect of focal importance in assistive robotics. In addition, distance plays a major role along one of the five Godspeed dimensions typically used to assess the quality of human-robot interaction, namely perceived safety [3] .
In the last years, most major companies have introduced training to avoid unconscious bias, i.e. the tendency to discriminate certain categories of people without being aware of it. This happens not only for ethical reasons, but also because McKinsey has shown that companies ensuring diversity in their workforce, especially at the top management levels, are 30% more likely to be above national median in terms of financial returns [43] . As a consequence, major companies like Facebook (https://managingbias.fb.com) and Google (https://diversity.google) adopt implicit training programs. Furthermore, Forbes estimates that the market of implicit bias and diversity training has reached a value close to USD 9 billion-a-year (http://goo.gl/R53xn4). Unconscious bias leaves different traces in nonverbal behaviour and one of these is the increase of physical distances (see, e.g. [65] ). Therefore, automatic technologies for proxemics analysis can help to detect the phenomenon, contributing to protect the potential victims, and train the bias bearers to identify and attenuate their tendencies to discriminate others.
A large number of studies show that the architectural design of space influences the behaviour of its inhabitants [61] . For example, a simple line on the floor separating right and left side of a corridor makes the flow of people through it more ordered [2] . Similarly, the restructuring of Westminster in the UK aims at improving the efficiency of parliamentary works, but encounters the opposition of Parliament workers afraid of disrupting established traditions by the change of the way space is organised [85] . Until now, the study of these phenomena has been performed mainly through ethnographic observations, but the development of technologies for proxemic analysis can certainly help by producing more objective and quantitative data about the change in habits of the people. This is in line with previous works about the study of organisations through the use of smart badges detecting who is in proximity with whom in an organisation [27] .
Besides the application scenarios above, likely to benefit from the technologies presented in this work in the future, there are established domains that can benefit from models of mutual distancing. For example, Augmented and Mixed Reality technologies can provide more immersive and engaging experiences through the inclusion of virtual characters capable to move with respect to users like humans do with respect to one another. Similarly, surveillance systems can further refine their ability to detect events of interest in a given environment like, e.g., an aggression in a public space. Finally, technologies analysing interpersonal distances can be of help to social psychologists that investigate the dynamics of social interactions. In other words, far from being exhaustive, the list of application domains listed in this section still provides an indication of how wide the application of VSD can be once the Covid 19 outbreak, at the origin of the most recent interest towards interpersonal distances, will be over.
Optical cameras are the most widespread sensors for VSD measurements and the acceptance of this monitoring technology can be difficult since it clearly raises privacy concerns. Video footage may disclose the identity of the persons captured and in general recording is regulated by strict laws, both at national and international level. Moreover, potential attacks to the video transmission channels and to storage servers can pose a relevant security issue.
However, the current computer vision technology is now mature to manage effectively privacy concerns. Alternatives benefit from the usage of the so-called smart cameras [7] , which have computing capability onboard, able to process video data up to a certain capacity. By adopting a privacy-bydesign principle, a first option is to process video sequences internally, while measuring and transfer only VSD estimates without any image, thus sensible data, being transmitted to the remote control operative room. This is of crucial importance for VSD, since as we have been shown in the previous sections, accurate estimates may requires the identification of kinship. This sensible information clearly is not necessary to disclose for estimating VSD and any possible leak has to be avoided.
At the same time it is worth noting that VSD technology exhibits features which differentiate it from other apparently safer alternatives, as geolocation data collected from mobile applications. VSD techniques are in fact non-invasive and mostly non-collaborative, meaning that the user does not need to provide ID personal data. Tracing technologies, on the contrary, need to be fed with sensible data and even when this is totally anonymized, recent research [22] proves that individuals may still be identified by a few information -four spatio-temporal points allows one to uniquely identify 95% of people in a mobile phone database of 1.5 million subjects and 90% of people in a credit card database of 1 million individuals.
In this paper we have presented the VSD problem as the estimation and characterization of inter-personal distances from images. Solving such problems allows a quick screening of the population for detecting potential behaviours that can cause a health risk, especially related to recent pandemic outbreaks. We pointed out that VSD is not only a Computer Vision problem related to geometrical proxemic since people distancing has to be weighted given the social context in the current scene. Close relationships can allow closer interpersonal distances as well as being a caretaker of individuals with fragile conditions. We have shown that understanding such social context is a compelling problem in the literature of signal social processing that requires further research efforts for a reliable solution. As the solution is intertwined with the decoding of social relationship from images, there are strong ethical and privacy concerns that need to be addressed with novel privacy-by-design solutions. Past this grievous global crisis, VSD has still an important role in several application fields thus providing a continuous source of interest in this new problem.