ALS-ShuffleNet V2-based chemical plant flame smoke identification method

By introducing ShuffleNet V2 structure, ALS activation function, channel attention mechanism and residual connection in the YOLOv5 model, the problems of high false alarm rate, limited coverage and poor robustness in flame and smoke detection are solved, and high accuracy is achieved , low-cost real-time inspection, suitable for safety monitoring in chemical plant areas.

CN118918509APending Publication Date: 2024-11-08HUAIYIN INSTITUTE OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410983178.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

Existing flame and smoke detection methods have problems such as high false alarm rate, limited coverage, high cost and poor robustness. Traditional image processing methods are difficult to extract complex features of flame and smoke, deep learning models have high complexity and high computing resource requirements. , insufficient detection accuracy and real-time performance.

Method used

采用基于ALS-ShuffleNet V2的化工厂区火焰烟雾识别方法,通过引入ShuffleNet V2轻量化网络结构、改进激活函数、引入通道注意力机制和残差连接,优化YOLOv5模型,减少计算量和参数量,提高火焰和烟雾检测的精度和实时性。

Benefits of technology

Real-time flame and smoke detection on devices with limited computing resources is realized, which improves detection accuracy and robustness, reduces costs, is suitable for safety monitoring needs in chemical plant areas, and improves the application and performance of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118918509A_ABST
    Figure CN118918509A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image recognition and detection, and discloses a chemical plant flame smoke recognition method based on ALS-ShuffleNet V2, and the method comprises the steps: obtaining a flame smoke image data set, carrying out the preprocessing of the data set, and splitting a training set and a test set; replacing a backbone network of a YOLOv5 network model with a ShuffleNet V2 network, and introducing an activation function # imgabs0 # to avoid neuron death while keeping nonlinearity; introducing an attention mechanism, optimizing channel attention by using an adaptive average pooling method, and remodeling an attention weight by combining two full-connection layers with an activation function; introducing residual connection operation; and performing training test on the model by using the training set and the test set to obtain a trained model, and performing identification detection on the flame smoke image by using the trained model. Compared with the prior art, the method has the advantages that the calculation amount and the parameter amount are reduced, and meanwhile, the precision and the real-time performance of flame and smoke detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition and detection, and in particular to a flame and smoke recognition method in a chemical plant area based on ALS-ShuffleNet V2. Background Art

[0002] With the continuous improvement of safety production requirements in chemical plants, timely and accurate detection of flames and smoke has become an important part of ensuring safety. Traditional flame and smoke detection methods mainly rely on sensors and manual monitoring. However, sensor methods have problems such as high false alarm rate, limited coverage and high cost. They are sensitive to other light and heat sources in the environment and are prone to false alarms. Their monitoring range is limited to the vicinity of the installation location and it is difficult to cover the entire plant area. At the same time, in order to achieve comprehensive monitoring, a large number of sensors need to be deployed, which increases costs. Manual monitoring is prone to slow response due to its reliance on personnel's attention and reaction speed. In addition, all-weather monitoring requires a lot of manpower, high cost and low efficiency. Traditional image processing methods also have problems of poor robustness and difficulty in feature extraction in flame and smoke detection. The complex morphology of flames and smoke, and environmental factors such as changes in illumination can affect the detection performance, making it difficult to extract effective features for accurate recognition. With the development of deep learning technology, object detection algorithms based on convolutional neural networks (CNNs) have achieved remarkable results in the field of image recognition.

[0003] The present invention proposes a flame and smoke recognition method for chemical plant area based on YOLOv5 lightweight network, aiming to solve the problems of high model complexity, high computing resource requirements and insufficient model optimization in the prior art. By introducing the ShuffleNet V2 structure, the model parameters and calculation amount are reduced, making the model more lightweight and suitable for running on devices with limited computing resources. In addition, by adding a channel attention mechanism to the model, the model's ability to extract flame and smoke features is enhanced, and the detection accuracy is improved. The lightweight model has a faster calculation speed and can realize real-time flame and smoke detection on low-power devices, meeting the safety monitoring needs of chemical plant areas. Summary of the invention

