Fire detection method based on improved pp-yolo

By improving the PP-YOLO fire detection method and utilizing lightweight networks and feature fusion technology, the problems of high false alarm rate, large computational load, and poor environmental applicability of existing fire detection methods are solved, achieving efficient and accurate fire detection that is suitable for embedded devices.

CN116994182BActive Publication Date: 2026-02-24FUZHOU UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310973766.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-04
Publication Date
2026-02-24
Estimated Expiration
2043-08-04

AI Technical Summary

Technical Problem

Existing fire detection methods suffer from high false alarm rates, limited environmental applicability, slow detection speed, low accuracy, and high computational load, making them difficult to operate efficiently in embedded devices.

Method used

An improved PP-YOLO fire detection method is adopted, which replaces the feature extraction network with the lightweight network ShuffleNetv2, adjusts the number of channels in the convolutional layer, and introduces a feature fusion network and an attention module CBAM. Combined with knowledge distillation technology, the multi-scale feature fusion capability and detection accuracy are improved.

Benefits of technology

While reducing the number of model parameters and computational load, it achieves efficient and accurate fire detection, is suitable for embedded devices, and maintains high detection speed and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116994182B_ABST
    Figure CN116994182B_ABST
Patent Text Reader

Abstract

The application relates to a fire detection method based on improved PP-YOLO. A video signal is acquired through a camera, the video signal is intercepted into an image and image preprocessing is performed; a trained fire detection model is used to detect flames and smoke in the image and display the detection result on a display. The fire detection model is specifically as follows: a PP-YOLO is used as a basic model, the PP-YOLO comprises a feature extraction network, a feature fusion network and a detection head; an improved feature fusion network is used to strengthen a multi-scale feature fusion process and improve the expression ability of features; the feature extraction network adopts a lightweight network ShuffleNetv2, the channel number of the last convolution layer is adjusted to reduce the model parameter quantity and the floating point calculation quantity, and knowledge distillation is performed to improve the model detection precision. In the case that the algorithm parameter quantity and the calculation quantity are greatly reduced, good fire detection accuracy can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of computer vision and fire detection, specifically relating to a fire detection method based on an improved PP-YOLO. Background Technology

[0002] Since the dawn of humanity, fire has been crucial to human survival and development, but it also poses significant safety hazards. Due to its suddenness, high frequency, and rapid spread, fire can easily cause enormous loss of life and property, becoming one of the most serious threats to human safety and property. Traditional fire detection methods primarily rely on installing various sensor-based fire alarms. However, these alarms have many drawbacks and limitations. They are susceptible to external environmental factors such as sunlight, artificial light, and dust, leading to false alarms. They are also limited to indoor use; in the early stages of a fire, the sensor needs to measure a certain threshold before triggering an alarm, which can result in delays. Furthermore, detection effectiveness is even worse in larger spaces.

[0003] With the development of image processing technology, fire detection methods based on image processing have gradually gained attention. This method mainly combines image processing techniques with machine learning algorithms for fire detection. However, this approach requires manual design of fire image feature extraction methods, and due to limitations in the algorithms themselves, it suffers from slow detection speed, low accuracy, and poor generalization ability. Meanwhile, with the development of computer vision technology, it has achieved advantages such as high accuracy, high real-time performance, and strong generalization ability in many fields, such as image classification, object detection, and instance segmentation. Object detection identifies whether there are objects of interest in an image and detects their category and location, which meets the needs of fire detection. Therefore, many researchers have begun to study fire detection methods based on object detection algorithms. Object detection algorithms include models such as SSD, Faster R-CNN, and YOLO, with YOLO-related models being the most widely used. Although these models can achieve high detection accuracy in fire detection, there are still areas for improvement, and these models have a large number of parameters and computational load, placing high demands on the operating equipment. Summary of the Invention

[0004] The purpose of this invention is to provide a fire detection method based on an improved PP-YOLO, which can achieve good fire detection accuracy while significantly reducing the number of algorithm parameters and computational load.

[0005] To achieve the above objectives, the technical solution of this invention is: a fire detection method based on an improved PP-YOLO, which acquires video signals through a camera, extracts images from the video signals and performs image preprocessing; uses a trained fire detection model to detect flames and smoke in the images and displays the detection results on a monitor; wherein, the fire detection model is specifically: based on PP-YOLO, which includes a feature extraction network, a feature fusion network, and a detection head; an improved feature fusion network is used to strengthen the multi-scale feature fusion process and improve the expressive power of features; the feature extraction network uses the lightweight network ShuffleNetv2, adjusts the number of channels in the last convolutional layer to reduce the number of model parameters and floating-point computation, and performs knowledge distillation to improve the model's detection accuracy.

[0006] In one embodiment of the present invention, the method specifically includes the following steps:

[0007] (1) Receive video stream signals through a camera, extract images from the video stream signals, preprocess the images, and scale and adjust the size of the input image. Pixel;

