Submitted:
04 September 2024
Posted:
04 September 2024
You are already at the latest version
Abstract
Keywords:
MSC: 68T07
1. Introduction
- In this work, a modified YOLOv8 architecture is proposed for the development of an efficient automated fire and smoke detection system, achieving 98% accuracy in fire and 97.8% accuracy in smoke detection.
- A comprehensive fire dataset has been created, consisting of 4,301 labeled images. Each image has been carefully annotated to ensure accuracy, providing a valuable resource for improving the performance of models in identifying fire and smoke in various conditions.
- EigenCAM is employed to explain and visualize the results of the proposed model, highlighting the image areas that most influenced the model’s decisions. This approach enhances the understanding of the model’s behavior, thereby improving the interpretability and transparency of its predictions.
2. Related Works
3. Methodology
3.1. Dataset Description
3.2. Dataset Augmentation and Replication
3.3. Model Architecture and Modifications
3.4. Changes to the YOLOv8 Backbone
3.5. The Training and Success Measure Process
3.6. Improvements After Using C2f Layer
4. Result Analysis
4.1. Evaluation Matrics
4.2. Results of the Proposed Model
4.3. Comparing at YOLOv7 and YOLOv8
4.4. Impact of Hyperparameter Tuning on YOLOv8
4.5. Activation Function
4.6. Performance in a Range of Fire Situations
5. Explainability with EigenCAM
5.1. Eigen Class Activation Maps (EigenCAM)
5.2. Implementation and Results of EigenCAM
6. Discussion
7. Conclusions
Author Contributions
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
| Adam | Adaptive Moment Estimation |
| CCVT | Closed Circuit Television |
| C2F | Context To Flow |
| CNN | Convolutional Neural Networks |
| CVAT | Computer Vision Annotation Tool |
| DBSCAN | Density-Based Spatial Clustering Of Applications With Noise |
| EigenCAM | Eigen Class Activation Maps |
| GFLOPS | Giga Floating-Point Operations Per Second |
| IR | Infrared |
| LeakyReLU | Leaky Rectified Linear Unit |
| LSTM | Long Short-Term Memory |
| mAP | Mean Average Precision |
| MQTT | Message Queuing Telemetry Transport |
| R-CNN | Region-Based Convolutional Neural Network |
| ReLU | Rectified Linear Unit |
| RNN | Recurrent Neural Network |
| SECSP | Spatially Enhanced Contextual Semantic Parsing |
| SGD | Stochastic Gradient Descent |
| SIoU | Scylla Intersection over Union |
| SLIC | Simple Linear Iterative Clustering |
| Softmax | Softargmax Or Normalized Exponential Function |
| SPPF | Spatial Pyramid Pooling Fast |
| SRoFs | Suspected Regions Of Fire |
| SSD | Single-Shot Detector |
| SVD | Singular Value Decomposition |
| Tanh | Hyperbolic Tangent |
| VGG | Visual Geometry Group |
| YOLO | You Only Look Once |
References
- Saponara, S.; Elhanashi, A.; Gagliardi, A. Real-time video fire/smoke detection based on CNN in antifire surveillance systems. Journal of Real-Time Image Processing 2021, 18, 889–900. [Google Scholar] [CrossRef]
- Abdusalomov, A.; Baratov, N.; Kutlimuratov, A.; Whangbo, T. An improvement of the fire detection and classification method using YOLOv3 for surveillance systems. Sensors 2021, 21, 6519. [Google Scholar] [CrossRef] [PubMed]
- Barmpoutis, P.; Stathaki, T.; Dimitropoulos, K.; Grammalidis, N. Early fire detection based on aerial 360-degree sensors, deep convolution neural networks and exploitation of fire dynamic textures. Remote Sensing 2020, 12, 3177. [Google Scholar] [CrossRef]
- Avazov, K.; Mukhiddinov, M.; Makhmudov, F.; Cho, Y. Fire detection method in smart city environments using a deep-learning-based approach. Electronics 2022, 11, 73. [Google Scholar] [CrossRef]
- Ibraheem, M.K.I.; Mohamed, M.B.; Fakhfakh, A. Forest Defender Fusion System for Early Detection of Forest Fires. Computers 2024, 13, 36. [Google Scholar] [CrossRef]
- Liu, J.; Yin, J.; Yang, Z. Fire Detection and Flame-Centre Localisation Algorithm Based on Combination of Attention-Enhanced Ghost Mode and Mixed Convolution. Applied Sciences 2024, 14, 989. [Google Scholar] [CrossRef]
- Wang, B.; Zhao, X.; Zhang, Y.; Song, Z.; Wang, Z. A capacitive particle-analyzing smoke detector for very early fire detection. Sensors 2024, 24, 1692. [Google Scholar] [CrossRef]
- Pincott, J.; Tien, P.; Wei, S.; Calautit, J. Indoor fire detection utilizing computer vision-based strategies. Journal of Building Engineering 2023, 61, 105154. [Google Scholar] [CrossRef]
- Muhammad, K.; et al. Convolutional neural networks based fire detection in surveillance videos. IEEE Access 2018, 6, 18174–18183. [Google Scholar] [CrossRef]
- de Venancio, P.; Lisboa, A.; Barbosa, A. An automatic fire detection system based on deep convolutional neural networks for low-power, resource-constrained devices. Neural Computing and Applications 2022, 34, 15349–15368. [Google Scholar] [CrossRef]
- Valikhujaev, Y.; Abdusalomov, A.; Cho, Y. Automatic fire and smoke detection method for surveillance systems based on dilated CNNs. Atmosphere 2020, 11, 1241. [Google Scholar] [CrossRef]
- Pundir, A.; Raman, B. Dual deep learning model for image based smoke detection. Fire Technology 2019, 55, 2419–2442. [Google Scholar] [CrossRef]
- Park, J.H.; Lee, S.; Yun, S.; Kim, H.; Kim, W.T. Dependable fire detection system with multifunctional artificial intelligence framework. Sensors 2019, 19, 2025. [Google Scholar] [CrossRef]
- Park, M.; Ko, B.C. Two-step real-time night-time fire detection in an urban environment using Static ELASTIC-YOLOv3 and Temporal Fire-Tube. Sensors 2020, 20, 2202. [Google Scholar] [CrossRef]
- Muhammad, M.B.; Yeasin, M. Eigen-CAM: Visual Explanations for Deep Convolutional Neural Networks. SN Computer Science 2021, 2, 47. [Google Scholar] [CrossRef]
- Bany Muhammad, M.; Yeasin, M. Eigen-CAM: Visual Explanations for Deep Convolutional Neural Networks. SN Computer Science 2021, 2, 47. [Google Scholar] [CrossRef]
- Ahn, Y.; Choi, H.; Kim, B. Development of early fire detection model for buildings using computer vision-based CCTV. Journal of Building Engineering 2023, 65, 105647. [Google Scholar] [CrossRef]
- Muhammad, K.; Ahmad, J.; Baik, S. Early fire detection using convolutional neural networks during surveillance for effective disaster management. Neurocomputing 2019, 288, 30–42. [Google Scholar] [CrossRef]
- Kim, B.; Lee, J. A video-based fire detection using deep learning models. Applied Sciences 2019, 9, 2862. [Google Scholar] [CrossRef]
- Xie, Y.; et al. Efficient video fire detection exploiting motion-flicker-based dynamic features and deep static features. IEEE Access 2020, 8, 81904–81917. [Google Scholar] [CrossRef]
- Li, P.; Zhao, W. Image fire detection algorithms based on convolutional neural networks. Case Studies in Thermal Engineering 2019, 19, 100625. [Google Scholar] [CrossRef]
- Sheng, D.; Deng, J.; Xiang, J. Automatic smoke detection based on SLIC-DBSCAN enhanced convolutional neural networks. Sensors 2020, 20, 5608. [Google Scholar] [CrossRef]
- Lin, G.; Zhang, Y.; Xu, G.; Zhang, Q. Smoke detection on video sequences using 3D convolutional neural networks. Fire Technology 2019, 55, 1827–1847. [Google Scholar] [CrossRef]
- Zhao, Y.; Zhang, H.; Zhang, X.; Chen, X. Fire smoke detection based on target-awareness and depthwise convolutions. Multimedia Tools and Applications 2020, 80, 27407–27421. [Google Scholar] [CrossRef]
- Dilshad, N.; Khan, T.; Song, J. Efficient deep learning framework for fire detection in complex surveillance environment. Computer Systems Science and Engineering 2023, 46, 749–764. [Google Scholar] [CrossRef]
- Yunusov, N.; Islam, B.M.S.; Abdusalomov, A.; Kim, W. Robust Forest Fire Detection Method for Surveillance Systems Based on You Only Look Once Version 8 and Transfer Learning Approaches. Processes 2024, 12. [Google Scholar] [CrossRef]
- Jocher, G.; Chaurasia, A.; Qiu, J.; Stoken, R.; et al. YOLOv8: You Only Look Once - Version 8. 2023. Available online: https://github.com/ultralytics/ultralytics (accessed on 1 September 2024).
- Fahy, R.; Petrillo, J. Firefighter Fatalities in the US in 2022. 2022. Available online: https://www.usfa.fema.gov/downloads/pdf/publications/firefighter-fatalities-2022.pdf (accessed on 1 June 2024).
- Solawetz, J.; Francesco. What is YOLOv8? The Ultimate Guide. 2023. Available online: https://blog.roboflow.com/whats-new-in-yolov8/ (accessed on 19 July 2024).
- Inside, A.I. Introduction to deep learning with computer vision — learning rates & mathematics — part 1. 2020. Available online: https://medium.com/hitchhikers-guide-to-deep-learning/13-introduction-to-deep-learning-with-computer-vision-learning-rates-mathematics-part-1-4973aacea801 (accessed on 3 September 2024).











