## 2 Proposed Solution
### Threat Quantification  
The information extracted from the models described in the proposed system in Sections 2.1-2.5 needs to be processed from the created temporal graph in order to provide a quantifiable metric that denotes the risk of transmission for the given scene/frame. In this section, the derivation of the threat level function which quantifies the threat of the given frame is described in detail. Table 2 contains a list of the parameters that contribute to the spread of COVID-19. The parameters are divided into two categories: primary and secondary parameters, which will be discussed further in this section using the threat level function. First, we calculate the threat level contribution of each pair of people in the frame at time \(t\) as described in (16). Then, we find the threat level of the particular frame as per (15). \[T(t)=\sum_{(v_{1},v_{2}\in V)}T_{v_{1},v_{2}}(t) \tag{15}\]  
\[T_{v_{1},v_{2}}(t)=\sum_{p_{i}\in\mathbb{P}}p_{i}(v_{1},v_{2})\times\prod_{q_{ j}\in\mathbb{Q}}e_{j}-q_{j}(v_{1},v_{2}) \tag{16}\]  
\(\mathbb{P}=\{p_{h},p_{d}\}\) is the set of parameters that directly attributes to the transmission of COVID-19 from one person to another. This includes the distance between people and the handshake interactions. As the distance between people (people coming close) and their interactions (handshakes) play a primary role in the COVID-19 virus transmission, these values were first considered as the primary parameters \(\mathbb{P}\). The probability of two people shaking hands \(p_{h}\) and the probability of them coming extremely close \(p_{d}\) were represented as scalar values in the range \([0,1]\), where \(1\) represents a high probability of occurrence (for  
Figure 4: Graph representation figure. (**a**) Bounding boxes for people and handshake; (**b**) Corresponding graph representation. the distance probability, \(1m\) is used as the threshold distance for being extremely close in this study). \(\mathbb{Q}=\{q_{m},q_{g}\}\) is the set of secondary parameters which are relevant only when two people are in close proximity, and in such a case, these parameters can increase or decrease the probability of COVID-19 transmission accordingly. This includes whether people are wearing masks, since two people not wearing masks is irrelevant if they are far apart, and whether the persons belong to the same group. First, the mask-wearing probability \(q_{m}\) was used to quantify the effect of masks in transmission. Furthermore, people belonging to the same group (\(q_{g}\)) have a similar effect on transmission, since it is assumed that the disease spread between them does not increase depending on what is happening in the video frame (it is more likely they were both infected or not, even before coming into the frame). The values of \(q_{j}\) are in the range \([0,1]\). \(\epsilon_{j}\geq 1\) is used as a tuneable parameter that dictates the influence of a particular parameter \(q_{j}\) on the overall threat level. A higher \(\epsilon_{j}\) value gives a lower significance to the corresponding \(q_{j}\) in calculating the total threat \(T(t)\). Because the influence of various factors varies depending on variations and different pandemics, the \(\epsilon_{j}\) option can be used to change the influence of various parameters, and new parameters can be added to the threat-level equation based on consultations with appropriate authorities. By substituting the parameters and setting \(\epsilon_{m}=2.0\), \(\epsilon_{g}=1.0\), the equation was rewritten as follows,  
\[T_{v_{1},v_{2}}(t)=(p_{h}+p_{d})(2.0-q_{m})\big{(}1.0-q_{g}\big{)} \tag{17}\]  
When analyzing the threat equation in Equation (16), it can be noted that when the secondary parameter probabilities decrease (i.e., \(q_{j}\)), the effect of the multiplicative term \((\epsilon_{j}-q_{j})\) is higher. This implies that the effects of the primary parameters \(p_{j}\) to the threat of the given scene are compounded when the two persons have worsening secondary parameters (i.e., are not wearing masks or when they are of different groups).