Building fire image recognition method and system based on improved residual neural network

By improving the residual neural network model, removing the BN layer, adding a spatial attention mechanism and modifying the bottleneck structure, the problems of long fire recognition time and high error rate in the existing technology are solved, and higher recognition accuracy and learning speed are achieved. .

CN118762279APending Publication Date: 2024-10-11SHANDONG JIANYAN TESTING TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410739352.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

Existing building fire image recognition technology has problems such as long recognition time and high error rate, especially when complex backgrounds and flammable objects are concentrated, it is difficult to achieve rapid and accurate detection.

Method used

An improved residual neural network model is adopted to improve the learning ability and recognition accuracy of the network by removing the BN layer, adding the spatial attention mechanism SAB, modifying the bottleneck structure and the number and width of residual blocks, and adding Dropout to the fully connected layer.

Benefits of technology

It improves the accuracy and learning speed of fire detection, reduces the false recognition rate, can accurately identify building fire targets in the shortest time, and reduces the computational complexity and false alarm rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118762279A_ABST
    Figure CN118762279A_ABST
Patent Text Reader

Abstract

The invention provides a building fire image recognition method and system based on an improved residual neural network. The building fire image recognition method comprises the steps that a shot building image is acquired and preprocessed; inputting the preprocessed building image into the trained model based on the improved residual neural network, and outputting whether a fire occurs or not; an improved residual neural network model comprises an input block and first to fourth stage modules connected in sequence, the number of channels is doubled by using a convolutional layer after the fourth stage module, feature dimensionality reduction of flames in a space attention map is realized through a full-connection layer, and fire recognition and classification are completed through a function.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of building fire image recognition, and in particular relates to a building fire image recognition method and system based on an improved residual neural network. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] Building fires pose a serious threat to human life and safety. Due to the practicality of visual sensors, fire detection technology has received widespread attention in the field of computer vision. Previous studies mainly relied on basic color features. With the continuous improvement and development of deep learning, most fire detection technologies now use deep learning models to improve accuracy.

[0004] The existing patent CN117274881A combines consistency regularization and pseudo-labeling to propose a fire prediction model, which has cumbersome steps and may result in a long prediction time; Patent CN117274877A detects fire by collecting multiple feature data such as color, shape and dynamics, and has a high error rate; Patent CN116912757A classifies the image blocks of the camera through a neural network model to determine the flame image blocks and non-flame image blocks, which has a large error and a high false alarm rate.

[0005] In the paper "Flame Detection Method Based on Regional Fully Convolutional Network Combined with Residual Network", the authors applied Residual Network (ResNet) to the field of fire image detection. Through deep learning combined with ResNet methods, the feature extraction network was trained to automatically extract the characteristic spectra of flames in samples, realizing feature extraction and flame target detection and recognition.

[0006] Existing fire detection technology based on image recognition mainly relies on computer vision and image processing technology. By installing a camera to capture the live video stream, the image processing algorithm is used to identify and analyze the target in the video to determine whether there is a fire. Existing fire target detection is usually implemented using deep learning networks such as convolutional neural networks, DesNet networks, and the emerging YOLO algorithm, but these algorithms have complex network structures, long target recognition time, and high error rates. Once misidentified, it will cause a lot of waste of manpower and material resources. In addition, there are many interference detection items such as color and background in building fires, and flammable materials are concentrated. Therefore, building fire target detection requires algorithms to achieve faster target detection and stronger generalization capabilities in order to accurately identify building fire targets and avoid more serious consequences in the shortest time. Summary of the invention

[0007] In order to overcome the above-mentioned deficiencies of the prior art, the present invention provides a building fire image recognition method based on an improved residual neural network, which can improve the network's ability to detect fire.

[0008] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions:

[0009] In a first aspect, a building fire image recognition method based on an improved residual neural network is disclosed, comprising:

[0010] Acquire the captured building images and perform preprocessing;

[0011] The pre-processed building image is input into the trained improved residual neural network model, and the output is whether a fire occurs;

[0012] The improved residual neural network model includes an input block, first to fourth stage modules connected in sequence, a convolution layer is used after the fourth stage module to double the number of channels, and then the feature dimension reduction of the flame in the spatial attention map is achieved through a fully connected layer, and then the fire recognition and classification is completed through a function.

