# Intelligent Monitoring of Tunnel Fire Smoke Based on Improved YOLOX and Edge Computing
## 5 System Design and Case Study  
### Design of Fire and Smoke Intelligent Monitoring System  
The designed system is an intelligent fire and smoke monitoring system that utilizes object detection and edge computing methods to provide real-time monitoring of fire and smoke incidents. This system relies on sensor technology, deep learning object detection techniques, and edge computing to detect and continuously monitor fire and smoke occurrences. To meet the need for timely actions after a fire or smoke incident, this paper collects on-site fire and smoke data for analysis and employs a visualization platform to help firefighters and relevant personnel stay updated on the situation, enabling them to take immediate actions for mitigation. During the system design process, several considerations must be taken into account, including system stability, real-time performance, accuracy, data security, and more. Therefore, detailed work is required in system architecture design, data collection, preprocessing, detection, data transmission, and alerting. Additionally, the design and optimization of the visualization platform are crucial to enhance system performance and reliability. In scenarios such as tunnels, fire and smoke incidents may primarily originate from moving vehicles within different sections and areas. Therefore, the intelligent fire and smoke monitoring system needs to collect and preprocess data in a timely manner. With the increasing computational capabilities of edge computing devices, data processing tasks can be offloaded to edge devices, while servers are used for data storage. Shifting computational tasks from the cloud to the edge platform significantly reduces data transmission pressure and latency, improving monitoring efficiency. NVIDIA Jetson Xavier, an edge computing device as shown in Figure 8, with a power consumption of only 20 W, can provide 21 TOPS of computational power. It can handle data preprocessing, computation tasks, inference processes, and postprocessing for lightweight models. The server-side has higher computational power and is responsible for deep learning model training tasks. If an edge device detects abnormal objects such as flames or smoke, it stores the relevant information in the server's database and issues an alert. Furthermore, a visualization platform is essential for providing real-time monitoring results and alerts to operations personnel. This platform should present monitoring data, alert information, and historical records conveniently and possess capabilities for data visualization, interactivity, and instant feedback. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Model Category** & **Model Size** & **Time Delay** \\ \hline Native pytorch & 135 MB & 110 ms \\ ONNX & 39 MB & 42 ms \\ FP32 & 53 MB & 22 ms \\ FP16 & 23 MB & 17 ms \\ INT8 & 15 MB & 11 ms \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparison of different precision models. Based on the overall design, the system can be divided into five layers, with each layer handling different data information and performing corresponding operations. The overall architecture is illustrated in Figure 9. The intelligent fire and smoke monitoring system designed in this paper consists of five layers, each with distinct functions and data processing logic. The hierarchical structure, from top to bottom, is made up of the following layers:  
1. Application Layer: The application layer is the user interaction layer, and it uses the Pyqt framework to develop a visualization platform. Users can view monitoring results and alert information through the front-end interface. 2. Service Layer: The service layer handles the user's requests and forwards relevant logic operations to cloud computing or edge computing layers to ensure that the response to operations is displayed promptly on the visual interface. 3. Cloud Computing Layer: The cloud platform is primarily responsible for training the object detection models and storing monitoring results transmitted from edge devices.