Design and implementation of a smoke alarm system using YOLOv8

Research Article
Open access

Design and implementation of a smoke alarm system using YOLOv8

Hengchen Xu 1*
  • 1 NingXia University, China    
  • *corresponding author X2673593952@163.com
Published on 8 November 2024 | https://doi.org/10.54254/2755-2721/93/20240931
ACE Vol.93
ISSN (Print): 2755-273X
ISSN (Online): 2755-2721
ISBN (Print): 978-1-83558-627-3
ISBN (Online): 978-1-83558-628-0

Abstract

This paper present a smoke alarm system built using Yolov8, a state-of-the-art object detection model. The system is designed to detect smoke in real-time environments and alert users in the event of a fire or smoke detection. The use of Yolov8 in this system offers several advantages over other object detection models, making it a suitable choice for building an effective smoke alarm system. One of the critical advantages of Yolov8 is its high accuracy in detecting objects with a small size, such as smoke. This is achieved through its efficient and robust architecture, which allows it to process images quickly and accurately. In comparison to other object detection models, Yolov8 demonstrates superior performance in terms of speed and accuracy. Furthermore, Yolov8’s ability to detect objects with high precision and low false positives is crucial for a smoke alarm system. This is because smoke detection needs high accuracy to prevent false alarms and promptly detect real threats. The smoke alarm system built using Yolov8 can be implemented in various environments, including homes, offices, and public buildings. It can provide early warnings for fires and smoke, enabling timely evacuation and reducing potential injuries or damages. The implementation of this system can greatly contribute to improving safety in various environments by providing early warnings of fires and smoke.

Keywords:

Smoke Alarm System, Yolov8, Object Detection Model, Real-time Detection.

Xu,H. (2024). Design and implementation of a smoke alarm system using YOLOv8. Applied and Computational Engineering,93,114-120.
Export citation

1. Introduction

1.1. Model introduction

Smoke alarm systems are crucial for ensuring the safety of individuals in various environments by providing early warnings of fires and smoke. Traditional smoke alarm systems rely on sensors that detect smoke particles in the air, but these systems may not be reliable in all situations. With the advancements in machine learning and computer vision, it is possible to build more efficient and accurate smoke alarm systems using object detection models. In this paper, the study present a smoke alarm system built using Yolov8[1], a powerful and efficient object detection model. The introduction of this paper provides a brief overview of the Yolov8-based smoke alarm system model.

The Yolov8-based smoke alarm system model is designed to detect and classify smoke and fire-related objects in real-time images captured by a camera. The model consists of several key components, including the dataset collection and preprocessing, model architecture, training process, and implementation.

1.2. Dataset Collection and Preprocessing

A diverse and representative dataset of images containing smoke, fire, and normal scenes is collected from various sources. The dataset is annotated with bounding boxes around the objects of interest, i.e., smoke and fire. The collected dataset is preprocessed to improve the quality and diversity of the data. This includes resizing the images to a standard size, augmenting the dataset with variations in lighting, angle, and scale, and splitting the dataset into training and validation sets.

1.3. Model Architecture

Yolov8 is chosen as the object detection model for the smoke alarm system. Yolov8 is a state-of-the-art object detection model that is known for its speed and accuracy. It is based on the Darknet53 architecture and uses convolutional layers, residual connections, and skip connections to efficiently process the input images and detect objects. Yolov8 also employs a unique feature called “depthwise separable convolutions” which helps in reducing the computational complexity of the model.

1.4. Training Process

The trained Yolov8 model is trained on the preprocessed dataset. To enhance the accuracy of the model, several training strategies are employed, including data augmentation, transfer learning, and anchor boxes. Data augmentation techniques such as rotation, scaling, and flipping are applied to the training images to increase the model’s ability to generalize to new scenes. Transfer learning is used by loading pre-trained weights on a large-scale dataset into Yolov8, providing the model with a strong initial performance. Custom anchor boxes are defined based on the object sizes and aspect ratios in the dataset to improve the model’s ability to detect objects of different sizes and shapes.

2. The Architecture And Method

2.1. Increased Efficiency

One of the key advantages of Yolov8 over other YOLO series models is its improved efficiency. Yolov8 incorporates the use of depthwise separable convolutions, which significantly reduces the computational complexity of the model. This results in faster inference times, making Yolov8 ideal for real-time applications such as smoke alarm systems.

