## 4 Experimental Results and Discussion  
To construct a stable and effective data pipeline for the proposed SAP, various stabilized software types and solutions were exploited. For instance, we used nginx with version 1.21 or more as a web server that can also be used as a reverse proxy, load balancer, mail proxy, and HTTP cache, and we used Apache Tomcat, version 10 or more, as a web application server and servlet container. Figure 5 shows some experimental results of facial detection with the customized Dlib/CNN model and anomaly detection of BI data with the customized TadGAN model, which are applied to ensemble models in an on-site AI engine. The customized Dlib/CNN model detects faces from real-time input images and compares them with the facial information of registered workers for security management. If the worker's face matches, it is marked with a red bounding box (e.g., worker1). The customized TadGAN model automatically classifies the BI data of workers as normal or anomalous. In the case of abnormalities, a red bounding box (e.g., BI_A_Lert) is marked. Figure 6 shows some experimental results of object detection with the customized YOLOv7 model applied to ensemble models in an on-site AI engine. To create this model, we built a new dataset with 13,591 training images and 1509 test images and defined 30 safety-related classes (or labels). Its performance evaluation results are shown in Table 2, where the precision denotes the accuracy of the detected objects, indicating how many detections were correct, the recall denotes the ability of the model to identify all instances of objects in the images, the mAP(0.5) denotes mean average precision calculated at an intersection over union (IoU) threshold of 0.50, and the mAP(0.5:0.95) denotes the average of the mean average precision calculated at varying IoU thresholds, ranging from 0.50 to 0.95. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \(S_{parn_{j}}\) & Worker proficiency & Worker edu. level & Work environment & \(\ldots\) & Etc. \\ \hline \(S_{ratio_{j}}\) & \(S_{max_{1}}\) & \(S_{max_{2}}\) & \(S_{max_{3}}\) & \(\ldots\) & \(S_{max_{n}}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Safety parameters and their weight ratios to make the safety rule. Figure 5: Experimental results of facial detection with the customized Dlib/CNN model (**upper**) and anomaly detection of biometric index (BI) data with the customized TadGAN model (**lower**) that can be applied to ensemble models in an on-site AI engine. The customized YOLOv7 model could achieve good performances: precision of 0.972, recall of 0.9777, mAP(0.5) of 0.988, and mAP(0.5:0.95) of 0.888. Figure 7 shows experimental results of data-driven risk management from risk assessment to alarm notification of the on-site AI engine in the SMGs in cooperation with the SAP (left) and the supervisor with a tablet PC (right). The GIS-based worker safety management visualization in the SAP shows the location of the unsafe or abnormal situations and the corresponding information in a red flickering screen. The location and information are transmitted to the supervisor's tablet PC, and then the supervisor takes appropriate safety measures for hazardous situations.