# Focus on Disaster Risk Reduction by ResNet-CDMV Model After Natural Disasters
## 3 Materials and Methods
### CNN Principles of Mathematics  
As an important method of image feature deep learning [37], a CNN (Convolutional Neural Network) uses convolution kernel and pooling to obtain the object's feature information from the image. In this study, the CNN is used to learn the visual features of secondary disaster factors in various types of images, as shown in Figure 1. Taking fire as an example, the fire identification based on the CNN is shown in Figure 2.  
Figure 1: Secondary disaster factor boundary condition division. The CNN realizes the extraction of associated information between adjacent pixels from the image through a convolution kernel, and its principle can be expressed as follows:  
\[Z_{i,j,k}^{l+1}=\sum_{s,m,n}a_{s,(j-1)d+m,(k-1)d+n}^{l}w_{i,s,m,n}^{l+1}+b_{i}^{l +1} \tag{1}\]  
\[a_{i,j,k}^{l+1}=\text{sigmoid}\left(z_{i,j,k}^{l+1}\right) \tag{2}\]  
In Formulas (1) and (2), \(j\) and \(k\) are the feature vector's \(j\) row and \(k\) column, \(w\) is the weight, \(i\) is the number of feature vectors of neurons in the next layer, \(s\) is the number of feature vectors in the previous layer, \(m\) and \(n\) are the values of the convolution kernel, \(b\) is the bias, \(z\) is the input of neurons in this layer, \(a\) is the output of neurons in this layer, and \(l\) is the layer \(l\). The detailed features obtained after the convolutional calculation contain a large amount of redundant information; therefore, to simplify the calculation, the redundant information is filtered in a pooling kernel to reduce the number of parameters, and the pooling method is used to reduce the parameters by \(n^{2}\) times through the \(n\times n\) pooling kernel. In this study, the average pooling kernel is used to extract the features; its mathematical principles can be expressed as follows:  
\[ap_{i,j,k}^{l}=\text{avg}\Big{\{}a_{i}^{l},(j-1)d+m,(k-1)d+n\Big{\}} \tag{3}\]  
In Formula (3), \(ap\) is the output of the pooling layer, \(a\) is the output of neurons in this layer, \(d\) is the step size of pooling, \(m\) and \(n\) represent the values of the pooled kernel, \(j\) and \(k\) represent the \(j\) row and \(k\) column of its eigenvector, \(m\) and \(n\) represent the convolution kernel, and \(l\) is the layer \(l\). The function of the linear layer is to classify the features extracted from the convolution and pooling process. It is a standard neural network. At the end of the linear layer, the number is designed according to the number of input layer class types. In the training, the weight of the whole network is obtained through multiple iterations using the form of truth tag assistance combined with the gradient descent method. As the weight is obtained based on feature-supervised learning, the model training process is completed. When the input obtains the test dataset's sample, the unknown sample can be judged according to  
Figure 2: Classification process of disaster factors based on CNN algorithm. the value of the output node of the linear layer, and the'softmax' mathematical calculation process can be expressed as  
\[\text{softmax}(z_{i})=\frac{\text{e}^{z_{i}}}{\sum_{1}^{m}\text{e}^{z_{m}}}=p_{i},i\in[1\ m] \tag{4}\]  
where \(z\) is the input prediction array, and \(m\) is the total number of classes. The decision process of softmax function in multi-classification tasks is shown in Formula (5):  
\[h(x_{i};\theta)= \begin{bmatrix}p(y_{i}=1\mid x_{i};\theta)\\ p(y_{i}=2\mid x_{i};\theta)\\ \vdots\\ p(y_{i}=m\mid x_{i};\theta)\end{bmatrix} =\frac{1}{\sum_{j=1}^{m}e^{\theta_{j}^{ T}x_{i}}} \begin{bmatrix}e^{\theta_{1}^{T}x_{i}}\\ e^{\theta_{2}^{T}x_{i}}\\ \vdots\\ e^{\theta_{k}^{T}x_{i}}\end{bmatrix}  \tag{5}\]  
where \(m\) is the total number of classes, \(x_{i}\) is the samples to be identified, \(y_{i}\) is the label corresponding to the samples, and \(\theta^{T}x_{i}\) is the decision boundary condition of the classification. In training the network process, the 'one-hot' label is combined with the gradient descent method to map the class of samples from the input layer.