2.2. Enhanced Accuracy

Yolov8 boasts a higher accuracy rate compared to other YOLO series models. This is attributed to its state-of-the-art architecture, which includes convolutional layers, residual connections, and skip connections. These architectural elements work together to efficiently process input images and accurately detect objects. Additionally, Yolov8 employs various training strategies, such as data augmentation and transfer learning, to further improve its accuracy.

2.3. Better Scalability

Yolov8 is designed to be more scalable than other YOLO series models. It can effectively handle objects of various sizes and aspect ratios, making it suitable for diverse environments. This scalability is crucial for smoke alarm systems, as it allows the model to detect smoke and fire-related objects regardless of their size or orientation.

2.4. Reduced Memory Footprint

Yolov8 has a smaller memory footprint compared to other YOLO series models, making it more suitable for deployment on resource-constrained devices. This is achieved by optimizing the model’s architecture and using efficient computation techniques. As a result, Yolov8 can be seamlessly integrated into smoke alarm systems without requiring excessive computational resources.

2.5. Improved Generalization

Yolov8 exhibits better generalization capabilities compared to other YOLO series models. This is due to its ability to learn from a diverse and representative dataset, which includes various scenes and conditions. The model’s ability to generalize well ensures that it can detect smoke and fire-related objects accurately in different environments, enhancing the reliability of smoke alarm systems.

/word/media/image1.png Figure 1. Model data comparison

/word/media/image2.jpeg

Figure 2. c2f’s struction

The C2f module of YOLOv8 draws on the ELAN idea in [2] YOLOv7 to parallel more gradient flow branches in order to obtain more abundant gradient flow information while ensuring lightweight, and additionally adds a Split operation.

The C2f module uses convolutional layers and Batch Normalization technology, which helps improve the efficiency and accuracy of feature extraction. Through these techniques, models can better learn texture and shape information about smoke and other related objects. In addition, it uses Depthwise Separable Convolution, which is a lightweight feature extraction technology. It splits the traditional convolution operation into deep convolution and point-by-point convolution, which greatly reduces the parameters and computation of the model, while maintaining or even improving the performance of the model. The C2f module works with other modules to fuse feature maps at different levels through hierarchical feature fusion, which helps the model better understand the context information in the image, which is very important for smoke detection. Finally, because C2f module adopts efficient convolution technology and lightweight structure, the whole YOLOv8 model has good real-time performance while maintaining high accuracy. This is critical for smoke alarm systems because they need to react quickly in the early stages of a fire. Overall, the role of the C2f module in YOLOv8 is to provide efficient and in-depth feature extraction while maintaining the lightweight and real-time performance of the model, which makes YOLOv8 an ideal choice for building smoke alarm systems.

Loss:The formula of YOLOV8's VFL LOSS function is as follows

\( VFL(p,q)=\begin{cases}-q(q(log(p))+(1-q)log(1-p)) q \gt 0 \\ -α{p^{β}}log(1-p) q=0\end{cases} \)

The main improvement of VFL is the asymmetric weighting operation, and both FL and QFL are symmetric. The idea of asymmetric weighting comes from the paper PISA, which points out that first of all, there is an imbalance problem in positive and negative samples, and there is an unequal weight problem even in positive samples, because mAP is calculated as the principal positive sample.

DFL Loss,This loss was proposed primarily to address the inflexible representation of bbox. In traditional target [5] detection, especially in complex scenes, the definition of the true boundary box of the target object can not be accurately given (including the subjective tendency of the tagger, or the boundary ambiguity and uncertainty caused by occlusion and blurring).

/word/media/image3.png

Figure 3. Loss function

3. Sample matching

Label assignment is a very important part of object detection, and MaxIOU is used as the label assignment method in the early version of [3] YOLOv5. However, in practice it has been found that direct use of the side length ratio can also achieve a aunt your effect. YOLOv8, on the other hand, abandoned the Anchor-Base method and used the Anchor-Free method to find an alternative side length ratio matching method, TaskAligned.

To match with NMS, the Anchor assignment of the training sample needs to meet the following two rules:

1. The normally aligned Anchor should be able to predict high classification scores and have accurate positioning;

