# Focus on Disaster Risk Reduction by ResNet-CDMV Model After Natural Disasters
## 3 Materials and Methods
### Image Classification Using CDMV Method Based on CNN  
The CNN model learns the features of the secondary disaster factors using the training set. The traditional strategy is to divide the proportion of each class in the training set so that the different classes will have equal learning opportunities and the CNN model will obtain a high mAP in the test set. If a certain class's proportion in the training set is increased, the CNN will have more opportunities to learn the characteristics of this class. To improve the learning opportunity of a single class of the CNN model so that it can improve this class's AP, this study proposes a 'Class Decision making by Models Vote (CDMV)' calculation method. The implementation process is as follows:  
Step 1: A CNN model has the highest AP value for one class; it is obtained by increasing the feature learning opportunity in the training set, and each class trains a similar CNN model. Step 2: Multiple CNN single-class recognition advantage models obtained in step 1 are combined. A CNN model only outputs'softmax' results of one class with recognition advantage and obtains multiple probability reference values. Step 3: Multiple probability reference values are compared, and the maximum value is taken as the final CDMV decision result. The advantage of the CNN-CDMV algorithm is that under the same CNN algorithm (AlexNet, GoogleNet, ResNet-50, VGG, EfficientNet, MobileNet, ShuffleNet, etc. ), the mAPobtained with CNN-CDMV is higher than that obtained using a single CNN model, and its mathematical principle can be expressed as follows:  
\[\left\{ \begin{array}{l}\frac{{{P_{1}}^{1}+{P_{2}}^{1}+\cdots+{P_{1}}^{1}+\cdots+{ P_{n}}^{1}}}{{{P_{1}}^{2}+{P_{2}}^{2}+\cdots+{P_{n}}^{2}+\cdots+{P_{n}}^{2}}}=P_{2} \\ \frac{{{P_{3}}^{1}+{P_{3}}^{2}+\cdots+{P_{3}}^{3}+\cdots+{P_{n}}^{3}}}{n}=P_{3} \\ \vdots\\ \frac{{{P_{i}}^{1}+{P_{k}}^{1}+\cdots+{P_{k}}^{1}+\cdots+{P_{k}}^{1}}}{n}=P_{i }\\ \frac{{{P_{N}}^{1}+{P_{N}}^{2}+\cdots+{P_{N}}^{1}+\cdots+{P_{N}}^{1}}}{n}=P_{N} \end{array} \right. \tag{7}\]  
\[\left\{ \begin{array}{l}\max\left({{P_{1}}^{1},{P_{2}}^{1},\cdots,{P_{1}}^{1},\cdots,{P_{1}}^{N}}\right)={P_{1}}^{1}\\ \max\left({{P_{1}}^{2},{P_{2}}^{2},\cdots,{P_{2}}^{1},\cdots,{P_{2}}^{N}} \right)={P_{2}}^{2}\\ \max\left({{P_{3}}^{1},{P_{3}}^{2},\cdots,{P_{3}}^{1},\cdots,{P_{3}}^{1}} \right)={P_{3}}^{3}\\ \vdots\\ \max\left({{P_{k}}^{1},{P_{k}}^{2},\cdots,{P_{k}}^{1},\cdots,{P_{k}}^{N}} \right)={P_{k}}^{i}\\ \max\left({{P_{1}}^{1},{P_{1}}^{2},\cdots,{P_{i}}^{1},\cdots,{P_{1}}^{1}} \right)={P_{n}}^{N}\end{array} \right. \tag{8}\]  
\[P_{b}=\frac{{{P_{1}}^{1}+{P_{2}}^{2}+{P_{3}}^{3}+\cdots+{P_{k}}^{i}+\cdots+{P_ {n}}^{N}}}{n} \tag{9}\]  
\[\left\{ \begin{array}{l}if\left({{P_{1}}^{1}={P_{k}}^{1}\wedge{P_{2}}^{2}={P_ {k}}^{2}\wedge\cdots\wedge{P_{k}}^{i}={P_{k}}^{i}\wedge{P_{n}}^{n}={P_{k}}^{n}} \right)\\ if\left({{P_{1}}^{1}{>{P_{k}}^{1}}\wedge{P_{2}}^{2}{>{P_{k}}^{2}}\wedge\cdots \wedge{P_{k}}^{i}{>{P_{k}}^{i}}\wedge{P_{n}}^{n}{>{P_{k}}^{n}}}\right)\end{array}  \right.\rightarrow\left\{ \begin{array}{l}P_{b}=P_{k}\\ P_{b}>P_{k}\end{array} \right. \tag{10}\]  
where \({P_{k}}^{i}\) is the AP of the \(k\) class of the \(i\) model, \(P_{i}\) is the mAP of the \(i\) model, \(n\) is a model with a total of \(n\) classes and \(N\) models (\(N=n\)), and \(P_{b}\) is the mAP under the CNN-CDMV algorithm. Formula (7) is used to obtain \(n\) models based on \(N\) classes, Formula (8) is used to take the CNN model with the strongest recognition performance of a single class to represent the recognition performance of this class, and Formula (9) is used to obtain the total classification accuracy \(P_{b}\) under CDMV. Because a single CNN model has cognitive bias in recognition performance of different classes, the maximum AP value of \(N\) classes in \(n\) models cannot appear in the same CNN model; therefore, the total classification accuracy of CNN-CDMV is higher than that of any single CNN model (\(P_{b}>P_{k}\)), and its principle is shown in Formula (11).