Flame and smoke detection method based on roseconv2d

By enhancing the deep feature extraction of the flame and smoke detection model through RoseConv2d convolutional layers and ECA and CBAM attention mechanisms, the problem of insufficient accuracy of fire detection algorithms in small flame and dark environments is solved, and efficient and accurate fire detection is achieved.

CN120071247BActive Publication Date: 2025-11-11CHONGQING UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510136069.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-07
Publication Date
2025-11-11
Estimated Expiration
2045-02-07

AI Technical Summary

Technical Problem

Existing fire detection algorithms are not very accurate in detecting small flames and dark environments. Large models have a large number of parameters and run slowly, while small models lack accuracy and have insufficient generalization ability on embedded devices.

Method used

A RoseConv2d convolutional layer combined with ECA and CBAM attention mechanisms is used to train the fire and smoke detection model using the IoU loss function. Convolution operations are performed through four triangular convolutional kernels, and ECA and CBAM attention mechanisms are added to the Fire Detection Model part to enhance the model's deep feature extraction capabilities.

Benefits of technology

While reducing model parameters, it improves the accuracy and generalization ability of flame and smoke detection, providing fire detection results with high accuracy and low false detection rate, and is suitable for various scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120071247B_ABST
    Figure CN120071247B_ABST
Patent Text Reader

Abstract

This invention proposes a real-time flame and smoke detection method based on RoseConv2d, comprising the following steps: S1, data acquisition: real-time acquisition of flame and smoke images; S2, construction of a flame and smoke detection model: adding RoseConv2d, ECA attention mechanism, and CBAM attention mechanism to the Fire Detection Model part of the model; S3, obtaining flame and smoke detection results: inputting the preprocessed flame and / or smoke images to be detected into the flame and smoke detection model to obtain the detection results; the detection results include the numerical values ​​of smoke and flame. The detection method proposed in this invention can ensure high accuracy and low false detection rate in fire detection under various scenarios. Compared with existing deep learning fire detection algorithms, this invention provides more reliable detection results when dealing with scenes where the background and flame / smoke colors are similar, and when dealing with fires of different scales.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fire detection in computer vision within artificial intelligence, and more particularly to a flame and smoke detection method based on RoseConv2d. Background Technology

[0002] In the field of fire detection, traditional technologies rely on sensors to monitor changes in environmental characteristics during a fire, such as light sensing, temperature sensing, smoke detection, and gas identification, to determine the severity of the fire. With the development of artificial intelligence technology, computer vision-based fire detection technology has emerged, which identifies flames and smoke by analyzing image or video data.

[0003] However, current fire detection algorithms face severe challenges. On the one hand, while large models offer high detection accuracy, their massive parameter count results in extremely slow operation, and the training process consumes significant time and resources. On the other hand, while small models are fast, their accuracy often falls short of practical requirements. More importantly, both large and small models perform poorly when detecting small flames or in dark environments. Even large models trained on comprehensive fire datasets still have considerable room for improvement in detection accuracy. Furthermore, some algorithms employ overly complex dataset processing methods, which not only fail to improve detection performance but also have a negative impact, and the models also exhibit insufficient generalization ability on embedded devices.

[0004] To address the aforementioned issues, particularly the core challenges of insufficient accuracy and excessive parameter count, innovative convolution techniques and algorithm reconstruction are crucial. The morphology of flames and smoke is unpredictable and highly susceptible to environmental interference, demanding a powerful ability to extract deep image information from the model. This typically leads to an increase in model parameters, placing high demands on the performance of embedded devices. Excessive compression of the model size solely for lightweighting results in decreased detection accuracy and a significant increase in the risk of false positives and false negatives. Therefore, innovation in convolution techniques and algorithm reconstruction based on the underlying logic of image detection algorithms are essential for building a lightweight, high-accuracy, and low-parameter ideal fire detection model. Summary of the Invention

[0005] This invention aims to at least solve the technical problems existing in the prior art, and in particular, it innovatively proposes a flame and smoke detection method based on RoseConv2d.

[0006] To achieve the above-mentioned objectives of this invention, this invention provides a flame and smoke detection method based on RoseConv2d, comprising the following steps:

[0007] S1, acquires flame and / or smoke images in real time and performs preprocessing;

[0008] S2, input the image into the flame and smoke detection model to obtain the detection results, which include the flame value and / or smoke value.