[0013] As a further technical solution, the input block is composed of a convolution layer and a pooling layer; the BN layer is no longer used in the convolution layer, and only the activation function is retained;

[0014] The convolution layer is used to perform the first convolution on the input, and after the first convolution, the input is input to the SAB spatial attention block, and the SAB spatial attention block is used to focus on the spatial location information of the fire area, so as to enhance the spatial invariance of the improved network.

[0015] As a further technical solution, when the SAB spatial attention block obtains the spatial location information of the fire area, it includes:

[0016] The channel information of the feature map is summarized through two average pooling and maximum pooling operations to generate two two-dimensional graphs, which respectively represent the average pooling features and the maximum pooling features of the entire channel;

[0017] Then, the average pooling features and the maximum pooling features are concatenated and convolved through the standard convolutional layer to generate a two-dimensional spatial attention map. The image after the pooling operation is used to highlight the spatial location information of the fire area.

[0018] As a further technical solution, Dropout is added to the fully connected layer, and the input unit is randomly set to 0 at a fixed frequency at each step during training. That is, during forward propagation, the starting values ​​of some hidden neurons are first randomly stopped with a certain probability, and the input and output neurons remain unchanged. Then, the input is forward propagated through the network after the hidden neuron starting value is modified, and the loss result is back-propagated through the modified network. This process is repeated to obtain the model.

[0019] As a further technical solution, the first to fourth stage modules all include residual blocks, and the residual blocks use h i+1 =h i +αf i (h i / β i ) form, where h i represents the input of the i-th residual block, f i represents the function calculated by the i-th residual branch, the scalar α specifies the rate of increase of the startup variance after each residual block, and the scalar β i is determined by predicting the standard deviation of the input of the ith residual block, i.e., β i =Var(h i ), and Var(h i+1 )=Var(h i )+α 2 .

[0020] As a further technical solution, the number of residual blocks in the first to fourth stage modules is different, and the number of residual blocks in each stage module is at least: the number of residual blocks in the third stage module, the number of residual blocks in the fourth stage module, the number of residual blocks in the second stage module, and the number of residual blocks in the first stage module.

[0021] As a further technical solution, the widths of the residual blocks in the first to fourth stage modules are different, and the widths of the residual blocks in each stage module are, from large to small: the width of the residual block in the third stage module, the width of the residual block in the fourth stage module, the width of the residual block in the second stage module, and the width of the residual block in the first stage module.

[0022] As a further technical solution, the residual block in the first to fourth stage modules adds an extra layer after the first convolution, and adds a "squeeze and excitation" layer after the last convolution of the residual block, which performs global average pooling for feature extraction.

[0023] In the second aspect, a building fire image recognition system based on an improved residual neural network is disclosed, comprising:

[0024] The image acquisition module is configured to: acquire the captured building image and perform preprocessing;

[0025] The fire identification module is configured to: input the pre-processed building image into the trained improved residual neural network model, and output whether a fire occurs;

[0026] The improved residual neural network model includes an input block, first to fourth stage modules connected in sequence, a convolution layer is used after the fourth stage module to double the number of channels, and then the feature dimension reduction of the flame in the spatial attention map is achieved through a fully connected layer, and then the fire recognition and classification is completed through a function.

[0027] One or more of the above technical solutions have the following beneficial effects:

[0028] The technical solution of the present invention modifies the classic residual neural network and builds a fire detection model based on the improved ResNet network. The model modifies the traditional ResNet network architecture to improve the accuracy of fire recognition and introduces spatial attention into the neural network to improve the learning ability of the network, thereby improving the recognition accuracy and learning speed.

[0029] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0031] Figure 1 The ResNet model of the embodiment of the present invention;

[0032] Figure 2 Improve the bottleneck structure design of the network for the embodiment of the present invention, with variance reduction without normalized residual block;

[0033] Figure 3 This is the improved ResNet model of the embodiment of the present invention. DETAILED DESCRIPTION

[0034] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0035] It should be noted that the terms used herein are for describing specific embodiments only and are not intended to be limiting of exemplary embodiments according to the present invention.

[0036] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0037] Embodiment 1

