## 2 Proposed Solution  
This section explains the graph-based computer vision framework proposed to quantify the risk of COVID-19 transmission in various public scenarios. The input video feed from closed circuit television (CCTV) footage is first used to extract key information such as people, handshake interactions, and face masks through computer vision models. The proposed system then quantifies the risk of transmission of COVID-19 by encoding the extracted information into a temporal graph and interpreting it using a function for the threat of transmission developed in this paper. An overview of the proposed system is depicted in Figure 1.  
The system takes a video stream \(V_{in}(t)\) as the input, where \(t\) denotes the frame number. The video stream is considered to be captured from a CCTV system camera mounted at the desired vantage point with a known frame rate. \(V_{in}(t)\) is a three-dimensional matrix with the dimensions \(H\times W\times 3\), where \(H\) and \(W\) denote the frame's height and width, respectively.  
The video feed, \(V_{in}(t)\), was passed into a series of functions \(F_{i}\) ; \(i\in\{p,d,g,h,m\}\). Each \(F_{i}\) processes a video frame and produces different information as  
\[J_{i}(t)=F_{i}\big{(}V_{in}(t)\big{)} \tag{1}\]  
where \(J_{i}(t)\) denotes an output, such as the locations of people, handshake interactions, or the presence of face masks. While the functions \(F_{i}\)s process individual frames, processing a sequence of frames is required to analyze this information across time. Therefore, a collection of trackers \(\overline{F_{i}}\) was employed to track the above-mentioned detections provided by \(F_{i}\)s over time as  
\[[S_{i}(t),\overline{J_{i}}(t)]=\overline{F_{i}}\Big{(}V_{in}(t),J_{i}(t),S_{ i}(t-1)\Big{)} \tag{2}\]  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Social Distancing Measure** & **Specifics** & **Handled in Our System** \\ \hline Physical distancing [43] & Singapore (1 m), South Korea (1.4 m) & ✓ \\ Mask wearing [44] & Practiced in most of the countries & ✓ \\ Close contacts [45] & Handshakes, hugging, etc. & ✓ \\ Hygiene practices [44; 46] & Washing hands, sanitizing, etc. & \\ Restricted gathering [44; 47] & Indoor gatherings & ✓ \\ \hline \hline \end{tabular}
\end{table}
Table 1: Different social distancing measures and the handling availability in our proposed system.  
where \(S_{i}(t)\) is the state and \(\overline{J_{i}}(t)\) is the tracking interpretations based on the sequential information.  
The list of functions utilized to obtain spatial information necessary for detecting and localizing persons, interactions, and face masks follows:  
1. People detection (\(F_{p}\)) and tracking (\(\overline{F}_{p}\)).
2. Distance estimation (\(F_{d}\)) and group identification (\(F_{g}\)).
3. Identifying and localizing physical interaction (handshakes) (\(F_{h}\)).
4. Mask detection (\(F_{m}\)).  
The information retrieved by the aforementioned functions, which is critical for calculating the social distancing violation measure, was encoded in a graph \(G=(V,E)\). Sections 2.1-2.4 define the functionality of each system component that works together to populate the graph \(G\), while Section 2.5 offers a full explanation of the data contained in the graph. Finally, graph \(G\) was interpreted in the manner described in Section 2.6 in order to provide actionable insights based on the threat level analysis of the analyzed video. For ease of understanding, the notations used in this work are listed in a table in Abbreviations.