[0008] (2) Construct a convolutional neural network model PP-YOLO, which includes a feature extraction network, a feature fusion network and a detection head, and load the trained model weights;

[0009] (3) Deep feature extraction is performed on the input image through a feature extraction network to extract feature maps at three different scales; then, multi-scale feature fusion is performed using an improved feature fusion network; finally, the detection head is used to predict the feature maps at three different scales to predict the category and location of the flame and smoke regions in the input image, and then post-processing is performed.

[0010] In one embodiment of the present invention, the lightweight network ShuffleNetv2 is used to replace the feature extraction network PP-YOLO. ShuffleNetv2 uses depthwise convolution and pointwise convolution instead of conventional convolution, which reduces the computational cost and number of parameters required for convolution operations. The number of channels in the final convolutional layer of ShuffleNetv2 is adjusted from 1024 to 512 to further compress the model. The image size of the three channels is... After deep feature extraction using a feature extraction network, three feature maps of different scales are extracted for subsequent detection. The sizes of the three feature maps are as follows: , and .

[0011] In one embodiment of the present invention, three feature maps of different sizes are fused at multiple scales through improved feature fusion; the feature fusion network uses the fusion of two adjacent feature maps to generate an intermediate fused feature map, and then fuses the intermediate fused feature map back into the original two adjacent feature maps, so that the feature information of the lower-level feature map can be passed to the higher level; and an attention module CBAM is embedded after the intermediate fused feature map, so that the model can select useful information in the feature path for fusion through self-learning.

[0012] In one embodiment of the present invention, FGD knowledge distillation is used to improve the accuracy of fire detection models.

[0013] In one embodiment of the present invention, before inputting the image to be detected into the fire detection model, it is necessary to train the fire detection model, including the following steps:

[0014] 1) Collect fire images;

[0015] 2) Use annotation tools to annotate the flames and smoke in the images to create a dataset;

[0016] 3) Train the fire detection model using the dataset and save the training weights.

[0017] Compared with the prior art, the present invention has the following beneficial effects:

[0018] This invention is based on the object detection algorithm PP-YOLO. To improve the multi-scale feature fusion capability of its feature pyramid network, a novel feature fusion network structure is proposed, and an attention mechanism module CBAM is embedded, enabling the three feature maps at different scales to have stronger feature representation capabilities. Furthermore, to reduce the number of model parameters and computational cost, a lightweight network, ShuffleNetv2, is introduced, and the number of channels is adjusted to further compress the model. Finally, FGD knowledge distillation is used to improve the model's accuracy. Compared to other deep learning-based object detection methods, this invention significantly reduces the number of parameters and computational cost, making it suitable for embedded devices while maintaining high detection accuracy. Attached Figure Description

[0019] Figure 1 This is a schematic flowchart of the improved PP-YOLO fire detection method of the present invention.

[0020] Figure 2 This is a schematic diagram of the improved PP-YOLO model structure constructed in this invention.

[0021] Figure 3 This is a schematic diagram of the structure of the improved feature fusion network constructed in this invention.

[0022] Figure 4This is a diagram illustrating the classification and location of fire information in the images presented in this embodiment. Detailed Implementation

[0023] The technical solution of the present invention will now be described in detail with reference to the accompanying drawings.

[0024] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of this application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.

[0025] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0026] This embodiment provides a fire detection method based on an improved PP-YOLO. First, video signals are acquired via a camera, and the video signals are cropped into images. Then, image preprocessing is performed. A trained fire detection model is used to detect flames and smoke in the images, and the detection results are plotted on the images. Specifically, the fire detection model is based on PP-YOLO, which includes a feature extraction network, a feature fusion network, and a detection head. An improved feature fusion network is used to enhance the multi-scale feature fusion process and improve the expressive power of the features. The feature extraction network uses the lightweight ShuffleNetv2 network, adjusting the number of channels in the last convolutional layer to reduce the number of model parameters and floating-point computations, and knowledge distillation is performed to improve the model's detection accuracy.

[0027] like Figure 1 As shown, the method of this invention specifically includes the following steps:

[0028] (1) The camera receives the video stream signal, extracts the video stream signal into an image, preprocesses the image, and scales and adjusts the input image size. Pixel;

[0029] (2) Construct a convolutional neural network model PP-YOLO, which includes a feature extraction network, a feature fusion network, and a detection head. Its structure is described in [reference needed]. Figure 2 Load the trained model weights;

[0030] (3) The lightweight feature extraction network ShuffleNetv2 extracts features from the input image and generates three feature maps at different scales; the improved feature fusion network is used to perform multi-scale feature fusion; finally, the detection head is used to predict the three feature maps at different scales to predict the category, location and prediction box size of the flame and smoke regions in the input image.

[0031] (4) Post-process the prediction results, remove duplicate prediction boxes using the non-maximum suppression method, map the prediction structure back to the actual image size, and display the prediction results.