[0004] Purpose of the invention: In view of the problems existing in the prior art, the present invention provides a flame and smoke recognition method for a chemical plant area based on ALS-ShuffleNet V2. By introducing the lightweight network structure of ShuffleNet V2, improving the activation function, introducing the channel attention mechanism and adopting the residual connection, the YOLOv5 model is optimized, so that the accuracy and real-time performance of flame and smoke detection are improved while reducing the amount of calculation and the amount of parameters.

[0005] Technical solution: The present invention provides a method for identifying flame and smoke in a chemical plant area based on ALS-ShuffleNet V2, comprising the following steps:

[0006] Step 1: Obtain the flame smoke image dataset, preprocess the dataset, and split it into a training set and a test set;

[0007] Step 2: Build a YOLOv5 network model, replace its backbone network with the ShuffleNet V2 network, and introduce a new activation function ALS(x) to avoid neuron death while maintaining nonlinearity;

[0008]

[0009] Among them, ALS(x) represents the new activation function, α is a trainable parameter used to control the negative slope of the LeakyReLU part, and β is a trainable parameter used to control the shape of the Swish part. By introducing the trainable parameters α and β, the ALS activation function can adaptively adjust its shape to meet the needs of different layers and different inputs.

[0010] Step 3: Use the training set and the test set to train and test the model in step 2 to obtain the trained model, and use the trained model to identify and detect the flame smoke image.

[0011] Furthermore, in step 2, the ShuffleNetV2 network is further improved, specifically by introducing an attention mechanism into the ShuffleNetV2 network to enhance its feature representation capability.

[0012] Furthermore, the attention mechanism is introduced into the ShuffleNetV2 network, and the adaptive average pooling method is used to optimize the channel attention; the details are as follows:

[0013] The input feature map X∈R B×C×H×W Through adaptive average pooling, it becomes U∈R B×C×1×1 , and its calculation formula (2) is:

[0014] U = AvgPool(X) (2)

[0015] Among them, B is the batch size, C is the number of channels, H and W are the height and width of the feature map respectively, and the channel attention mechanism performs adaptive average pooling on each channel of the input feature map, compressing each channel into a 1×1 feature map, and obtaining U∈R B×C×1×1 , which can capture the global information of each channel;

[0016] Furthermore, after optimizing the channel attention using the adaptive average pooling method, two fully connected layers are combined with the activation function to reshape the attention weights, as follows:

[0017] Flatten the pooled feature map U to V∈R B×C , and its calculation formula (3) is:

[0018] V=U.view(B,C) (3)

[0019] The attention weight of each channel is calculated through two fully connected layers and a ReLU activation function. The weight of the first fully connected layer is After the ReLU activation function, the calculation formula (4) is:

[0020] Z=ReLU(V·W1+b1) (4)

[0021] In the formula, is the bias term, r is the channel reduction ratio, and the number of channels is reduced to Then after the ReLU activation function, we get

[0022] The weight of the second fully connected layer is After the Sigmoid activation function, the calculation formula (5) is:

[0023] S=σ(Z·W2+b2) (5)

[0024] Where b2∈R C is the bias term, σ is the Sigmoid activation function; the number of channels is restored to C through the second fully connected layer, and then the output is compressed to between 0 and 1 through the Sigmoid activation function. The final output attention weight is S∈R B ×C ;

[0025] Reshape the attention weights and resize them to the same dimension as the input feature map so that they can be multiplied channel by channel with the input feature map. The calculation formula (6) is:

[0026] S'=S.view(B,C,1,1) (6)

[0027] Multiply the input feature map and the attention weight channel by channel, and the calculation formula (7) is:

[0028] X'=XeS' (7)

[0029] In the formula, e represents channel-by-channel multiplication; the final weighted feature map is X'∈R B×C×H×WThe channel-by-channel multiplication method enables the network to dynamically adjust the feature strength of each channel, thereby enhancing the network's feature representation and discrimination capabilities.

[0030] Furthermore, after introducing the attention mechanism, the residual connection operation is also introduced, as follows:

[0031] Given an input feature map X and a target output in Represents a combination of several convolutional layers, activation functions and batch normalization, which is the nonlinear transformation part in the residual block. The residual connection is defined by adding the input directly to the output. Its calculation formula (8) is:

[0032]

[0033] The specific implementation in the residual block can be any combination of convolutional layers, activation functions, etc. Assume that F(X,{W i}) contains two convolutional layers and an activation function, and its calculation formula (9) is:

[0034]

