# Disaster Recognition and Classification Based on Improved ResNet-50 Neural Network
## 2 Materials and Methods
### Model Architecture Design
#### 2.2.2 Residual Module Design  
In the improved ResNet-50 network model, each residual block consists of three convolutional layers and one skip connection. The three convolutional layers are responsible for reducing computational complexity, extracting spatial features, and restoring the number of channels, while the skip connection primarily addresses the gradient vanishing problem, enhancing the stability and learning capability of deep network training. The following section introduces the computational process of the residual block.  
The three convolutional layers consist of two \(1\times 1\) convolutions (dimension reduction and expansion) and one \(3\times 3\) spatial convolution. After computing the input tensor using Equation (1), the disaster image is first processed by the \(1\times 1\) dimension reduction convolution, performing the operations in Equation (7), yielding the output: \(X_{1}\in\mathbb{R}^{N\times C_{\text{grid}}\times H\times W}\). Next, the feature map undergoes a \(3\times 3\) spatial convolution, as computed in Equation (8), producing the output: \(X_{2}\in\mathbb{R}^{N\times C_{\text{grid}}\times H^{\prime}\times W^{\prime}}\). Finally, the resulting feature map is passed through a \(1\times 1\) expansion convolution as described in Equation (9), where a scaling factor of 4 is applied to restore the number of channels, resulting in the final output: \(X_{3}\in\mathbb{R}^{N\times 4C_{\text{grid}}\times H^{\prime}\times W^{\prime}}\).  
\[C_{mid}=\left\lfloor C_{out}\times\frac{width}{64}\right\rfloor \tag{7}\]  
\[X_{2}=W_{2}*X_{1}+b_{2} \tag{8}\]  
In this experiment, a stride of \(s=2\) is used, and the calculated results are as follows: \(H^{\prime}=\frac{H}{2}\), \(W^{\prime}=\frac{W}{2}\).  
\[X_{3}=W_{3}*X_{2}+b_{3} \tag{9}\]  
The residual connection is the core structure of the ResNet network model. By utilizing cross-layer skip connections, it addresses the training challenges of deep networks. Its primary functions include preventing gradient vanishing, enhancing information flow, and improving optimization performance. The basic formulation is given in Equation (10):  
\[Y=\mathcal{F}(X,\{W_{i}\})+X \tag{10}\]  
where \(X\) represents the input disaster image feature map, which is directly skipped to the final output; \(\mathcal{F}(X,\{W_{i}\})\) denotes the disaster image feature map extracted by the first three convolutional layers; \(Y\) represents the final output disaster image feature map.  
However, when the stride is 2, the feature map size is reduced by half, changing from an input size of \(H\times W\) to an output size of \(\frac{H}{2}+\frac{W}{2}\). In this case, the input \(X\) cannot be directly added to \(\mathcal{F}(X)\) due to their mismatched spatial dimensions. To address this, downsampled residual connections are employed, following these steps. First, a \(1\times 1\) convolution is applied to adjust the input \(X\) so that its shape matches \(\mathcal{F}(X)\), enablingelement-wise addition. Additionally, downsampling between stages helps reduce computational complexity while expanding the receptive field. During each stage transition, the spatial dimensions of the feature map decrease while the number of channels increases, allowing deeper network layers to process more abstract and high-level features without significantly increasing computational cost. Moreover, a larger receptive field helps capture broader contextual information, enhancing the model's global perception capabilities.