[0009] The flame and smoke detection model comprises three modules. The output of the first module is connected to the input of the second module, and the output of the second module is connected to the input of the third module. The first module consists of a convolutional layer, a normalization layer, an activation function layer, and an ECA layer in sequence. The second module consists of a residual layer, a convolutional layer, a normalization layer, an activation function layer, a CBAM layer, and a residual layer in sequence. The third module consists of an adaptive average pooling layer, a flattening layer, a fully connected layer, and an activation function layer in sequence.

[0010] The input of the first convolutional module is connected to the output of the input image. The input of the first normalization module is connected to the output of the first convolutional module. The input of the first activation function module is connected to the output of the first normalization module. The input of the ECA module is connected to the output of the first activation function module. The input of the first residual module is connected to the output of the ECA module for residual connection. The input of the second convolutional module is connected to the output of the ECA module. The input of the second normalization layer is connected to the output of the second convolutional module. The input of the second activation function is connected to the output of the second normalization module. The input of the CBAM module is connected to the output of the second activation function module. The input of the second residual connection is connected to the output of the CBAM module, and the input of the second residual connection is connected to the output of the first residual module. The input of the adaptive average pooling module is connected to the output of the second residual module. The input of the flattening module is connected to the output of the adaptive average pooling module. The input of the fully connected module is connected to the output of the flattening module. The input of the third activation function module is connected to the output of the fully connected module. Through these connections, the model achieves a complete process from input image to category and bounding box prediction.

[0011] To address the issue of low accuracy in small flame recognition in the application model, an ECA attention mechanism is added to its Fire Detection Model. The underlying principle is that the weight learning process should be directly one-to-one. The ECA attention mechanism module uses a 1×1 convolutional layer directly after the global average pooling layer, eliminating the fully connected layer. This module avoids dimensionality reduction and effectively captures cross-channel interactions. Furthermore, ECA achieves excellent results with only a few parameters. To enhance the correlation between channels, a CBAM attention mechanism is added to its Fire Detection Model. CBAM is used to enhance the representational capabilities of convolutional neural networks.

[0012] Furthermore, the convolutional layer is Roseconv2d, which is a custom two-dimensional convolutional layer, and its construction process is as follows:

[0013] First, a raw convolutional kernel is set up. This raw convolutional kernel is a two-dimensional matrix, where each element represents a weight used to perform a weighted summation operation on the input image. The raw convolutional kernel has equal height and width, and is considered a square.

[0014] Then, the original convolution kernel is divided into four identical triangular convolution kernels along two diagonals, where each triangular convolution kernel is regarded as a rectangular convolution kernel. The value inside the triangle is x, which is a random value based on a normal distribution, and the value outside the triangle is 0.

[0015] Next, the four triangular convolution kernels are overlapped and arranged to form a square of the same size as the original convolution kernel: the right angles of the four triangular convolution kernels are placed in the upper left, upper right, lower right, and lower left corners in sequence; each triangular matrix is ​​overlapped by two other adjacent triangular matrices; the matrix formed moves according to the step size, and its subsequent movement is consistent with that of a traditional convolution machine.

[0016] When performing Roseconv2d convolution, the input data is convolved through four triangular convolution kernels. Each convolution kernel slides on the input data with its specific shape and weight and calculates the dot product to generate the corresponding convolution feature map. The four convolution feature maps are then added element by element to form the final output.

[0017] Furthermore, to enhance the model's expressiveness and flexibility, a bias term is added to the summed result. This bias term, as a learnable parameter, allows for fine-tuning of the final output. Ultimately, after this series of processing steps, the output is the result that fuses the feature information from four triangular convolutional kernels and adjusts the bias.

[0018] Furthermore, the activation function used is the ReLU activation function.

[0019] Furthermore, the flame and smoke detection model is a trained flame and smoke detection model, which uses the IoU loss function during training. Since the algorithm of this invention involves extensive extraction of deep features and has high requirements for model evaluation metrics, IoU is used as the loss function to accelerate model convergence and more accurately evaluate model quality in order to address this issue.

[0020] Furthermore, the test results also include an assessment of the fire situation:

[0021] If the smoke level exceeds the first smoke threshold, a fire is determined to be present.

[0022] If the flame value exceeds the first flame threshold, a fire is determined to exist.

[0023] If the smoke level exceeds the second smoke threshold and the flame level exceeds the second flame threshold, a fire is determined to exist.

[0024] Wherein, the first flame threshold is greater than the second flame threshold; the first smoke threshold is greater than the second smoke threshold;