| Ref. | Algorithm | Accuracy | Limitations | Future Directions |
|---|---|---|---|---|
| [17] | YOLO | 0.97 (Recall), 0.91 (Precision) | Limited to CCTV range | Incorporate temperature and sound |
| [8] | R-CNN, SSD | 95% (Fire), 62% (Smoke) | Not tested outdoors | Test in outdoor environments |
| [4] | YOLOv4 | 98.8% | Not suitable for large areas | Apply to larger areas |
| [2] | YOLOv3 | 98.9% | Errors with electrical lamps | Improve detection at night |
| [18] | CNN | 98.5% | Balance between accuracy and false alarms | Optimize accuracy vs. false alarms |
| [9] | CNN | 94.43% | High false alarms | Improve tuning for real-world scenarios |
| [20] | CNN | 97.94% (Best) | Issues with multiple moving objects | Integrate with IoT for real-time detection |
| [21] | CNN | 83.7% | Lower accuracy, delayed alarms | Improve detection accuracy and speed |
| [1] | YOLOv2 | 96.82% | False positives in challenging environments | Connect with cloud facilities |
| [11] | CNN | 99.53% | Early detection issues in clouds | Develop lightweight, robust model |
| [22] | SLIC-DBSCAN | 87.85% | High false positives | Improve sensitivity, reduce FPR |
| [23] | R-CNN, 3D CNN | 95.23% | Small training and validation dataset | Collect more diverse dataset |
| [12] | CNN | 97.49% | Affected by clouds, fog | Extend to real-time fire detection |
| [24] | Depthwise | 93.98% | Reduced accuracy in varying conditions | Balance speed and accuracy |
| [10] | CNN | mAP 73.98%, F1 0.724 | Generalization issues, false alarms | Explore layer pruning |
| [19] | R-CNN, LSTM | mAP 88.3%, Smoke 87.5% | False detection with non-fire objects | Enhance dataset, improve accuracy |
| [25] | E-FireNet | Acc 0.98, F1 0.99 | Limited, monotonous datasets | Expand dataset, improve generalization |
| [26] | YOLOv8 and TranSDet | Acc 97%, F1 96.3% | Occasionally misidentifies the sun and electric lights as fire | Expand dataset to address the limitations. |
| Parameters | Values |
|---|---|
| Epochs | 350 |
| Batch Size | 9 |
| Image Size | 736 |
| Optimizer | Adamax |
| Learning Rate | 0.001 |
| Momentum | 0.995 |
| Weight Decay | 0.00005 |
| Validation | True |
| Rect | False |
| Warmup Epochs | 4.0 |
| Single Class | False |
| Patience | 0 |
| Model | Precision | Recall | mAP@50 | F1-score |
|---|---|---|---|---|
| YOLOv7 | 75.1% | 98.0% | 76.4% | 77.0% |
| YOLOv8 (Default) | 95.0% | 92.5% | 96.5% | 94.0% |
| Proposed Model (YOLOv8) | 97.9% | 97.2% | 99.1% | 98.0% |
| No. | Model Type | Activation Function | Epochs | Optimizer | Layers | Momentum | F1-score |
|---|---|---|---|---|---|---|---|
| 1 | YOLOv8l | LeakyReLU | 350 | Adamax | 365 | 0.995 | 84% |
| 2 | YOLOv8l | Softmax | 250 | Adamax | 365 | 0.994 | 12% |
| 3 | YOLOv8l | Tanh | 200 | AdamW | 365 | 0.993 | 89% |
| 4 | YOLOv8n | Tanh | 200 | AdamW | 225 | 0.993 | 87% |
| 5 | YOLOv8l | ReLU | 200 | AdamW | 365 | 0.999 | 88% |
| 6 | YOLOv8n | ReLU | 200 | Adamax | 225 | 0.999 | 84% |
| 7 | YOLOv8l | Mish | 200 | SGD | 365 | 0.995 | 89% |
| 8 | YOLOv8n | Mish | 200 | AdamW | 225 | 0.995 | 88% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).