Flame detection method based on visible light and infrared feature fusion network

By introducing a symmetric structure and adaptive feature fusion network into the DETR model, combining spatial and channel attention mechanisms, and fusing visible and infrared features, the problem of insufficient accuracy of existing flame detection methods in complex scenes is solved, and the detection accuracy is improved. Stickiness and accuracy.

CN118799718APending Publication Date: 2024-10-18BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202310388481.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-12
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

Existing flame detection methods have insufficient detection accuracy when dealing with complex scenes, especially environments with weak features and many interference objects, and are difficult to meet real-time requirements. Traditional methods rely on artificial features and are insensitive to small targets.

Method used

The DETR model based on visible light and infrared feature fusion is used to extract and fuse RGB and IR image features through a symmetrically structured backbone network and adaptive feature fusion network, combined with spatial and channel attention mechanisms, to improve detection robustness and accuracy.

Benefits of technology

It achieves highly accurate detection of small flames and noise, enhances the robustness and detection capabilities of the model, and is suitable for flame detection in complex scenes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118799718A_ABST
    Figure CN118799718A_ABST
Patent Text Reader

Abstract

The invention discloses a flame detection method based on a visible light and infrared feature fusion network, and the method comprises the steps: building a flame data set, and taking a DETR model as a basic model, and transforming the backbone network for extracting features into a symmetric structure, adding a feature fusion network between the feature extraction network and the coding and decoding structure to obtain a first Fire-DETR model, inputting the processed training set into the first Fire-DETR model for training optimization to obtain a second Fire-DETR model, and inputting a test image into the second Fire-DETR model to obtain a prediction result. The feature extraction network enables the detection model to extract visible light and infrared feature information at the same time for prediction, and the diversity of flame feature patterns is expanded. The added feature fusion network can consider the relationship between channels and spatial information, so that the extracted different features can be selectively fused. Compared with an existing target detection deep convolutional network, the improved Fire-DETR model is higher in robustness for small-area flames and noise, and the flame detection precision is higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of deep learning, target detection and multimodal recognition, and more specifically, to a flame detection method based on a visible light and infrared feature fusion network. background

[0002] Fire is the most common, prominent and harmful disaster in real life. Fire can be divided into building fire and forest fire according to its type. The occurrence of these fires is inevitably closely related to buildings, natural plants, etc. When fires occur in cities and factories, most of them start from flammable materials in or near buildings. When forest fires occur suddenly, they usually start in dense vegetation environments. Therefore, fires are directly related to the natural environment and personal safety. According to statistics, serious ecological damage and casualties are caused by fires every year. It is very critical to detect fire flames in time and deal with them.

[0003] Image-based flame detection is a widely used technology in this field. Before the emergence of deep learning models, traditional machine learning methods were often used to classify flames. Traditional classifiers consist of handcrafted features and classifiers. First, specified flame features such as flame color features, spectral features, dynamic features, etc. are extracted, and then these features are compared with a set of standard features that are classified as containing flames. The accuracy of traditional fire detection methods mainly depends on manual features. Due to the complexity of flame detection tasks, manual features may be redundant or incomplete, so traditional methods are gradually replaced by deep learning models.

[0004] Compared with flame recognition methods that rely on artificial features, deep learning technology can train convolutional networks to extract image features through supervised learning, thereby achieving high-performance image classification tasks. At present, there are two common target detection models: (1) Target detection algorithms based on candidate regions, mainly including the R-CNN series. This type of algorithm first generates a suspected target area and then detects it through a convolutional neural network. This type of algorithm is usually limited by the detection speed and cannot meet the real-time requirements of flame detection. (2) Target detection algorithms based on regression methods, mainly including YOLO and SSD. This type of algorithm model is characterized by a simple structure and a good detection speed, but most of them are not very sensitive to small targets.

[0005] In summary, although vision-based flame detection technology has developed rapidly, it is still a challenging task to perform stable and accurate detection in different scenarios. Flame is a chemical reaction that emits light and heat, and the temperature is very high, which can be regarded as a process of energy release. Therefore, it does not have a regular shape, and will present different colors and forms depending on the burning material and the burning time, and often has translucent characteristics. These dynamically changing characteristics are also difficult factors to solve in the flame detection task. Through related work, it can be found that most flame detection methods either explore the decisive characteristics of flames or focus on decision-making methods that optimize targets, but these methods are mostly trained under samples with obvious characteristics. The trained models will naturally rely on these features, and are obviously not competent for some scenes with weak features, including the initial stage of flame combustion, or scenes with more interference. Therefore, it is still necessary to overcome these problems and design a flame detection method with strong robustness and high accuracy. Summary of the invention