[0025] In the event of a fire, the alarm procedure will be activated and the alarm information will be sent to the terminal.

[0026] In the event of a fire, the alarm procedure will be activated and the alarm information will be sent to the terminal.

[0027] Spontaneous combustion and forest fires typically follow a pattern of smoke preceding fire, because combustible materials produce smoke before fully burning. However, not all fires follow this pattern. For example, spontaneous combustion of electric bicycles often presents as fire preceding smoke, because the chemical reaction inside the battery may directly ignite the flame, with smoke appearing subsequently. Therefore, fire detection systems should be designed with flexible settings for detection parameters and triggering conditions.

[0028] In summary, by employing the above-mentioned technical solutions, the flame and smoke detection model constructed in this invention effectively improves the extraction capability of deep features while reducing model parameters, thereby enhancing the model's accuracy. For dynamic and variable features such as flames and smoke, this model provides an ideal solution. Furthermore, the model exhibits excellent generalization ability.

[0029] Furthermore, the detection method proposed in this invention ensures high accuracy and low false detection rate in fire detection across various scenarios. Compared to existing deep learning fire detection algorithms, this invention provides more reliable detection results when handling scenes where the background, flame, and smoke colors are similar, and when dealing with fires of different sizes. This not only significantly improves the accuracy of flame detection but also reduces the risk of false identification, while exhibiting strong robustness, indicating its great potential in practical applications.

[0030] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0031] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:

[0032] Figure 1This is a flowchart of the flame and smoke detection method based on RoseConv2d of the present invention.

[0033] Figure 2 This is a schematic diagram of the detection model of the present invention.

[0034] Figure 3 This is a schematic diagram of the RoseConv2d convolution process of the present invention.

[0035] Figure 4 This is a diagram showing the training parameters for the flame and smoke detection method based on RoseConv2d in this invention.

[0036] Figure 5 This represents the IoU loss from the code training graph results in this embodiment.

[0037] Figure 6 The detection accuracy mAP@50-95 is the result of the code training graph in this embodiment. Detailed Implementation

[0038] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0039] This invention relates to a flame and smoke detection method based on RoseConv2d, the process of which is as follows: Figure 1 As shown: First, the monitoring system inputs real-time detection video into the computer. The computer then segments the video frame by frame and inputs the segments into the detection module. The detection module detects the images and outputs the results on a visualization interface. It reassembles the individual frames into a video and displays the detection results as visual boxes, clearly identifying flames and smoke with detection tags. If flames or smoke are present, a fire detection result is output, issuing an early warning. This invention is effective in environments such as commercial areas, factories, and forests, improving the accuracy, generalization ability, and detection speed of flame detection algorithms.

[0040] The method of this invention is implemented based on the RoseConv2d module: ECA and CBAM attention mechanisms are added to the Fire Detection Model, and an IoU loss function is added to the evaluation metric. After training, it is deployed to monitoring equipment for real-time monitoring. The structure of the flame and smoke detection method based on RoseConv2d is as follows: Figure 2As shown. The left column represents the first part of the Fire Detection Model, consisting of convolutional layers, normalization layers, activation function layers, and ECA layers. An ECA module is added to enhance information exchange between channels. The middle column represents the second part of the Fire Detection Model, consisting of residual module layers, convolutional layers, normalization layers, activation function layers, and CBAM layers. The right column represents the third part of the Fire Detection Model, consisting of adaptive average pooling layers, flattening layers, fully connected layers, and activation function layers. Together, they constitute the detection algorithm based on RoseConv2d.

[0041] Because real-world video environments can present unpredictable situations such as human error and weather conditions, the algorithm model itself needs to have good generalization capabilities. This invention innovatively proposes the RoseConv2d convolution module, such as... Figure 3 As shown, its design aims to process input data using four triangular convolution kernels of different shapes: the upper left triangular kernel, the upper right triangular kernel, the lower right triangular kernel, and the lower left triangular kernel. The non-triangular regions of the convolution kernels are set to zero, while the random values ​​in the triangular regions are based on a standard normal distribution. The input data is convolved through each of the four triangular kernels. The convolution results are summed, a bias term is set, and the final output is formed. ECA and CBAM modules are embedded in the algorithm to enhance the attention mechanism, enabling accurate and rapid identification of both small flames and large fires in real-time detection. For fire detection, features like flames and smoke, which have no fixed shape and change significantly with environmental factors, require deep image information extraction. This inevitably increases the model parameters, which is unfriendly to embedded systems. However, using a smaller model for lightweight purposes results in insufficient image detection accuracy, leading to frequent false positives and false negatives. This is undesirable in fire detection. The reason for choosing to embed the ECA and CBAM modules is to reduce the number of model parameters, effectively improve deep feature extraction, and increase model accuracy, making it the best choice for features such as flames and smoke.