[0035] Among them, σ represents the activation function, W1 and W2 are the convolution kernel parameters; the output formula (10) of the final residual block is:

[0036] y=σ(W2·σ(W1·X))+X (10)

[0037] If the number of channels of the input and output are different, a 1×1 convolution is needed to match them. The calculation formula (11) is:

[0038] y=σ(W2·σ(W1·X))+W s ·X (11)

[0039] Where W s is the 1×1 convolution kernel parameter used to adjust the number of input channels.

[0040] Beneficial effects:

[0041] 1. Due to the different features of flames and smoke, such as shape and size, the target detection model has high complexity, large computing resource requirements, poor detection accuracy and real-time performance, and other problems. Based on the YOLOv5 model, the present invention introduces the ShuffleNetV2 lightweight network structure to reduce the computational complexity and parameter amount of the convolution layer, while maintaining a high feature extraction capability. At the same time, in order to solve the problem of neuron death in the activation function used in the ShuffleNetV2 network, a new activation function is introduced, which can avoid the problem of neuron death while maintaining nonlinearity. The activation function combines the advantages of Swish and Leaky ReLU, and adjusts the shape of the activation function in an adaptive manner. The Swish part provides stronger nonlinearity and improves the complexity and expressiveness of the model; the Leaky ReLU part ensures that the gradient of the negative part is not zero, thereby avoiding the problem of neuron death. The trainable parameters α and β enable the activation function to be dynamically adjusted to meet the needs of different layers, thereby improving the expressiveness of the model. The smooth nonlinearity of the ALS activation function helps to provide a more stable gradient over the entire input range, thereby preventing the problem of neuron death, ensuring that the gradient in the negative input area is still valid, and promoting a more stable and efficient training process. It helps the network to extract useful features more accurately when facing diverse and complex data. Due to the different processing methods of the ALS activation function in the positive and negative input intervals, the nonlinear response of the positive input interval is enhanced while ensuring that the negative input interval is not completely zero, thereby improving the expression ability and performance of the model.

[0042] 2. Introduce the attention mechanism in the ShuffleNet V2 network to enhance its feature representation capability. The channel attention mechanism enhances the ability of feature extraction. By dynamically adjusting the weights of each channel, the model can more accurately capture the characteristics of flames and smoke, improving the accuracy and robustness of detection.

[0043] 3. Due to the vanishing gradient problem in deep neural networks, information may be gradually lost during the propagation process. Residual connections allow the original input or its residual to be directly transmitted, which helps to alleviate the vanishing gradient problem and makes the network easier to train; residual connections introduce direct paths across layers, making the network more capable of learning. By trying to learn the residuals between input and output, the network can more effectively adapt to complex mapping relationships, and through residual connections, the network can approximate the identity mapping by learning the residuals, making the learning task relatively simple, helping the network to be easier to optimize and reducing the number of training parameters. The present invention introduces residual connections, which effectively alleviates the problems of vanishing gradients and gradient explosions in deep network training, improves the stability and convergence speed of training, makes deeper network design possible, and further improves model performance. The optimized YOLOv5 model achieves real-time detection capabilities while maintaining high accuracy, can respond quickly to the appearance of flames and smoke, and is suitable for security monitoring and early warning systems that require rapid response. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 A new activation function diagram introduced for the present invention;

[0045] Figure 2 It is the overall structure flow chart of the present invention;

[0046] Figure 3 This is a flowchart of the overall YOLOv5 model improvement of the present invention;

[0047] Figure 4 This is a comparison chart of the ablation experiment results of the present invention;

[0048] Figure 5 This is the PR curve diagram of the present invention. DETAILED DESCRIPTION

[0049] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.

[0050] In order to solve the problems of high model complexity, large computing resource requirements, insufficient detection accuracy and poor real-time performance in existing flame and smoke detection technologies, the present invention discloses a flame and smoke recognition method for chemical plant areas based on ALS-ShuffleNet V2, which greatly reduces model parameters and calculation amount, making the model more lightweight and suitable for deployment on devices with limited computing resources, thereby improving the practical applicability of the model. It includes the following steps:

[0051] Step 1: Obtain the flame and smoke image dataset, preprocess the dataset, and split it into a training set and a test set.

[0052] Step 2: Build the YOLOv5 network model and improve the YOLOv5 network model, including the following aspects:

[0053] S1. Replace its backbone network with the ShuffleNetV2 network, introduce a new activation function, and solve the problem of neuron death.

[0054] In chemical plants, due to the different shapes and sizes of flames and smoke, the target detection model has high complexity, large computing resource requirements, poor detection accuracy and real-time performance, and other problems. Based on the YOLOv5 model, the present invention adopts the ShuffleNet V2 module to reduce the computational complexity and parameter amount of the convolutional layer while maintaining a high feature extraction capability.

[0055] In order to solve the neuron death problem of the activation function used in the ShuffleNet V2 network, a new activation function is introduced. This activation function can avoid the neuron death problem while maintaining nonlinearity. This activation function combines the advantages of Swish and Leaky ReLU, and adjusts the shape of the activation function in an adaptive way. Its calculation formula (1) is:

[0056]

[0057] Among them, ALS(x) represents the new activation function, α is a trainable parameter used to control the negative slope of the Leaky ReLU part, and β is a trainable parameter used to control the shape of the Swish part. By introducing trainable parameters α and β, the ALS activation function can adaptively adjust its shape to meet the needs of different layers and different inputs. Its image is as follows Figure 1 shown.

[0058] The Swish part provides stronger nonlinearity and improves the complexity and expressiveness of the model; the Leaky ReLU part ensures that the gradient of the negative part is not zero, thus avoiding the problem of neuron death; the trainable parameters α and β enable the activation function to be dynamically adjusted to adapt to the needs of different layers, thereby improving the expressiveness of the model. The ALS activation function combines the characteristics of Swish and Leaky ReLU to provide a smooth and nonlinear activation method, allowing the network to better capture complex features and patterns. This smooth nonlinearity helps to provide more stable gradients across the entire input range, thereby preventing the problem of neuron death, ensuring that the gradients in the negative input area are still valid, and promoting a more stable and efficient training process. The adaptive parameters α and β of the ALS activation function enable it to dynamically adjust its shape to adapt to the needs of different layers and different inputs, thereby improving the flexibility and generalization ability of the model and helping the network to more accurately extract useful features when facing diverse and complex data. Due to the different processing methods of the ALS activation function in the positive and negative input intervals, the nonlinear response of the positive input interval is enhanced when the negative input interval is not completely zero, thereby improving the expressiveness and performance of the model.

[0059] S2. Introduce channel attention mechanism to enhance feature representation capabilities.

[0060] The channel attention mechanism is mainly used to improve the performance of convolutional neural networks. By assigning different importance weights to different channels, the network can more effectively focus on important features and suppress unimportant features. The attention mechanism is introduced in the ShuffleNet V2 network to enhance its feature representation capabilities.

[0061] The input feature map X∈R B×C×H×W Through adaptive average pooling, it becomes U∈R B×C×1×1 , and its calculation formula (2) is:

[0062] U = AvgPool(X) (2)

[0063] Where B is the batch size, C is the number of channels, H and W are the height and width of the feature map respectively. The channel attention mechanism performs adaptive average pooling on each channel of the input feature map, compressing each channel into a 1×1 feature map, and obtaining U∈R B×C×1×1 , which can capture the global information of each channel.

[0064] Flatten the pooled feature map U to V∈R B×C , and its calculation formula (3) is:

[0065] V=U.view(B,C) (3)

[0066] The attention weight of each channel is calculated through two fully connected layers and a ReLU activation function. The weight of the first fully connected layer is After the ReLU activation function, the calculation formula (4) is:

[0067] Z=ReLU(V·W1+b1) (4)

[0068] In the formula, is the bias term, and r is the channel reduction ratio. The number of channels is reduced to Then after the ReLU activation function, we get

[0069] The weight of the second fully connected layer is After the Sigmoid activation function, the calculation formula (5) is:

[0070] S=σ(Z·W2+b2) (5)

[0071] Where b2∈R C is the bias term, and σ is the Sigmoid activation function. The number of channels is restored to C through the second fully connected layer, and then the output is compressed to between 0 and 1 through the Sigmoid activation function. The final output attention weight is S∈R B ×C .

[0072] Reshape the attention weights and resize the attention weights to the same dimension as the input feature map so that they can be multiplied channel by channel with the input feature map. The calculation formula (6) is:

[0073] S'=S.view(B,C,1,1) (6)