[0006] In view of this, the present invention provides a flame detection method based on a visible light and infrared feature fusion network, which mainly includes:

[0007] Establishing a flame dataset, the dataset comprising a plurality of paired RGB and IR images;

[0008] The DETR model is used as the basic model. The DETR includes a backbone neural network for extracting features, a coding and decoding structure, and a feature prediction network in sequence. The backbone network for extracting features is transformed into a symmetrical structure, a feature fusion network is added between the feature extraction network and the coding and decoding structure, and an attention mechanism is introduced into the feature fusion network to obtain a first Fire-DETR model. The attention mechanism includes a spatial attention mechanism and a channel attention mechanism. The first Fire-DETR model is first trained using a data set.

[0009] Aligning, annotating and dividing the collected flame data set into a training set, a validation set and a test set, wherein the training set and the validation set are used to input into a first Fire-DETR model for training to obtain a second Fire-DETR model, and the test set is used to test the second Fire-DETR model;

[0010] Preferably, the flame data set includes:

[0011] Collecting a plurality of images containing or not containing flame targets, the images must include an RGB image and an IR image, screening and eliminating images whose flame area exceeds 80% of the image area to obtain the first flame image data set;

[0012] Performing image enhancement on the image, the image enhancement method comprising: rotating, mirroring, scaling, splicing and brightness balancing the flame image in the first data set to obtain a plurality of expanded flame images, and merging the plurality of expanded flame images with the first data set to form the flame data set;

[0013] Preferably, after establishing the first flame image data set, the method further includes labeling the data set:

[0014] The flame area of ​​the flame image is circled in a rectangular shape using a standard tool, and the boundary information of the flame target is recorded using a first format. The boundary information also includes two-dimensional coordinate information of the upper left corner and the lower right corner.

[0015] Preferably, the flame detection method based on the visible light and infrared feature fusion network, its basic network also includes a backbone network improved from the ResNet structure. The backbone network can be composed of a symmetrical ResNet-50 network, and the ResNet-50 network includes five layers, and the first layer preprocesses the input. The remaining four layers have the same structure and are composed of Conv Block (convolution module) and Identity Block (residual module). Parameters are shared between the second to fifth layers of the ResNet-50; the backbone network extracts the feature information of the image data to obtain a first RGB feature map and a first IR feature map.

[0016] Preferably, the flame detection method based on the visible light and infrared feature fusion network, its basic network also includes an adaptive feature fusion network, the feature fusion network integrates the spatial attention mechanism and the channel attention mechanism. The spatial attention mechanism extracts the spatial feature area that the network pays attention to on the first RGB feature map, and the feature area will be mapped to the first IR feature map, and spliced ​​with the first RGB feature map to obtain the first RGB-IR feature map. The channel attention mechanism extracts the channels that the network pays attention to and does not pay attention to on the first RGB-IR feature map, the channels that the network pays attention to will be enhanced, and the channels that the network does not pay attention to will be suppressed, so as to obtain the second RGB-IR feature map.

[0017] The second RGB-IR feature map will be passed into the encoding-decoding structure for prediction to obtain a first prediction result.

[0018] Preferably, the detection effect of the second Fire-DETR model is evaluated and calculated in the following manner:

[0019]

[0020]

[0021] Wherein, TP represents the number of bounding boxes that correctly identify flames, FN represents the number of bounding boxes that do not identify flames, and FP represents the number of bounding boxes that incorrectly identify flames. Precision is the detection accuracy, and Recall is the recall rate.

[0022] Compared with the existing methods, the flame detection method based on the visible light and infrared feature fusion network provided by the present invention achieves at least the following beneficial effects:

[0023] The flame detection method based on the visible light and infrared feature fusion network provided by the present invention modifies the backbone network into a symmetrical structure in the basic network, which can extract both visible light and infrared features at the same time. This enables the first Fire-DETR model to have basic dual-modal feature extraction capabilities. In addition, the present invention provides an adaptive feature fusion network that combines spatial attention and channel attention, which can fully fuse the feature information of different modalities that the network is concerned about, thereby improving the small flame detection capability. The second Fire-DETR detection model obtained after training is more robust to small data sets and noise. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 It is the overall flow chart of the present invention;

[0025] Figure 2 It is a schematic diagram of the structure of Fire-DETR;

