## 3 Methodology
### Identification of Proper PPE Use  
To identify whether PPE(s) are appropriately used by decommissioning worker(s) in the image captured by an on-site surveillance camera, we analyze the geometric relationships between spatial structure characteristics of detected PPE(s) and individual(s).  
We formulate the output of YOLOv3 as a set of PPE bounding boxes \(B=\{B_{1},B_{2},...,B_{I}\}\), where \(I\) is the number of detected PPE in the image. Each bounding box \(B_{i}=(x_{i},y_{i},w_{i},h_{i},c_{i})\), \(i\in\{1,2,...,I\}\) contains five elements, where \((x_{i},y_{i})\) and \((w_{i},h_{i})\) are the bounding boxes' position and size, respectively, and \(c_{i}\) represents the class of PPE in the bounding box. Let \(H=\left\{H_{1},H_{2},...,H_{J}\right\}\) be the set of the detected individual(s) via OpenPose, where \(J\) is the number of detected individual(s) in the obtained frame and \(H_{j}=\left\{\left(x_{j}^{(0)},y_{j}^{(0)}\right),\left(x_{j}^{(1)},y_{j}^{(1 )}\right),...,\left(x_{j}^{(17)},y_{j}^{(17)}\right)\right\}\) represents the detected body parts of the \(j_{th}\) individual (see Figure 3). We associate a detected PPE \(i^{*}\) to a specific individual \(j^{*}\) by searching the minimum Euclidean distance between bounding boxes \(B\) and detected neck keypoints \(H^{(1)}=\left\{\left(x_{0}^{(1)},y_{0}^{(1)}\right),\left(x_{1}^{(1)},y_{1}^{ (1)}\right),...,\left(x_{J}^{(1)},y_{J}^{(1)}\right)\right\}\) (body part 1 in Figure 3) that satisfy the geometric constraints (\(y_{i^{*}}<y_{j^{*}}^{(1)}\)) to make sure the detected PPE \(i^{*}\) is in the upper position of the detected individual \(j^{*}\) to be associated:  
\[\begin{split} i^{*},j^{*}&=\operatorname*{arg\, min}_{i\in\{1,2,...,I\},j\in\{1,2,...,J\}}\sqrt{\left(x_{i}-x_{j}^{(1)} \right)^{2}+\left(y_{i}-y_{j}^{(1)}\right)^{2}}\\ &\text{s.t.}\ y_{i^{*}}<y_{j^{*}}^{(1)}\end{split} \tag{6}\]  
Subsequently, a distance is measured to determine whether each individual is using their associated PPE. We take advantage of Euclidean distance using the detected neck keypoints and hips keypoints (body parts 8 and 11 in Figure 3) of the detected individual \(j^{*}\) as a dynamic reference threshold, which will keep changing synchronously when the distance between the individual and the camera changes:  
\[\beta_{i^{*}\leftrightarrow j^{*}}=\text{max}(\sqrt{\left(x_{j^{*}}^{(1)}-x_{ j^{*}}^{(8)}\right)^{2}+\left(y_{j^{*}}^{(1)}-y_{j^{*}}^{(8)}\right)^{2}},\sqrt{ \left(x_{j^{*}}^{(1)}-x_{j^{*}}^{(11)}\right)^{2}+\left(y_{j^{*}}^{(1)}-y_{j^ {*}}^{(11)}\right)^{2}})\cdot\gamma \tag{7}\]  
where \(\gamma\) is the scaling coefficient to strike different PPE identification, which is set to 0.8 or 0.6 for hard hats or full-face masks, respectively.  
If the Euclidean distance between the position \((x_{i^{*}},y_{i^{*}})\) of the bounding box of \(i^{*}\) and detected neck keypoint (body keypoints 1 in Figure 5a) of \(j^{*}\) is smaller than the reference threshold \(\beta_{i^{*}\leftrightarrow j^{*}}\), then the detected PPE \(i^{*}\) is identified as appropriately used by the detected individual \(j^{*}\) (Figure 5a); otherwise, even though PPE \(i^{*}\) is associated with individual \(j^{*}\), the condition of individual \(j^{*}\) is identified as not using PPE properly (Figure 5b):  
\[c_{i^{*}\leftrightarrow j^{*}}=\begin{cases}\text{``PPE proper use''}&,if\ d(i^{*},j^{*})<\beta_{i^{*}\leftrightarrow j^{*}}\\ \text{``PPE improper use''}&,if\ d(i^{*},j^{*})\geq\beta_{i^{*}\leftrightarrow j^{*}} \end{cases} \tag{8}\]  
where  
\[d(i^{*},j^{*})=\sqrt{\left(x_{i^{*}}-x_{j^{*}}^{(1)}\right)^{2}+\left(y_{i^{* }}-y_{j^{*}}^{(1)}\right)^{2}} \tag{9}\]