[0074] Multiply the input feature map and the attention weight channel by channel, and the calculation formula (7) is:

[0075] X'=XeS' (7)

[0076] In the formula, e represents channel-by-channel multiplication. The final weighted feature map is X'∈R B×C×H×W The channel-by-channel multiplication method enables the network to dynamically adjust the feature strength of each channel, thereby enhancing the network's feature representation and discrimination capabilities.

[0077] S3. Introduce residual connection operation to improve the training performance of neural network.

[0078] Due to the vanishing gradient problem in deep neural networks, information may be gradually lost during propagation. Residual connections allow the original input or its residual to be passed directly, which helps alleviate the vanishing gradient problem and makes the network easier to train; residual connections introduce direct paths across layers, making the network more learning-capable. By trying to learn the residuals between input and output, the network can more effectively adapt to complex mapping relationships, and through residual connections, the network can approximate the identity mapping by learning the residuals, making the learning task relatively simple, helping the network to be easier to optimize and reducing the number of training parameters.

[0079] Residual connection is a technique introduced in deep residual network (ResNet) to alleviate the gradient vanishing and gradient exploding problems and facilitate the training of deeper neural networks. Given an input feature map X and a target output in Represents a combination of several convolutional layers, activation functions and batch normalization, which is the nonlinear transformation part in the residual block. The residual connection is defined by adding the input directly to the output. Its calculation formula (8) is:

[0080]

[0081] The specific implementation in the residual block can be any combination of convolutional layers, activation functions, etc. Assume that F(X,{W i}) contains two convolutional layers and an activation function, and its calculation formula (9) is:

[0082]

[0083] Among them, σ represents the activation function, W1 and W2 are the convolution kernel parameters. The output formula (10) of the final residual block is:

[0084] y=σ(W2·σ(W1·X))+X (10)

[0085] If the number of channels of the input and output are different, a 1×1 convolution is needed to match them. The calculation formula (11) is:

[0086] y=σ(W2·σ(W1·X))+W s ·X (11)

[0087] Where W s is the 1×1 convolution kernel parameter used to adjust the number of input channels.

[0088] In the residual connection, the input is directly added to the output, ensuring that the gradient can flow through the network more stably, alleviating the gradient vanishing and gradient exploding problems. 1×1 convolution is used to adjust the dimension when the number of input and output channels is different, so that the input can be correctly added to the output.

[0089] Step 3: Use the training set and the test set to train and test the model in step 2 to obtain the trained model, and use the trained model to identify and detect the flame smoke image.

[0090] This experimental data set uses D-Fire and DFS data sets. All images are annotated according to the YOLO format, including more than 25,000 images, covering images in different scenes and environments, to ensure that the model of the present invention can stably identify targets in different actual scenes. The experimental environment configuration of the present invention is shown in the table:

[0091]

[0092]

[0093] Depend on Figure 4 It can be seen that the red curve represents the mAP@0.5 growth curve of the YOLOv5 model during the training process. In the first 50 iterations, mAP@0.5 increases rapidly, then gradually stabilizes, and finally stabilizes at around 0.78; the green curve represents the YOLOv5 model after fusing ShuffleNet V2. Compared with YOLOv5, the growth rate is slower in the early stage, but it finally reaches a stable state around 300 iterations, and the final mAP@0.5 is about 0.92; the blue curve represents the improved ShuffleNet V2 and YOLOv5 fusion model of the present invention, which has the fastest growth rate in the early stage and reaches an mAP@0.5 of 0.953.

[0094] Depend on Figure 5 It can be seen that the Precision-Recall curves of different categories in the target detection model of the present invention, as well as the overall mAP@0.5, the light blue curve represents the flame category, the orange curve represents the smoke category, and the blue curve represents the mean of all categories. All three show high precision and high recall rate, and the mAP@0.5 in all categories reaches 0.953, indicating that the model of the present invention has good overall performance and high detection accuracy.

[0095] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent transformation or modification made according to the spirit of the present invention should be included in the protection scope of the present invention.

Claims