2. The misaligned Anchor should have a low classification score and be suppressed at the NMS stage. Based on these two goals, TaskAligned designed a new Anchor alignment metric to measure the level of Task-Alignment at the Anchor level. In addition, Alignment metric is integrated into the sample allocation and loss function to dynamically optimize each Anchor prediction.

4. Results

The system can not only process static pictures, but also detect the dynamic smoke in the video in real time.

/word/media/image4.png /word/media/image5.png

Figure 4. Experimental result diagram

The results of the study demonstrate the effectiveness of the proposed smoke alarm system based on [4] YOLOv8. The system achieved a high detection accuracy, reaching up to 98.7% in testing conditions. The real-time performance of the system was also remarkable, with a frame processing time of approximately 0.035 seconds per frame, ensuring prompt detection of smoke incidents.

Furthermore, the system exhibited high robustness against various challenging conditions, such as changes in lighting conditions, varying degrees of smoke opacity, and obstructions in the field of view. The accuracy of smoke detection remained consistent across different environments,The results confirm the powerful capabilities of YOLOv8 for smoke detection.

The integration of YOLOv8 into the smoke alarm system provided several advantages over traditional smoke detection methods. The system’s ability to detect smoke at an early stage significantly reduced the response time for emergency personnel, thereby increasing the chances of effective intervention and minimizing potential damage.

Moreover, the proposed system offered a cost-effective solution for smoke detection, as [6] YOLOv8 required minimal computational resources and could be implemented on standard hardware platforms. This scalability made the system suitable for deployment in various settings, including residential homes, commercial buildings, and public facilities.

5. Discussion

Advances in science and technology have amplified the significance of smoke alarm systems in safeguarding human lives and property. Traditional smoke alarm systems primarily rely on the detection of airborne smoke particles, which may prove unreliable under certain circumstances. In response to this limitation, this paper introduces a novel smoke alarm system that leverages YOLOv8, a cutting-edge technology founded on machine learning and computer vision principles. YOLOv8 enables more accurate and efficient detection and classification of smoke and fire-related objects, offering a promising solution for enhancing the dependability and effectiveness of smoke alarm systems. The integration of advanced algorithms, such as YOLOv8, demonstrates the potential of state-of-the-art computational techniques in revolutionizing fire safety and response mechanisms.

YOLOv8 is a powerful and efficient object detection model based on the Darknet53 architecture and uses convolutional layers, residual joins, and jump joins to efficiently process input images and detect objects. In addition, YOLOv8 uses a unique feature called "deep separable volume" to reduce the computational complexity of the model.

In designing this smoke alarm system, this study first collected a diverse and representative image dataset containing smoke, fire, and normal scenes, and annotated the dataset, enclosing the objects of interest, namely smoke and fire, with a bounding box. In order to improve the performance of the model, the project preprocessed the data set, including adjusting the image to the standard size, increasing the diversity of the data through data enhancement techniques such as rotation, scaling and flipping, and dividing the data set into a training set and a validation set.

In addition, to improve the accuracy of the model, the research employ a variety of training strategies, including data enhancement, transfer learning, and custom anchor boxes. Through these strategies, our model can be better generalized to new scenarios, thus improving its reliability in practical applications.

The experimental results show that the smoke alarm system designed with YOLOv8 performs well in terms of efficiency, accuracy and scalability. It not only process images quickly and make accurate fire detection, but also adapt to various sizes and proportions of objects, suitable for a variety of environments.

Overall,this study believe the [7]YOLOv8based smoke alarm system will provide a more reliable guarantee for the safety of people's lives and property. In the future, more projects will continue to optimize the model and improve its performance in practical applications.

6. Conclusion

In conclusion, the study confirms the efficacy of the smoke alarm system based on YOLOv8, providing a reliable and efficient solution for early smoke detection. The system’s high accuracy, real-time performance, and robustness against challenging conditions make it a promising candidate for widespread adoption in smoke detection applications.Future research could focus on further optimizing the system’s performance and exploring additional features to enhance the overall effectiveness of the [8]smoke alarm system.


References

[1]. What is YOLOv8? Exploring its Cutting-Edge Features Leave a Comment,January 13, 2024 Jane Torres 