[0042] The specific implementation method is as follows:

[0043] Step 1: Collect the dataset. The dataset comes from mainstream data platforms such as GitHub and includes 30,000 images covering cities, factories, and homes. The publicly available dataset is D-Fire: an image dataset for fire and smoke detection. Divide this dataset into training and testing sets in an 8:2 ratio as input to the model. The basic dataset partitioning is done, and the files are named "datasets".

[0044] Step 2: The algorithm scales the dataset image size proportionally to 256×256, reduces the long side proportionally, fills the short side with gray edges, and then divides the image into N×N cells. Based on the RoseConv2d algorithm, the optimizer is Adam. Add ECA attention mechanism to the Fire Detection Model module. ECA is actually an improved version of SENET. It removes the fully connected layer in the original SENET and replaces it with a 1*1 convolution kernel for processing, making the model parameters smaller and more lightweight. Because ECA convolution has good cross-channel information capture ability, it is unnecessary to capture information from all channels. Therefore, the fully connected layer is removed and replaced with a 1*1 convolution. ECA (ECA-Net) is a new convolutional neural network structure. Its advantages are as follows: (1) It can effectively capture long-distance dependencies. ECA-Net introduces a new channel attention mechanism, which can weight the features of different channels, so that the network can better capture long-distance dependencies. (2) Small number of parameters and high computational efficiency. ECA-Net has fewer parameters than traditional convolutional neural networks, while also significantly improving computational efficiency while maintaining accuracy. (3) It can adapt to different input sizes. ECA-Net can adapt to different input sizes, thus it has good adaptability when processing images of different sizes. The core idea of ​​the ECA module is to capture the dependencies between channels through one-dimensional convolution.

[0045] The core idea of ​​the ECA module is to capture the dependencies between channels through one-dimensional convolution. Compared with traditional attention mechanisms, the ECA module avoids complex dimensionality reduction and expansion processes, thus achieving high efficiency and lightweight characteristics. Specifically, the ECA module first adaptively calculates the kernel size k of the one-dimensional convolution based on the number of channels. The formula for calculating the kernel size is as follows:

[0046]

[0047] This formula is used to calculate the kernel size k of a one-dimensional convolution. Where C is the number of channels in the input feature. `k` and `b` are hyperparameters. Taking the absolute value and rounding down to the nearest odd number ensures the kernel size is odd. After obtaining the kernel size `k`, the ECA module applies a one-dimensional convolution to the input features, thereby learning the importance of each channel relative to the other channels. This process can be represented by the following formula:

[0048]

[0049] This formula represents the transformation of input features in into output features out through a one-dimensional convolution operation (kernel size k). This represents a one-dimensional convolution operation with a kernel size of k.

[0050] A CBAM attention mechanism is added to the Fire Detection Model module. CBAM consists of two sub-modules: a Channel Attention Module and a Spatial Attention Module. The Channel Attention Module adjusts the importance between channels, while the Spatial Attention Module adjusts the importance of spatial locations. This attention mechanism helps the network better capture the correlations between features, improving model performance. Assume the input feature map is: Using CBAM, a one-dimensional channel attention diagram is derived sequentially. and two-dimensional spatial attention diagram The overall attention process can be summarized as follows:

[0051]

[0052]

[0053] In the formula The feature map F is generated after passing through the channel attention module. for Generated after passing through the spatial attention module. For channel attention module, It is a two-dimensional spatial attention module.

[0054] Channel Attention Module

[0055] Channel attention maps are generated by leveraging the channel relationships between features. Since each channel of the feature map is considered a feature detector, channel attention focuses on "what" is meaningful in a given input image. To efficiently compute channel attention, a method is employed to compress the spatial dimension of the input feature map. Both AvgPool (average pooling) and MaxPool (maximum pooling) are used simultaneously, and it is proven that this approach is more representative than using a single pooling method.

[0056]

[0057]

[0058] In the formula, It is the sigmoid function;

[0059] , All represent weights;