[0026] Figure 3 This is a schematic diagram of a symmetrical backbone network used by Fire-DETR;

[0027] Figure 4 It is a schematic diagram of the structure of the embedded adaptive feature fusion network; DETAILED DESCRIPTION

[0028] Exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present invention unless otherwise specifically stated.

[0029] Combination Figure 1 , 2 ,3 Description, Figure 1 It is an overall flow chart of a flame detection method based on a visible light and infrared feature fusion network proposed by the present invention; Figure 2 It is a schematic diagram of the structure of the flame detection method based on the visible light and infrared feature fusion network; Figure 3This is a schematic diagram of a symmetrical backbone network used by Fire-DETR; Figure 4 The structure diagram of the adaptive feature fusion network embedded in the basic model is shown, which illustrates a specific embodiment of the flame detection method based on the visible light and infrared feature fusion network proposed by the present invention. The specific steps are as follows:

[0030] S101: Establish a flame data set, which includes multiple paired RGB and IR images;

[0031] It is understandable that the flame dataset must contain images of RGB and IR modes taken at the same time, and the captured areas must be consistent.

[0032] S102: Taking the DETR model as the benchmark model, the DETR model includes a feature extraction network, a coding and decoding structure, and a feature prediction network. In the basic network, the feature extraction network is modified to a symmetric structure, and a feature fusion network is added between the feature extraction network and the coding and decoding structure to obtain the first Fire-DETR model;

[0033] In step S102, combining Figure 2 It can be seen that the DETR model is a Transformer-based image prediction model, which mainly includes a backbone neural network for extracting features, a coding and decoding structure, and a prediction network. The backbone network can be used, but not limited to, ResNet50 and ResNet101 networks, which are mainly used to extract image features. The coding and decoding structure mainly converts image predictions into sequence predictions. The prediction network consists of a fully connected neural network, which is responsible for completing the final category and position output.

[0034] Combination Figure 3 It is understandable that the backbone network of Fire-DETR adopts the symmetrical ResNet50 structure, but is not limited to this. The structure of the ResNet50 model is mainly divided into five layers, and the first layer preprocesses the input. The remaining four layers are composed of a Conv Block (convolution module) and an Identity Block (residual module). The convolution module is mainly used to further extract features and reduce dimensions. The residual element is mainly used to solve the problem of gradient explosion caused by too deep a network layer but does not change the dimension of the feature. The symmetrical backbone network can extract the feature information of images in RGB and IR modes respectively. This step can extract the two-dimensional features and heat features of the flame, preparing for the next step of feature fusion. In order to make the second Fire-DETR model more lightweight, the symmetrical ResNet50 feature extraction network can share parameters after the second layer.

[0035] Combination Figure 4It is understandable that adding a feature fusion module between the feature extraction backbone network and the encoding and decoding structure of the basic model can effectively fuse the two-dimensional information of the flame in the RGB image and the heat information of the flame in the IR image. The feature fusion module combines the spatial attention mechanism and the channel attention mechanism, and can be trained end-to-end with the Fire-DETR model. The feature fusion network mainly consists of two parts:

[0036] (1) Spatial Attention Module

[0037] The backbone network extracts the visible light feature map FRGB and infrared image feature map FIR of the corresponding layer. The weights WS1 and WS2 can be calculated using the following formula. The weight maps WS1 and WS2 are the results of average pooling and maximum pooling of the RGB feature map, respectively. The 7×7 convolution kernel f7×7 is used for dimensionality reduction, and the activation function is used to activate and output the final RGB spatial feature weight map WS3. The spatial attention module extracts the spatial weight from the visible light feature map, and maps the effective area of ​​RGB attention to the IR feature map by multiplication.

[0038]

[0039] (2) Channel Attention Module

[0040] This example uses ECANet as the final channel attention module, but is not limited to this. The calculation process of ECANet can be calculated by formula (2). First, the average pooling operation is performed on the connected feature map FRGB-IR. Then, an adaptive 1×1 convolution layer is used to replace the fully connected layer to calculate WS4. The convolution operation can avoid dimensionality reduction and greatly reduce the number of parameters. The size of the adaptive convolution layer is determined by formula (3), where C represents the dimension of the channel in the feature map. Finally, the extracted channel weights are activated using an activation function to obtain the final fused feature F used for prediction. Combined with ResNet50, this example places the fusion step in the last layer of ResNet50 to complete, but is not limited to this.

[0041] W s4 (F) = σ(f k×k (AVGPool(F)))

