Lightweight smoke identification method based on spatial-temporal feature fusion
By designing a lightweight smoke recognition method based on spatio-temporal feature fusion in forest fire detection, and using the TSNet network to fuse the spatial and temporal features of video frames, it solves the problem of real-time warning in tall spaces with traditional methods and achieves higher smoke detection Accuracy and lower false alarm rate.
Patent Information
- Application Number
- CN202310288700.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-22
- Publication Date
- 2024-09-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional fire detection systems are difficult to achieve real-time early warning in tall spaces such as forests. Although deep learning methods can extract smoke features, they are computationally expensive and cannot support real-time early warning of wild fires.
Design a lightweight smoke recognition method based on spatiotemporal feature fusion. By constructing a TSNet network and combining MobileNetV3 and ProbSprase Self-Attention networks, the local spatial features and temporal features of the video frame are extracted and fused to achieve smoke recognition.
It improves the accuracy and precision of field smoke detection, reduces the false alarm rate, and performs better than the classic model, proving the advantages of the fusion of temporal and spatial features in smoke recognition.
Smart Images

Figure CN118692001A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision, and in particular to a method for lightweight smoke recognition based on spatiotemporal feature fusion. Background Art
[0002] Forests are an important ecological resource, providing important raw materials for human production and life. Forest fires are extremely destructive disasters, which not only cause serious damage to the ecological environment, but also cause huge economic losses to humans and even endanger life safety. When a forest fire occurs, it is much more difficult to extinguish it than an urban fire, so it is particularly important to have an effective early warning of forest fires.
[0003] Traditional fire detection systems generally use temperature or smoke sensors. When a fire occurs, the generated physical quantities such as smoke, temperature and light reach a certain value and an alarm signal is issued. However, this detection system is only suitable for fire warnings in buildings, tunnels, etc., but it is not well applicable to fire alarms in large spaces. In recent years, with the continuous development of machine vision and image processing technology, fire detection technology based on video images has attracted people's attention. This new fire detection technology can ignore the limitations of terrain and has a large detection coverage.
[0004] There are no blind spots or gaps in detection, and it has the characteristics of high detection rate and the ability to provide remote real-time warnings. Therefore, it is gradually becoming the main solution for forest fire warnings.
[0005] With the development of deep learning technology, in 2015, the Convolutional Neural Network surpassed all traditional image feature extraction methods in the ImageNet image classification competition, and for the first time surpassed the recognition rate of trained humans, proving that the Convolutional Neural Network has a strong ability in extracting image features. Although deep learning methods such as convolutional neural networks can automatically extract smoke features and have a good smoke recognition rate, such methods often require huge training data and have high computational overhead. It is impossible to provide real-time warnings for wildfires. To address the above problems, this paper proposes a lightweight smoke recognition method based on spatiotemporal feature fusion. Summary of the invention
[0006] In view of this, the purpose of the present invention is to provide a lightweight smoke recognition method based on spatiotemporal feature fusion, which is mainly used to solve the real-time early warning of wildfires by traditional methods.
[0007] The objective of the present invention is achieved through the following technical solutions:
[0008] The method for lightweight smoke recognition based on spatiotemporal feature fusion includes the following steps:
[0009] 1) First, the video data is processed to obtain a video data frame sequence;
[0010] 2) Construct a lightweight deep learning network TSNet that integrates spatiotemporal features. The network includes a shallow spatial feature extraction module and a spatiotemporal feature extraction module.
[0011] 3) Using the TSNet network constructed in step 2), a lightweight smoke recognition model based on spatiotemporal feature fusion is constructed;
[0012] 4) Using the lightweight smoke recognition model based on spatiotemporal feature fusion constructed in step 3), the video data frame sequence is processed to obtain the smoke recognition result.
[0013] Furthermore, after obtaining the video data frame sequence, the video frames are subjected to formatting and normalization processing such as denoising.
[0014] Further, in step 2), a light-weight deep learning network TSNet with spatiotemporal feature fusion is constructed, which includes a shallow spatial feature extraction module SSFEM and a spatiotemporal feature extraction module SFEM. The shallow spatial feature extraction module is used to extract the local spatial features of a single-frame image, abstract it and gradually reduce the feature map resolution; the spatiotemporal feature extraction module is used to extract the temporal features between multiple smoke frames and the deep abstract features of a single-frame smoke image, and the extracted smoke temporal features and deep spatial features are further fused in the module. The grid structure of the network is designed as follows:
[0015] (a) Shallow spatial feature extraction module SSFEM: This module is built on the basis of the MobileNetV3 network module and is used to extract the local spatial features of a single frame image, abstract it and gradually reduce the resolution of the feature map;
[0016] (b) Spatiotemporal feature extraction module SFEM: This module is built on the basis of the ProbSprase Self-Attention network module and is used to extract the temporal features between multiple frames of smoke images and the deep abstract features of a single frame of smoke images. At the same time, the extracted smoke temporal features and deep spatial features are further integrated in this module.
[0017] Further, in step b), the grid structure of the spatiotemporal feature extraction module SFEM is designed as follows: Figure 2As shown in the figure, Temporal Multi-head ProbSparse Attention and Space Multi-head ProbSparseAttention are built on the basis of the ProbSprase Self-Attention network module.
[0018] Furthermore, the input of the Temporal Multi-head ProbSparse Attention layer is (a) the local spatial features of the fused multi-frame images extracted by the shallow spatial feature extraction module SSFEM. The model is shown in formulas (1) to (4):
[0019] MultiHead(A,P,V)=Concat(head1,head2,...,head h )W O (1)
[0020]
[0021]
[0022]
[0023] In the formula, The three vectors are converted from the feature map through a fully connected layer and are used to analyze the connection between different regions of the image; k is the dimension of matrices A and P; W is the weighted evidence; head represents the single feature information obtained through single-head attention; mutilHead represents the feature information obtained by aggregating multi-head attention; Attention represents the internal specific calculation method of the self-attention mechanism; M(q, K) is used to measure the sparsity of each q for the randomly selected K.
[0024] Furthermore, the grid structure of the Space Multi-head ProbSparse Attention layer is designed with the input being the local spatial features of a single frame image extracted by the shallow spatial feature extraction module SSFEM, the TemporalMulti-head ProbSparse Attention layer.
[0025] Furthermore, in step 3), the constructed TSNet network constructs a lightweight smoke recognition model based on spatiotemporal feature fusion.
[0026] Furthermore, in step 4), a lightweight smoke recognition model based on spatiotemporal feature fusion is constructed to process the video data frame sequence, and the smoke recognition result is obtained through a fully connected layer.
[0027] The technical effect of the present invention is unquestionable. The present invention discloses a lightweight smoke recognition method based on spatiotemporal feature fusion. The present invention utilizes the spatiotemporal feature fusion algorithm in the current deep learning direction of computer vision to recognize smoke features, thereby improving the accuracy, precision, and false alarm rate of outdoor smoke detection. And its accuracy, precision, and false alarm rate all show better performance than the current classic model. At the same time, it also proves that when performing smoke recognition, using both the temporal and spatial features of smoke has better performance than using a single feature. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 This is a model grid structure diagram of the present invention.
[0029] Figure 2 This is a grid structure diagram of the SFEM model of the spatiotemporal feature extraction module of the present invention. DETAILED DESCRIPTION
[0030] The present invention is further described below in conjunction with the embodiments, but it should not be understood that the above subject matter of the present invention is limited to the following embodiments. Without departing from the above technical ideas of the present invention, various substitutions and changes are made according to the common technical knowledge and customary means in the art, which should all be included in the protection scope of the present invention.
[0031] See also Figure 1 , a lightweight smoke recognition method based on spatiotemporal feature fusion, comprising the following steps:
[0032] 1) First, the video data is processed to obtain a video data frame sequence;
[0033] 2) Construct a lightweight deep learning network TSNet that integrates spatiotemporal features. The network includes a shallow spatial feature extraction module and a spatiotemporal feature extraction module.
[0034] 3) Using the TSNet network constructed in step 2), a lightweight smoke recognition model based on spatiotemporal feature fusion is constructed;
[0035] 4) Using the lightweight smoke recognition model based on spatiotemporal feature fusion constructed in step 3), the video data frame sequence is processed to obtain the smoke recognition result.
[0036] Furthermore, after obtaining the video data frame sequence, the video frames are subjected to formatting and normalization processing such as denoising.
[0037] Further, in step 2), a light-weight deep learning network TSNet with spatiotemporal feature fusion is constructed, which includes a shallow spatial feature extraction module SSFEM and a spatiotemporal feature extraction module SFEM. The shallow spatial feature extraction module is used to extract the local spatial features of a single-frame image, abstract it and gradually reduce the feature map resolution; the spatiotemporal feature extraction module is used to extract the temporal features between multiple smoke frames and the deep abstract features of a single-frame smoke image, and the extracted smoke temporal features and deep spatial features are further fused in the module. The grid structure of the network is designed as follows:
[0038] (a) Shallow spatial feature extraction module SSFEM: This module is built on the basis of the MobileNetV3 network module and is used to extract the local spatial features of a single frame image, abstract it and gradually reduce the resolution of the feature map;
[0039] (b) Spatiotemporal feature extraction module SFEM: This module is built on the basis of the ProbSprase Self-Attention network module and is used to extract the temporal features between multiple frames of smoke images and the deep abstract features of a single frame of smoke images. At the same time, the extracted smoke temporal features and deep spatial features are further integrated in this module.
[0040] Further, in step b), the grid structure of the spatiotemporal feature extraction module SFEM is designed as follows: Figure 2 As shown in the figure, Temporal Multi-head ProbSparse Attention and Space Multi-head ProbSparseAttention are built on the basis of the ProbSprase Self-Attention network module.
[0041] Furthermore, the input of the Temporal Multi-head ProbSparse Attention layer is (a) the local spatial features of the fused multi-frame images extracted by the shallow spatial feature extraction module SSFEM. The model is shown in formulas (1) to (4):
[0042] MultiHead(A,P,V)=Concat(head1,head2,...,head h )W O (1)
[0043]
[0044]
[0045]
[0046] In the formula, The three vectors are converted from the feature map through a fully connected layer and are used to analyze the connection between different regions of the image; k is the dimension of matrices A and P; W is the weighted evidence; head represents the single feature information obtained through single-head attention; mutilHead represents the feature information obtained by aggregating multi-head attention; Attention represents the internal specific calculation method of the self-attention mechanism; M(q, K) is used to measure the sparsity of each q for the randomly selected K.
[0047] Furthermore, the grid structure of the Space Multi-head ProbSparse Attention layer is designed with the input being the local spatial features of a single frame image extracted by the shallow spatial feature extraction module SSFEM, the TemporalMulti-head ProbSparse Attention layer.
[0048] Furthermore, in step 3), the constructed TSNet network constructs a lightweight smoke recognition model based on spatiotemporal feature fusion.
[0049] Furthermore, in step 4), a lightweight smoke recognition model based on spatiotemporal feature fusion is constructed to process the video data frame sequence, and the smoke recognition result is obtained through a fully connected layer.
Claims
1. A lightweight smoke recognition method based on spatiotemporal feature fusion, characterized by: The following steps are involved: 1): First, process the video data to obtain a video data frame sequence; 2): Construct a spatiotemporal feature fusion lightweight deep learning network (TSNet), which includes a shallow spatial feature extraction module and a spatiotemporal feature extraction module; 3): Use the TSNet network constructed in step 2) to build a lightweight smoke recognition model based on spatiotemporal feature fusion; 4): Use the lightweight smoke recognition model based on spatiotemporal feature fusion constructed in step 3) to process the video data frame sequence to obtain the smoke recognition result.
2. The method for lightweight smoke recognition based on spatiotemporal feature fusion according to claim 1 is characterized in that: In step 2), a spatiotemporal feature fusion lightweight deep learning network (TSNet) is constructed, which includes a shallow spatial feature extraction module (SSFEM) and a spatiotemporal feature extraction module (SFEM). The shallow spatial feature extraction module is used to extract the local spatial features of a single frame image, abstract it and gradually reduce the feature map resolution; the spatiotemporal feature extraction module is used to extract the temporal features between multiple frames of smoke images and the deep abstract features of a single frame of smoke images, and the extracted smoke temporal features and deep spatial features are further fused in the module. The grid structure of the network is designed as follows: (a) Shallow spatial feature extraction module SSFEM: This module is built on the basis of the MobileNetV3 network module and is used to extract the local spatial features of a single frame image, abstract it and gradually reduce the resolution of the feature map; (b) Spatiotemporal feature extraction module SFEM: This module is built on the basis of the ProbSprase Self-Attention network module and is used to extract the temporal features between multiple frames of smoke images and the deep abstract features of a single frame of smoke images. At the same time, the extracted smoke temporal features and deep spatial features are further integrated in this module.
3. The method according to claim 3, characterized in that: The grid structure design of the spatiotemporal feature extraction module SFEM at the (b) layer is shown in Figure 2, where Temporal Multi-head ProbSparse Attention and Space Multi-headProbSparse Attention are built on the basis of the ProbSprase Self-Attention network module.
4. The method according to claim 4, characterized in that: The input of the Temporal Multi-head ProbSparseAttention layer is (a) the local spatial features of the fused multi-frame images extracted by the shallow spatial feature extraction module SSFEM. The model is shown in formulas (1) to (4): MultiHead(A,P,V)=Concat(head1,head2,...,head h )W O (1) In the formula, The three vectors are converted from the feature map through a fully connected layer and are used to analyze the connection between the various regions of the image; k is the dimension of matrix A, P; W is the weighted evidence; head represents the single feature information obtained through single-head attention; mutilHead represents the feature information obtained by aggregating multi-head attention; Attention represents the internal specific calculation method of the self-attention mechanism; M(q, K) is used to measure the sparsity of each q for the randomly selected K.
5. The method according to claim 4, characterized in that (e) The grid structure of the Space Multi-head ProbSparseAttention layer The grid structure design is the same as claim 5 except that the input is the local spatial features of a single frame image extracted by the shallow spatial feature extraction module SSFEM (a).
6. The method according to claim 1, characterized in that: In the step 3), a lightweight smoke recognition model based on spatiotemporal feature fusion is constructed, and the specific structure of the model is shown in FIG1 .