[0060] , ; This indicates the dimensionality reduction ratio, used to adjust the dimensionality of the intermediate layers of an MLP, thereby controlling model complexity and computational cost, and balancing model performance and efficiency.

[0061] Represents a multilayer perceptron;

[0062] Represents the feature map;

[0063] This indicates that the feature map is averaged across the channels;

[0064] This indicates that the feature map is max-pooled across the channels;

[0065] MLP weights and Sharing, in The preceding part is the ReLU activation function;

[0066] This is the Spatial Attention Module.

[0067] Spatial attention maps are generated by leveraging the spatial relationships between features. Unlike channel attention modules, spatial attention modules focus on "where" the information is, serving as a complement to channel attention modules. To compute spatial attention, average pooling and max pooling operations are first applied along the channel axis and then concatenated to generate an effective feature descriptor. The channel information of a feature map is then aggregated using the two pooling operations, generating two 2D maps:

[0068] ;

[0069] in, This indicates that the feature map is averaged over its spatial features;

[0070] This indicates that the feature map is max-pooled on its spatial features;

[0071] Each represents the average pooling and max pooling characteristics of the channel, and then a standard convolutional layer is used for connection and convolution operations to obtain a two-dimensional spatial attention map.

[0072]

[0073]

[0074] In the formula, Represents a two-dimensional spatial attention map;

[0075] It is the sigmoid function;

[0076] This indicates that the connection is made through a convolutional layer;

[0077] This indicates that a 7×7 convolution kernel is used for the convolution operation;

[0078] The convolution operation in the TriangleConv2d class can be represented by the following matrix expression:

[0079] Assume the size of the input tensor x is C. in ×H×W, where C in Here, H represents the number of input channels, and H and W represent the height and width of the input, respectively. The output tensor size is C. out ×H'×W', where C out This represents the number of output channels, and H' and W' are the height and width of the output. For each output channel C... out Each element of the output can be represented by the following formula;

[0080]

[0081] Where: K is the size of the convolution kernel; W is the convolution kernel matrix, which is one of the four triangular matrices here; stride is the stride; padding and dilation affect the index calculation of x. The sum of the four triangular convolution kernels is the output result as shown in the formula:

[0082]

[0083] Finally, add the bias term, as shown in the formula:

[0084]

[0085] The bias term is described above. The steps above describe how to perform convolution operations through matrix operations and add the four convolution results of different shapes to obtain the final output.

[0086] Step 3: Input the dataset into the model for training. Perform multiple parameter adjustments based on the training results, retaining the weight file that achieves the highest detection speed and accuracy. epochs=10 (number of training epochs), image size=256 (input image size), batch=128 (number of batches), workers=2 (CPU and GPU work together). Training results: FPS=50, mAP@50-95=0.5787. The training weight pth file is obtained.

[0087] Step 4: Embed the detection program based on the optimal weight file into the monitoring device to monitor the input results in real time and issue an early warning upon detecting flames. Embedding in the monitoring device: Use the cv2 module, import the training weight pth file, and use cap.read to read the camera input video frame by frame for detection. Output the detected video in real time. If a flame is detected, the video will be labeled and the program will issue an alarm.

[0088] This completes the real-time flame and smoke detection based on RoseConv2d.

[0089] To demonstrate the effectiveness of the method of this invention, a control experiment was conducted. Under the same basic environment and dataset, this invention only changed the network structure and added the modules described in this invention. The basic environment parameters were: Python=3.8, CPU=i5-12600KF, GPU=NVIDIA GeForce RTX4060Ti, number of training epochs=10, input size=256, initial learning rate=0.01. The control group, YOLOv8s, YOLOv8m, YOLOv8l, and YOLOv8x, did not add ECA or CBAM modules, did not modify the loss function, and did not add image enhancement modules. The experimental results are shown in Table 1. The comparison table of training results between this invention and the YOLOv8 model clearly shows that compared to the original YOLOv8 series algorithms, the maximum number of parameters in this paper's algorithm has decreased from 60 million to 200,000, the floating-point value has decreased from 200 GFLOPs to 18 GFLOPs, and mAP@50-95 has increased from 0.46 to 0.57.

[0090] Table 1 Comparison of training results with YOLOv8 series algorithms

[0091]