[0042] F=W s4 ×F RGB-IR

[0043]

[0044] S103: aligning, annotating and dividing the collected flame data set into a training set and a test set, inputting the images in the training set into the first Fire-Detr model for training to obtain a second Fire-Detr model;

[0045] In step 103, firstly, an image alignment algorithm based on the SURF algorithm is used to align a data set (including an RGB image and an IR image), and the alignment algorithm is a pre-processing method, and is not limited thereto. Then, the aligned flame data set is divided into a training set and a test set according to a ratio of 8:2, but is not limited thereto and can be set according to requirements.

[0046] S104: Input the test image in the test set into the second Fire-DETR model to obtain the flame detection result;

[0047] It can be understood that in this example, the DETR model is modified to obtain a model that is more suitable for flame detection. The training set is input into the first Fire-DETR model for training. The training process is as follows: the input RGB and IR images are subjected to feature extraction through a symmetrical feature extraction network to obtain a pair of RGB features and IR feature maps. The two feature maps are then input into a feature fusion network to obtain a fused feature map. The fused feature map is then subjected to end-to-end classification and regression, and the loss is calculated to obtain the flame detection model of the present invention.

Claims

1. A flame detection method based on a visible light and infrared feature fusion network, characterized in that: include: (1) Establishing a flame dataset, the dataset includes multiple pairs of visible light (RGB) images and infrared (IR) images; (2) Taking the DETR model as the basic model, the DETR includes a backbone neural network for extracting features, a coding and decoding structure, and a feature prediction network in sequence, transforming the backbone network for extracting features into a symmetrical structure, adding a feature fusion network between the feature extraction network and the coding and decoding structure, and introducing an attention mechanism into the feature fusion network to obtain the first Fire-DETR model, wherein the attention mechanism includes a spatial attention mechanism and a channel attention mechanism; (3) aligning, annotating and dividing the collected flame data set into a training set and a test set, wherein the annotation result includes the target category and the coordinates of the target bounding box, the training set is used to input the first Fire-DETR model for training to obtain the second Fire-DETR model, and the test set is used to test the second Fire-DETR model; (4) Input the test images in the test set into the second Fire-DETR model to obtain prediction results.

2. According to claim 1, each piece of the flame dataset includes an RGB image and an IR image, and the RGB image and the IR image must be acquired by a visible light camera and an infrared camera at the same time in the same area. Therefore, each piece of the flame dataset includes an RGB image and an IR image.

3. According to claim 1, a flame detection algorithm based on a visible light and infrared feature fusion network is characterized in that: The feature extraction network is a symmetrical convolutional neural network, which is used to extract feature information of the visible light image and the infrared image in parallel. The feature extraction network can share parameters to reduce the number of parameters of the Fire-DETR. The first RGB feature map and the first IR feature map are extracted through the feature extraction network.

4. According to claim 1, a flame detection algorithm based on a visible light and infrared feature fusion network is characterized in that: The feature fusion network can fuse the first RGB feature map and the first IR feature map to obtain a first fusion prediction feature map. The module includes two parts. The first part is a spatial attention module composed of pooling operations and convolution operations; The second part is the channel attention module composed of pooling operations and convolution operations.

5. According to claim 1, a flame detection algorithm based on visible light and infrared fusion network is characterized in that: The training process of the algorithm includes: (1) aligning the original samples containing or excluding the target and splitting them into a test set and a training set; (2) labeling the sample using labeling software to obtain the target area and target type; (3) inputting all the samples and sample information into the first Fire-DETR model to obtain the size, position and prediction confidence of the corresponding predicted target; (4) According to the loss values ​​of the predicted information and the labeled information, the weights of the Fire-DETR model are updated to obtain the second Fire-DETR model.

6. A flame detection method based on a visible light and infrared feature fusion network according to claim 1, characterized in that: The performance test index of the second Fire-DETR model is also included, which is calculated according to the following formula (1, 2), where TP represents the number of the enclosing boxes that correctly identify the flame, FN represents the number of the enclosing boxes that are not identified, and FP represents the number of the enclosing boxes that are incorrectly identified. Precision is the detection accuracy, and Recall is the recall rate.

Citation Information

Cited By

  • Flame detection method and equipment based on flame specificity and multi-exposure image fusion

    CN120656042A

  • Flame detection methods and equipment based on flame specificity and multi-exposure image fusion

    CN120656042B

  • Fire point detection method and system based on cross-modal feature marshalling

    CN121305474A