[0038] This embodiment discloses a building fire image recognition method based on an improved residual neural network. On the basis of the residual neural network, by removing the normalization layer in ResNet, a network with more layers, that is, a deeper network, is obtained to improve the feature extraction accuracy; and a spatial attention mechanism SAB (Spatial Attention Block) is introduced to improve the network's ability to detect fire.

[0039] About the existing residual neural network (ResNet):

[0040] Traditional neural networks are composed of convolutional layers and pooling layers. Generally speaking, the more convolutional layers and pooling layers there are, the more complete the image feature information obtained, and the better the learning effect, but it also brings problems such as gradient vanishing and gradient explosion. Residual neural networks usually use batch normalization (BN) layers in data preprocessing and in the network to solve the above problems. The main structure of ResNet is as follows: Figure 1 shown.

[0041] Depend on Figure 1It can be seen that the ResNet network is mainly composed of three parts: input block, stage 1 to 4, and output block. The input block consists of convolutional layers and pooling layers, where the convolution kernel size of the convolution layer is 7×7 and the step size is 2, followed by a pooling layer with a convolution kernel of 3×3 and a step size of 2. Function of the convolutional layer: When the input data is an image, the convolutional layer receives the input data in the form of 3D data and outputs it to the next layer in the form of 3D data. The pooling layer is mainly used for feature dimensionality reduction, compressing the number of data and parameters, reducing overfitting, and improving the fault tolerance of the model. Next are four stages. Stage 1 consists of residual blocks. Starting from stage 2, each stage starts with a downsampling block (for feature dimensionality reduction), followed by several residual blocks. The number of residual blocks in each stage is different. In the ResNet 34 (the number represents the number of convolutional layers in the network, and different ResNet models are named with different numbers) model, the number of residual blocks in the four stages is 3, 3, 5, and 2 respectively. In the downsampling block, there are path A and path B. Path A has three convolutions with kernel sizes of 1×1, 3×3, and 1×1, respectively. The stride of the first convolution is 2, which can halve the input width and height, and the convolution kernel is 1×1, which can double the output channels. Therefore, the output channel of the last convolution implemented by two 1×1 kernels is 4 times that of the first convolution. This structure with small ends and large middle (convolution kernels are 1×1, 3×3, and 1×1, respectively) is a bottleneck structure. Path B includes a pooling layer and a 1×1 convolution layer with a stride of 2. The outputs of the two paths are summed to obtain the output of the downsampling block. Each convolution layer in the network is followed by a batch normalization layer (BN layer) and a GeLu startup function. The residual block structure is as follows Figure 2 as shown in .

[0042] In the ResNet model, the network depth represents the learning ability, while the width (i.e. the number of channels) represents the network's ability to learn features. For example, texture features of different directions and frequencies can be improved by improving the network width to obtain richer feature learning capabilities. For example, in the ResNet34 network, the number of residual blocks at each stage is 3, 3, 5, and 2, and the width of each stage is 256, 512, 1024, and 2048.

[0043] Previous studies on the depth expansion of ResNet (from ResnNet 50 to ResNet 200) mainly focused on stage 2 and stage 3, while stage 1 and stage 4 still maintained the form of 3 blocks and 2 blocks; the width was expanded in multiples of 256, 512, 1024, and 2048. This approach has limitations because both low-level features and high-level features require sufficient space to learn. The following scheme obtains the target network by improving the depth and width as well as enhancing regularization.

[0044] The example technical solution of this embodiment improves the traditional ResNet model in the following four aspects:

[0045] The bottleneck structure is modified by adding an additional 3×3 convolution after the first 3×3 convolution. This convolution processes the feature map after the first 3×3 grouped convolution and the subsequent activation function. The first 3×3 convolution will change the size of the feature map, while the second 3×3 convolution further refines and extracts the fire features while keeping the spatial dimension unchanged and outputs a new feature map. Figure 2 As shown, this can achieve a wider range of fire feature capture by the model and improve the model's fire detection capability; and the added convolution has almost no effect on the model's training time, and only a small increase in the amount of calculation. In addition, this embodiment adds a "Squeeze (S) and Excitation (E)" layer after the last 1×1 convolution of the residual block. This layer performs global average pooling, extracts features, enhances important features and suppresses unimportant features. For example, in building fire recognition, the color of the flame is usually significantly different from the color of the background objects in the building. Enhancing the flame color in the network and suppressing the complex background color can speed up the detection speed of the model network. In addition, there will be a certain amount of smoke during the burning process, which is different from other bright red colors in the building, and can achieve more accurate fire detection. Therefore, the S+E layer in the network enhances the fire features with color as an important feature and suppresses the complex background features around the fire. Through this mechanism, the network can dynamically emphasize the feature channels that are more useful for the target task and suppress unimportant channels, thereby improving the performance and efficiency of the model and effectively managing the computational complexity. The S+E layer is proposed mainly considering the interdependence between model channels. The advantages of doing so are: 1) it has more nonlinearities and can better fit the complex correlations between channels; 2) it greatly reduces the number of parameters and the amount of calculation.

[0046] Modification of the number of residual blocks in each stage: In the application scenario of fire detection, the sub-technical solution of this embodiment determines the number of blocks in the four stages to be 1, 2, 6, and 3 respectively, which can not only achieve the expansion of the network in depth, but also ensure that the model can extract fire features in a larger range of images and improve the network's ability to identify fires; the width of each stage is changed to 256, 512, 1536, and 1536. Stage 3 uses a larger width because it is deep enough and requires a larger dimension to collect features, while stage 4 does not increase the width mainly to maintain training speed.

[0047] The sub-technical solution of this embodiment removes the BN layer, adopts a variance reduction strategy without normalization, and uses Dropout in the fully connected layer to enhance regularization.

[0048] The traditional ResNet model uses a BN layer to smooth the loss function, which allows the model to be trained stably at a higher learning rate and also plays a role in regularization. However, it also has many disadvantages: it takes up extra memory, affects the gradient calculation time of some networks, introduces bias in training, and breaks the independence between training samples.

[0049] The technical solution of this embodiment does not use normalization layers anywhere in the residual block, but adopts a non-normalization variance reduction strategy. i+1 =h i +αf i (h i / β i ) form of residual block, such as Figure 2 As shown, where h i represents the input of the i-th residual block, f i Represents the function calculated by the i-th residual branch. The scalar α specifies the rate of increase of the startup variance after each residual block and is usually set to a small value such as 0.2. The scalar β i is determined by predicting the standard deviation of the input of the ith residual block, i.e., β i =Var(h i ), and Var(h i+1 )=Var(h i )+α 2 This not only shortens the gradient calculation time, but also ensures that the deviation value during training is smaller to a greater extent.

[0050] The sub-technical solution of this embodiment adds Dropout to the fully connected layer of the model to prevent overfitting. Dropout is a processing measure that randomly sets the input unit to 0 at a fixed frequency at each step during training. That is, during forward propagation, the starting values ​​of some hidden neurons are first randomly stopped with a certain probability, and the input and output neurons remain unchanged. Then, the input X is forward propagated through the network with the modified hidden neuron starting values, and the loss result is back-propagated through the modified network, and the process is repeated. This can make the model more generalizable, prevent overfitting, and also strengthen regularization.

[0051] In one or more implementation examples, a spatial attention block (SAB) is introduced to enhance the ability of the improved network to identify fires.

[0052] Flames change dynamically, so the spatial invariance of the model needs to be enhanced, that is, no matter how the target appearance changes, it can still be recognized. To solve the above problem, a spatial attention block SAB (Spatial Attention Block) is added after the first convolutional layer of the input block. The main function of SAB is to focus on the spatial location information of the fire area, filter out a small amount of important information from a large amount of information, ignore most of the unimportant information, and focus on these important information.

[0053] In one or more implementation examples, the specific operation of SAB is as follows: first, the channel information of the feature map is aggregated through two average pooling and maximum pooling operations to generate two two-dimensional maps F a s vg and F m s ax They represent the average pooling feature and the maximum pooling feature of the entire channel respectively. Then, these features are concatenated and convolved through the standard convolution layer to generate a two-dimensional spatial attention map. The two-dimensional spatial attention map can clearly indicate which parts of the image are most critical to the current task, focusing on the location of the building fire, so that the model can concentrate resources and computing power to process the building fire area and ignore irrelevant background or noise. The image after the pooling operation can effectively highlight the information area.