[0092] For the reconstruction algorithm, this paper adds triangular convolution, ECA, and CBAM (i.e., the last row of Table 2). The training results of the model are shown in Table 2, comparing the impact of each component addition on the algorithm before and after. Compared to traditional convolution, the number of parameters increased by 50,000, but the floating-point values ​​decreased by 160 GFLOPs, and mAP@50-95 improved from 0.34 to 0.57. This demonstrates that the innovative convolution and optimization modules in this paper play a crucial role in improving performance.

[0093] Table 2 Comparison of training results on the improvement effects of each component

[0094]

[0095] This invention utilizes the YOLOv8 algorithm, but with even fewer parameters than YOLOv8s (a lightweight model), reducing the number from tens of millions to hundreds of thousands. This significantly saves time in model training and reduces the pressure on equipment during deployment. The algorithm achieves the best detection accuracy compared to all YOLOv8 algorithms. Compared to traditional convolutional algorithms, it reduces floating-point values ​​by 160 GFLOPs while improving detection accuracy by 70%. The detection speed is also quite high. For a fire detection algorithm with such high accuracy and low parameter count on publicly available datasets, this is commendable.

[0096] Figure 4 This diagram illustrates the data dimensions and parameters of the flame and smoke detection model structure. The first column on the left shows the name of each module and its corresponding layer number; the middle column shows the data dimensions; and the right column shows the parameter quantities of that layer's module. The lower half of the diagram shows the total number of model parameters as 212171, with a floating-point value of 18.56 GFLOPs.

[0097] Figure 5 This shows how the IoU_loss value of the algorithm changes with the number of training epochs. It can be seen that the loss eventually stabilizes at 0.95.

[0098] Figure 6 The graph shows the change in mAP@50-95 of the algorithm as the number of training epochs increases. It can be seen that mAP stabilizes near 0.6, and considering that the number of training epochs could be increased further, mAP is expected to exceed 0.6.

[0099] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims

1. A flame and smoke detection method based on RoseConv2d, characterized in that, Includes the following steps: S1, real-time acquisition of flame and / or smoke images; S2, input the image into the flame and smoke detection model to obtain the detection results, which include the flame value and / or smoke value; The flame and smoke detection model comprises three modules. The output of the first module is connected to the input of the second module, and the output of the second module is connected to the input of the third module. The first module consists of a convolutional layer, a normalization layer, an activation function layer, and an ECA layer. The second module consists of a residual layer, a convolutional layer, a normalization layer, an activation function layer, a CBAM layer, and a residual layer. The third module consists of an adaptive average pooling layer, a flattening layer, a fully connected layer, and an activation function layer. The convolutional layer is Roseconv2d, which is a two-dimensional convolutional layer, and its construction process is as follows: First, set the original convolution kernel, which is a two-dimensional matrix. Each element in the matrix represents a weight. The height and width of the original convolution kernel are equal, and it is regarded as a square. Then, the original convolution kernel is divided into four identical triangular convolution kernels along two diagonals, where each triangular convolution kernel is regarded as a rectangular convolution kernel. The value inside the triangle is x, which is a random value based on a normal distribution, and the value outside the triangle is 0. Next, the four triangular convolution kernels are stacked and arranged to form a square of the same size as the original convolution kernel: the right angles of the four triangular convolution kernels are placed in the upper left, upper right, lower right, and lower left corners in sequence. When performing Roseconv2d convolution, the input data is convolved through four triangular convolution kernels to generate corresponding convolutional feature maps. The four convolutional feature maps are then added element-wise to form the final output.

2. The flame and smoke detection method based on RoseConv2d according to claim 1, characterized in that, The activation function used is the ReLU activation function.

3. The flame and smoke detection method based on RoseConv2d according to claim 1, characterized in that, The flame and smoke detection model is a trained flame and smoke detection model, which uses the IoU loss function during training.

4. The flame and smoke detection method based on RoseConv2d according to claim 1, characterized in that, The test results also include an assessment of the fire situation: If the smoke level exceeds the first smoke threshold, a fire is determined to be present. If the flame value exceeds the first flame threshold, a fire is determined to exist. If the smoke level exceeds the second smoke threshold and the flame level exceeds the second flame threshold, a fire is determined to exist. Among them, the first flame threshold is greater than the second flame threshold; The first smoke threshold is greater than the second smoke threshold; In the event of a fire, the alarm procedure will be activated and the alarm information will be sent to the terminal.

Citation Information

Patent Citations

  • Antenna array DOA estimation method and system based on triangular convolution and application

    CN112561033A

  • YOLOv8s traffic sign detection method based on edge and shape feature fusion

    CN118609092A