# DeepSOCIAL: Social Distancing Monitoring and Infection Risk Assessment in COVID-19 Pandemic
## 4 Model Training and Experimental Results
### Zone-Based Risk Assessment  
We also tested the effectiveness of our model in assessing the long-term behaviour of the people. This can be valuable for health sector policymakers and governors to make timely decisions to save lives and reduce the consequent costs. Our experiments provided very interesting results that can be crucial to control the infection rates before it raises uncontrolled and unexpectedly. In addition to people inter-distance measurement, we considered a long-term spatio-temporal zone-based statistical analysis by tracking and logging the movement trajectory of people, density of each zone, the total number of people who violated the social-distancing measures, the total time of the violations for each person and as the whole, identifying high-risk zones and ultimately, creating an informative risk heat-map. In order to perform the analysis, a 2-D grid matrix \(G_{t}\in\mathbb{R}^{n\times h}\) (initially filled by zero) was created to keep the latest location of individuals using the input image sequences. \(G_{t}\) represents the status of the matrix at time \(t\) and \(w\) and \(h\) are the width and height of the input image \(I\), respectively. To consider environmental noise and better visualisation of the intended heat-map, every person was associated with a \(3\times 3\) Gaussian kernel \(k\):  
\[k(i,j)= \begin{bmatrix}0_{i-1,j-1}&1_{i,j-1}&0_{i+1,j-1}\\ 1_{i-1,j}&2_{i,j}&1_{i+1,j}\\ 0_{i-1,j+1}&1_{i,j+1}&0_{i+1,j+1}\\ \end{bmatrix}  \tag{23}\]  
where \(i\) and \(j\) indicate the centre point of the predicted box for each individual, \(p\). The grid matrix \(G\) will be updated for every new frame and accumulates the latest information of the detected people. \[G_{t}=G_{t-1}+P_{(x,y)}^{t}\quad\forall P\in D_{t} \tag{24}\]  
Figure 16 shows a sample representation of the accumulated tracking map after 500 frames of continuous people detection. Since COVID-19 is an airborne virus, breathing by any static person in a fixed location can increase the density of the contamination on that point (assuming the person may carry the COVID-19), particularly in covered places with minimal ventilation. Therefore we can assign a more contamination weight to the steady-state people. Figure 16a,b shows two instances of cases where two people were steady in two particular locations of the grid for a long period; hence, the heat map was turning red for those locations. Both  
Figure 16: Accumulated tracking maps after 500 frames. Blue: low-risk, Red: high-risk  
side-walks also showed stronger heat map than the middle of the street due to the higher traffic of people movements. In general, the more red grids potentially indicate more risky spots. In addition to people raw movement and tracking data, it would be more beneficial to analyse the density and the location of the people who particularly violated the social distancing measures. In order to have a comprehensive set of information, we aimed to represent a long term heat-map of the environment based on the combination of accumulated detections, movements, steady-state people, and total number of breaches of the social-distancing. This helped to identify risky zones, or redesign the layout of the environment to make it a safer place, or to apply more restrictions and/or limited access to particular zones. The restriction rules may vary depending on the application and the nature of the environment (e.g., this can vary in a hospital compared to a school). Applying the social distancing violation criteria as per Equation (20), we identified each individual in one of the following categories:  
* **Safe** : All people who observed the social distancing (green circles). \[Z_{g}^{t}=\{P^{t}|V_{P}^{t}=0\}\] (25)
* **High-risk**: All people who violated the social distancing (red circles). \[Z_{r}^{t}=\{P^{t}|V_{P}^{t}=1\}\] (26)
* **Potentially risky**: Those people who moved together (yellow circles) and were identified as coupled.