[0054] In one or more implementation examples, a building fire recognition model based on an improved residual neural network is:

[0055] Improve the residual neural network ResNet model such as Figure 3 shown.

[0056] The input of the model is an H×W RGB image. The input block is changed to consist of a convolution layer with a stride of 2 and a kernel of 3×3, and a pooling layer with a stride of 2 and a kernel of 3×3. The reduction of the kernel size in the convolution layer is conducive to the increase of the model depth. The SAB spatial attention block is applied after the first convolution to enhance the spatial invariance of the improved network and improve the detection quality of fire analysis. The Gelu nonlinear activation function is used after each convolution operation except the final operation.

[0057] All residual blocks in stages 1 to 4 use the improved bottleneck structure, and the number of residual blocks in each stage is 1, 2, 6, and 3 respectively. Starting from stage 2, the downsampling block in the original model is no longer used, but an improved residual block structure with a 3×3 convolution layer added to the original bottleneck structure is used. After all residual stages, we use a convolution layer with a convolution kernel of 1×1 to double the number of channels. Then, the feature dimensionality reduction of the flame in the spatial attention map is achieved through the fully connected layer, and then the fire recognition and classification is completed through the sigmoid function.

[0058] Since the implementation example is pre-trained on ImageNet (image classification database), 1000 class vectors are output after pre-training, which can realize 1000 classifications of images.

[0059] Model training:

[0060] Trained on a modified residual neural network model for building fire image recognition.

[0061] (1) Data preparation

[0062] The sub-technical scheme of this embodiment uses the dataset ImageNet for pre-training and the dataset YR to evaluate the performance of the fire recognition model. The dataset ImageNet is currently the largest image recognition database in the world, capable of identifying objects from pictures. More than 14 million images are manually annotated by ImageNet to indicate the objects in the pictures. The dataset YR is a small-scale dataset consisting of 2,000 normal scene images and building fire images. The images are normal without fire and the images with flames, i.e., buildings on fire, each account for half.

[0063] (2) Training process

[0064] Since the number of YR data sets is small, we first pre-train on the open ImageNet data set, and then transfer the optimal configuration obtained by pre-training to the training process of the improved residual neural network ResNet model. Since ImageNet is pre-trained on 1000 synthetic images of each class, the output layer is 1000, and the output layer of the fire recognition model in this embodiment is 2, this embodiment fine-tunes the fully connected layer to achieve two types of output. A trained building fire image recognition model is obtained.

[0065] The images captured by the video camera of the building security monitoring system are sent to the above model. After the network adjusted by the residual block in the model, especially after the optimized bottleneck structure and the processing of the spatial attention block, the network structure without the BN layer is realized, which can more accurately extract the fire features and classify the incoming images, and obtain two results: fire and non-fire, thereby realizing fire target detection.

[0066] This example realizes rapid recognition of flame targets by optimizing the traditional network structure, and applies the SAB spatial attention block in the network to eliminate the interference of complex background caused by the internal structure of the building on fire recognition, thereby realizing accurate recognition of fire targets inside the building.

[0067] Embodiment 2

[0068] The purpose of this embodiment is to provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the program.

[0069] Embodiment 3

[0070] The purpose of this embodiment is to provide a computer-readable storage medium.

[0071] A computer-readable storage medium stores a computer program, which executes the steps of the above method when executed by a processor.

[0072] Embodiment 4

[0073] The purpose of this embodiment is to provide a building fire image recognition system based on an improved residual neural network, comprising:

[0074] The image acquisition module is configured to: acquire the captured building image and perform preprocessing;

[0075] The fire identification module is configured to: input the pre-processed building image into the trained improved residual neural network model, and output whether a fire occurs;

[0076] The improved residual neural network model includes an input block, first to fourth stage modules connected in sequence, a convolution layer is used after the fourth stage module to double the number of channels, and then the feature dimension reduction of the flame in the spatial attention map is achieved through a fully connected layer, and then the fire recognition and classification is completed through a function.