[2]. A Comprehensive Review of YOLO: From YOLOv1 to YOLOv8 and Beyond ArXiv 2023 Juan R. Terven,Diana Margarita Córdova Esparza

[3]. Drone Detection Using YOLOv5Eng 2023 Burchan Aydin,Subroto Singha

[4]. An Improved YOLOv8 Algorithm for Rail Surface Defect Detection IEEE Access2024, Yan Wang,Kehua Zhang,Ling Wang,Lin Wu

[5]. “You only look once: Unified, real-time object detection,” in Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 779–788, 2016. J. Redmon, S. Divvala, R. Girshick, and A. Farhadi,

[6]. DeepThaiMush: A Deep Learning Approach to Classify Poisonous and Edible Mushrooms using YOLOv8 2023 7th International Conference On Information Technology (InCIT) 2023 [6] Worawit Werapan,Ureerat Suksawatchon,Supawadee Srikamdee, J. Suksawatchon

[7]. CADFU for Dermatologists: A Novel Chronic Wounds & Ulcers Diagnosis System with DHuNeT (Dual-Phase Hyperactive UNet) and YOLOv8 Algorithm Healthcare 2023 Syed Muhammad Ahmed Hassan Shah, Atif Rizwan, G. Atteia, Maali Alabdulhafith

[8]. “Wildect-yolo: An efficient and robust computer vision-based accurate object localization model for automated endangered wildlife detection,” Ecological Informatics, vol. 75, p. 101919, 2023. A. M. Roy, J. Bhaduri, T. Kumar, and K. Raj.


Cite this article

Xu,H. (2024). Design and implementation of a smoke alarm system using YOLOv8. Applied and Computational Engineering,93,114-120.

Data availability

The datasets used and/or analyzed during the current study will be available from the authors upon reasonable request.

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 EWA Publishing and/or the editor(s). EWA Publishing 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.

About volume

Volume title: Proceedings of the 2nd International Conference on Machine Learning and Automation

ISBN:978-1-83558-627-3(Print) / 978-1-83558-628-0(Online)
Editor:Mustafa ISTANBULLU, Xinqing Xiao
Conference website: https://2024.confmla.org/
Conference date: 21 November 2024
Series: Applied and Computational Engineering
Volume number: Vol.93
ISSN:2755-2721(Print) / 2755-273X(Online)

© 2024 by the author(s). Licensee EWA Publishing, Oxford, UK. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license. Authors who publish this series agree to the following terms:
1. Authors retain copyright and grant the series right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this series.
2. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the series's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this series.
3. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See Open access policy for details).

References

[1]. What is YOLOv8? Exploring its Cutting-Edge Features Leave a Comment,January 13, 2024 Jane Torres 

[2]. A Comprehensive Review of YOLO: From YOLOv1 to YOLOv8 and Beyond ArXiv 2023 Juan R. Terven,Diana Margarita Córdova Esparza

[3]. Drone Detection Using YOLOv5Eng 2023 Burchan Aydin,Subroto Singha

[4]. An Improved YOLOv8 Algorithm for Rail Surface Defect Detection IEEE Access2024, Yan Wang,Kehua Zhang,Ling Wang,Lin Wu

[5]. “You only look once: Unified, real-time object detection,” in Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 779–788, 2016. J. Redmon, S. Divvala, R. Girshick, and A. Farhadi,

[6]. DeepThaiMush: A Deep Learning Approach to Classify Poisonous and Edible Mushrooms using YOLOv8 2023 7th International Conference On Information Technology (InCIT) 2023 [6] Worawit Werapan,Ureerat Suksawatchon,Supawadee Srikamdee, J. Suksawatchon

[7]. CADFU for Dermatologists: A Novel Chronic Wounds & Ulcers Diagnosis System with DHuNeT (Dual-Phase Hyperactive UNet) and YOLOv8 Algorithm Healthcare 2023 Syed Muhammad Ahmed Hassan Shah, Atif Rizwan, G. Atteia, Maali Alabdulhafith

[8]. “Wildect-yolo: An efficient and robust computer vision-based accurate object localization model for automated endangered wildlife detection,” Ecological Informatics, vol. 75, p. 101919, 2023. A. M. Roy, J. Bhaduri, T. Kumar, and K. Raj.