1. A flame and smoke recognition method for chemical plant area based on ALS-ShuffleNetV2, characterized in that: The steps include: Step 1: Obtain the flame smoke image dataset, preprocess the dataset, and split it into a training set and a test set; Step 2: Build a YOLOv5 network model, replace its backbone network with the ShuffleNet V2 network, and introduce a new activation function ALS(x) to avoid neuron death while maintaining nonlinearity; Among them, ALS(x) represents the new activation function, x represents the characteristic value of the output of a certain layer of the neural network, α is a trainable parameter used to control the negative slope of the Leaky ReLU part, and β is a trainable parameter used to control the shape of the Swish part. By introducing the trainable parameters α and β, the ALS activation function can adaptively adjust its shape to meet the needs of different layers and different inputs. Step 3: Use the training set and the test set to train and test the model in step 2 to obtain the trained model, and use the trained model to identify and detect the flame smoke image.

2. The method for identifying flame and smoke in a chemical plant area based on ALS-ShuffleNet V2 according to claim 1 is characterized in that: In step 2, the ShuffleNet V2 network is further improved by introducing an attention mechanism into the ShuffleNet V2 network to enhance its feature representation capability.

3. The method for identifying flame and smoke in a chemical plant area based on ALS-ShuffleNet V2 according to claim 2 is characterized in that: The attention mechanism is introduced into the ShuffleNet V2 network, and the adaptive average pooling method is used to optimize channel attention; the details are as follows: The input feature map X∈R B×C×H×W Through adaptive average pooling, it becomes U∈R B×C×1×1 , and its calculation formula (2) is: U = AvgPool(X) (2) Among them, B is the batch size, C is the number of channels, H and W are the height and width of the feature map respectively, and the channel attention mechanism performs adaptive average pooling on each channel of the input feature map, compressing each channel into a 1×1 feature map, and obtaining U∈R B ×C×1×1 , which can capture the global information of each channel.

4. The method for identifying flame and smoke in a chemical plant area based on ALS-ShuffleNet V2 according to claim 3 is characterized in that: After optimizing the channel attention using the adaptive average pooling method, two fully connected layers are used in combination with the activation function to reshape the attention weights as follows: Flatten the pooled feature map U to V∈R B×C , and its calculation formula (3) is: V=U.view(B,C) (3) The attention weight of each channel is calculated through two fully connected layers and a ReLU activation function. The weight of the first fully connected layer is After the ReLU activation function, the calculation formula (4) is: Z=ReLU(V·W1+b1) (4) In the formula, is the bias term, r is the channel reduction ratio, and the number of channels is reduced to Then after the ReLU activation function, we get The weight of the second fully connected layer is After the Sigmoid activation function, the calculation formula (5) is: S=σ(Z·W2+b2) (5) Where b2∈R C is the bias term, σ is the Sigmoid activation function; The number of channels is restored to C through the second fully connected layer, and then the output is compressed to between 0 and 1 through the Sigmoid activation function. The final output attention weight is S∈R B×C ; Reshape the attention weights and resize them to the same dimension as the input feature map so that they can be multiplied channel by channel with the input feature map. The calculation formula (6) is: S'=S.view(B,C,1,1) (6) Multiply the input feature map and the attention weight channel by channel, and the calculation formula (7) is: X'=XeS' (7) In the formula, e represents channel-by-channel multiplication; the final weighted feature map is X'∈R B×C×H×W The channel-by-channel multiplication method enables the network to dynamically adjust the feature strength of each channel, thereby enhancing the network's feature representation and discrimination capabilities.

5. The method for identifying flame and smoke in a chemical plant area based on ALS-ShuffleNetV2 according to any one of claims 2 to 4, characterized in that: After introducing the attention mechanism, the residual connection operation is also introduced, as follows: Given an input feature map X and a target output in Represents a combination of several convolutional layers, activation functions and batch normalization, which is the nonlinear transformation part in the residual block. The residual connection is defined by adding the input directly to the output. Its calculation formula (8) is: The specific implementation in the residual block can be any combination of convolutional layers, activation functions, etc. Assume that F(X,{W i }) contains two convolutional layers and an activation function, and its calculation formula (9) is: Among them, σ represents the activation function, W1 and W2 are the convolution kernel parameters; the output formula (10) of the final residual block is: y=σ(W2·σ(W1·X))+X (10) If the number of channels of the input and output are different, a 1×1 convolution is needed to match them. The calculation formula (11) is: y=σ(W2·σ(W1·X))+W s ·X (11) Where W s is the 1×1 convolution kernel parameter used to adjust the number of input channels.