[0077] The steps involved in the apparatuses of the above embodiments 2, 3 and 4 correspond to the method embodiment 1, and the specific implementation methods can refer to the relevant description part of embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.

[0078] Those skilled in the art should understand that the modules or steps of the present invention described above can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.

[0079] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.

Claims

1. A building fire image recognition method based on an improved residual neural network is characterized by: include: Acquire the captured building images and perform preprocessing; The pre-processed building image is input into the trained improved residual neural network model, and the output is whether a fire occurs; The improved residual neural network model includes an input block, first to fourth stage modules connected in sequence, a convolution layer is used after the fourth stage module to double the number of channels, and then the feature dimension reduction of the flame in the spatial attention map is achieved through a fully connected layer, and then the fire recognition and classification is completed through a function.

2. The building fire image recognition method based on improved residual neural network as claimed in claim 1 is characterized in that: The input block consists of a convolution layer and a pooling layer; the BN layer is no longer used in the convolution layer, and only the activation function is retained; The convolution layer is used to perform the first convolution on the input, and after the first convolution, the input is input to the SAB spatial attention block, and the SAB spatial attention block is used to focus on the spatial location information of the fire area, so as to enhance the spatial invariance of the improved network.

3. The building fire image recognition method based on improved residual neural network as claimed in claim 1 is characterized in that: When the SAB spatial attention block obtains the spatial location information of the fire area, it includes: The channel information of the feature map is summarized through two average pooling and maximum pooling operations to generate two two-dimensional graphs, which respectively represent the average pooling features and the maximum pooling features of the entire channel; Then, the average pooling features and the maximum pooling features are concatenated and convolved through the standard convolutional layer to generate a two-dimensional spatial attention map. The image after the pooling operation is used to highlight the spatial location information of the fire area.

4. The building fire image recognition method based on improved residual neural network as claimed in claim 1 is characterized in that: The fully connected layer adds Dropout, and the input unit is randomly set to 0 at a fixed frequency at each step during training. That is, during forward propagation, the starting values ​​of some hidden neurons are first randomly stopped with a certain probability, and the input and output neurons remain unchanged. Then, the input is forward propagated through the network with the modified starting values ​​of the hidden neurons, and the loss result is back-propagated through the modified network. This process is repeated to obtain the model.

5. The building fire image recognition method based on improved residual neural network as claimed in claim 1 is characterized in that: The first to fourth stage modules all include residual blocks, which use h i+1 =h i +αf i (h i / β i ) form, where h i represents the input of the i-th residual block, f i represents the function calculated by the i-th residual branch, the scalar α specifies the rate of increase of the startup variance after each residual block, and the scalar β i is determined by predicting the standard deviation of the input of the ith residual block, i.e., β i =Var(h i ), and Var(h i+1 )=Var(h i )+α 2 .

6. The building fire image recognition method based on improved residual neural network as claimed in claim 1 is characterized in that: The number of residual blocks in the first to fourth stage modules is different, and the number of residual blocks in each stage module is at least the number of residual blocks in the third stage module, the number of residual blocks in the fourth stage module, the number of residual blocks in the second stage module, and the number of residual blocks in the first stage module; As a further technical solution, the widths of the residual blocks in the first to fourth stage modules are different, and the widths of the residual blocks in each stage module are, from large to small: the width of the residual block in the third stage module, the width of the residual block in the fourth stage module, the width of the residual block in the second stage module, and the width of the residual block in the first stage module.

7. The building fire image recognition method based on improved residual neural network as claimed in claim 1 is characterized in that: In the first to fourth stage modules, the residual block adds an extra layer after the first convolution, and a "squeeze and excite" layer is added after the last convolution of the residual block, which performs global average pooling for feature extraction.

8. Building fire image recognition system based on improved residual neural network, characterized by include: The image acquisition module is configured to: acquire the captured building image and perform preprocessing; The fire identification module is configured to: input the pre-processed building image into the trained improved residual neural network model, and output whether a fire occurs; The improved residual neural network model includes an input block, first to fourth stage modules connected in sequence, a convolution layer is used after the fourth stage module to double the number of channels, and then the feature dimension reduction of the flame in the spatial attention map is achieved through a fully connected layer, and then the fire recognition and classification is completed through a function.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 7 are performed.