# DeepSOCIAL: Social Distancing Monitoring and Infection Risk Assessment in COVID-19 Pandemic
## 4 Model Training and Experimental Results
### Social Distancing Evaluations  
We considered the midpoint of the bottom edge of the detected bounding boxes as our reference points (i.e., shoes' location). After the IPM, we would expect to have the location of each person, in the homogeneous space of BEV with a linear distance representation. Any two people \(P_{i},P_{j}\) with the Euclidean distance of smaller than \(r\) (i.e., the set restriction) in the BEV space were considered as contributors in social distancing violation:  
Depending on the type of overlapping and the violation assessment criteria, we define a violation detection function \(V\) with the input parameters of a pixel metrics \(\xi\), the set safe distance of \(r\) (e.g., \(6 ft\) or \(\approx\)2 m), the position of the query human \(H_{q}\), and the closest surrounding person \(P_{o}\). \[V=\Lambda_{\xi}(H_{q},P_{o},r) \tag{20}\]  
where \(\xi\) is the number of pixels in a line that represent a 1.0-m length in the BEV space. Figure 13 left (from Oxford Town Centre Dataset [31]) shows the detected people followed by the steps we have taken for inter-people distance estimation including tracking, IPM, homogeneous \(360^{\circ}\) distance estimation, safe movements (people in green circles) and the violating people (with overlapping red circles):  
\[\Lambda_{\xi}(P_{i},P_{j},r)= \begin{cases}1&\text{if }\sqrt{(x_{i}-x_{j})^{2}+(y_{i}-y_{j})^{2}} \leq r\\ 0&\text{if }\sqrt{(x_{i}-x_{j})^{2}+(y_{i}-y_{j})^{2}}>r\end{cases}  \tag{21}\]  
Regarding the Oxford Town Centre (OTC) dataset, every 10 pixels in the BEV space was equivalent to 98 cm in the real world. Therefore, \(r\approx 2\times\xi\) and equal to 20 pixels. The inter-people distance measurement was measured based on the Euclidean \(L2\) norm distance (Equation (21)). One of the controversial opinions that we received from health authorities was the way of dealing with family members and couples in social distancing monitoring. Some researchers believed social distancing should apply on every single individual without any exceptions and others were advising the couples and family members can walk in a close proximity without being counted as a breach of social distancing. In some countries such as in the UK and EU region the guideline allows two family members or a couple walk together without considering it as the breach of social distancing. We also considered a solution to activate the couple detection. This will be helpful when we aim at recognising  
Figure 12: Human detection with partial visibility (missing upper body parts). **(a)** DeepSOCIAL (**b)** YOLOv4 trained on MS-COCO, **(c)** YOLOv3 (**d**) Ground-truth annotations from the Oxford Town Centre (OTC) dataset. Figure 13: The summary of the steps taken in Sections 3.1–3.3 for people detection, tracking, and distance estimation. risky zones based on the statistical analysis of overall movements and social distancing violations over a mid or long period (e.g., from few hours to few days). Applying a temporal data analysis approach, we consider two individuals \((p_{i},p_{j})\) as a couple, if they are less than \(d\) meters apart in an adjacency, for a \(t_{\Lambda}\) of more than \(\varepsilon\) seconds. As an example, in Figure 14a, we have identified people who have been less a meter apart from each other for more than \(\varepsilon=5\) s, in the same moving trajectory:  
\[ \begin{split} C(p_{i},p_{j})=1&\quad\text{IF}\quad p _{i},p_{j}\in D\\ \text{AND}&\quad\Lambda_{\xi}(p_{i},p_{j},d)=1\\ \text{AND}&\quad t_{\Lambda}(p_{i},p_{j})>\varepsilon \end{split}  \tag{22}\]  
Figure 14b shows a sample of our representation for detected couples in a scene as well as multiple cases of social distancing violations. The yellow circles drawn for people diagnosed as couples have a radios of \((2+\frac{d_{\xi}}{2})\) meter to ensure a minimum safety distance of 2 m for each of them to their left and right neighbours. \(d_{c}\) is the distance of coupled members to each other.