[0032] The original feature extraction network ResNet50vd in PP-YOLO was replaced with the lightweight network ShuffleNetv2. ShuffleNetv2 uses depthwise convolution and pointwise convolution instead of conventional convolution, which reduces the computational cost and number of parameters required for convolution operations. The final convolutional layer of ShuffleNetv2 has 1024 channels, which was adjusted to 512 to further compress the model. The image size of the three channels is... After deep feature extraction using a feature extraction network, three feature maps of different sizes are extracted for subsequent detection. The sizes of the three feature maps are as follows: , and .

[0033] The feature extraction network extracts three deep feature maps at different scales, and these three feature maps are then fused using an improved feature fusion method. The feature fusion network generates an intermediate fused feature map by fusing two adjacent feature maps, and then fuses this intermediate fused feature map back into the original two adjacent feature maps, allowing feature information from lower-level feature maps to be passed to higher-level maps. An attention module (CBAM) is embedded after the intermediate fused feature map, enabling the model to select useful information from the feature maps for fusion through self-learning. Its structure is shown in [see diagram]. Figure 3 .

[0034] After replacing the PP-YOLO feature extraction network with ShuffleNetv2 and adjusting the number of model channels, the detection accuracy of the model decreased. FGD knowledge distillation was used to improve the accuracy of the fire detection model.

[0035] After constructing the detection model, before inputting the image to be detected into the fire detection model, model training is required, including the following steps:

[0036] 1) Collect fire images;

[0037] 2) Use annotation tools to annotate the flames and smoke in the images to create a dataset;

[0038] 3) Train the fire detection model using the dataset and save the training weights.

[0039] In this embodiment, the specific effect of classifying and locating fire information in the input image is as follows: Figure 4 As shown.

[0040] This invention uses model parameter quantity, computational quantity, detection speed and mean average precision (mAP) to measure the model. Table 1 shows the statistical results of each indicator of the fire detection algorithm. The detection speed is the result on an NVIDIA GeForce RTX 3060 graphics card.

[0041]

[0042] As can be seen from the statistical results in Table 1, the fire detection method proposed in this invention has low parameter and computational requirements, fast detection speed, and can maintain high detection accuracy.

[0043] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A fire detection method based on an improved PP-YOLO, characterized in that, Video signals are acquired via a camera, extracted into images, and preprocessed. A trained fire detection model is used to detect flames and smoke in the images, and the detection results are displayed on a monitor. Specifically, the fire detection model is based on PP-YOLO, which includes a feature extraction network, a feature fusion network, and a detection head. An improved feature fusion network is used to enhance the multi-scale feature fusion process and improve feature expressiveness. The feature extraction network uses the lightweight ShuffleNetv2 network, adjusting the number of channels in the last convolutional layer to reduce model parameters and floating-point computation, and knowledge distillation is performed to improve model detection accuracy. The method specifically includes the following steps: (1) Receive video stream signal through camera, extract video stream signal into image, preprocess the image, and scale and adjust the size of input image to 608×608 pixels; (2) Construct a convolutional neural network model PP-YOLO, which includes a feature extraction network, a feature fusion network and a detection head, and load the trained model weights; (3) Deep feature extraction is performed on the input image through a feature extraction network to extract feature maps at three different scales; then, multi-scale feature fusion is performed using an improved feature fusion network; finally, the detection head is used to predict the feature maps at three different scales to predict the category and location of the flame and smoke regions in the input image, and post-processing is performed. The lightweight network ShuffleNetv2 was used to replace the feature extraction network of PP-YOLO. ShuffleNetv2 uses depthwise convolution and pointwise convolution instead of conventional convolution, which can reduce the amount of computation and parameters required for convolution operations. The number of channels in the last convolutional layer of ShuffleNetv2 was adjusted from 1024 to 512 to further compress the model. The image size of the three channels is 608×608×3. After deep feature extraction by the feature extraction network, three feature maps of different scales were extracted for subsequent detection. The sizes of the three feature maps are 76×76×116, 38×38×232 and 19×19×512, respectively. Three feature maps of different sizes are fused at multiple scales through an improved feature fusion method. The feature fusion network generates an intermediate fused feature map by fusing two adjacent feature maps, and then fuses the intermediate fused feature map back into the original two adjacent feature maps, so that the feature information of the lower-level feature maps can be passed to the higher-level feature maps. An attention module CBAM is embedded after the intermediate fused feature map, so that the model can select useful information from the feature maps for fusion through self-learning. Before inputting the image to be detected into the fire detection model, the fire detection model needs to be trained, including the following steps: 1) Collect images of the fire; 2) Use annotation tools to annotate the flames and smoke in the images to create a dataset; 3) Train the fire detection model using the dataset and save the training weights.

2. The fire detection method based on the improved PP-YOLO according to claim 1, characterized in that, FGD knowledge distillation is used to improve the accuracy of fire detection models.

Citation Information

Patent Citations

  • Lightweight improved target detection method and detection system

    CN111914937A

  • Intelligent high-throughput method for measuring and calculating inflorescence density of field rape and application

    CN115424152A