# Focus on Disaster Risk Reduction by ResNet-CDMV Model After Natural Disasters
## 3 Materials and Methods
### Image Classification Using CDMV Method Based on CNN
Generalized to any number of classes, with the increase in classes in the CNN model recognition task, the mAP obtained based on the CNN-CDMV algorithm is still higher than that of a single CNN model. This process can be described as follows:  
\[\left\{ \begin{array}{l}P_{n+1}^{m+1}\geq P_{k}^{n+1}\\ P_{b}=\sum\limits_{i=1}^{n}P_{i}^{i}\geq P_{k}=\sum\limits_{i=1}^{n}P_{k}^{i} \\ P_{b+1}=\sum\limits_{i=1}^{n}P_{i}^{i}+P_{n+1}^{n+1},P_{k+1}=\sum\limits_{i=1}^{n }P_{k}^{i}+P_{k}^{n+1}\\ \Delta p=\frac{{P_{b+1}}}{{n+1}}-\frac{{P_{k+1}}}{{n+1}}\end{array} \right.\ \rightarrow\ \Delta p\geq 0 \tag{11}\]  
In Formula (11), \(n\) is the number of CNN models (there are \(n\) models when there are \(n\) classes), \(P_{n}\) is the mAP of the \(n\) models, the classification accuracy of each corresponding subtype is [\({P_{1}}^{i}\), \({P_{2}}^{i}\),\(\cdots\), \({P_{k}}^{i}\), \(\cdots\), \({P_{n}}^{n}\)], \(P_{b}\) is the mAP obtained with the CNN-CDMV algorithm, and \(P_{k}\) is the mAP obtained for any one of the CNN models. Assuming that among \(n\) CNN models the optimal classification of type \(i\) comes from model \(i\) (\(P_{i}^{i}\)), the mAP obtained with the CNN-CDMV algorithm is higher than that obtained by a single CNN model (\(\Delta p\geq 0\)) when there are many arbitrarily classified objects. The model acquisition process of the CNN-CDMV algorithm in Algorithm 1 (based on ResNet-50 [12] training) for fire identification is as follows:  
```
Model-\(i\) Input: Dataset \(D\), split Initialization: \(\mathbf{\ell}\) = load CNN pretrained model, Step 1. Split:[train validation test] = [unbalanced divided, 100 pictures, 100 pictures], training_parameters = [epoch = 30, learning rate = 0.001, batch size = 32, validation interval (in epochs) = 1, solver type = [PERSON]] Step 2. [\(\mathbf{\kappa}\), \(\mathbf{\beta}\), \(\gamma\)] = prepare_data (\(\mathbf{D}\), split) \(\mathbf{\alpha}\) = random (\(\mathbf{D}\), Dattrain) \(\mathbf{\beta}\) = random (\(\mathbf{D}\), Dattaval) \(\gamma\) = random (\(\mathbf{D}\), Dattest) return [\(\mathbf{\alpha}\), \(\mathbf{\beta}\), \(\gamma\)] Step 3. \(\mathbf{\Omega}\) = \(\mathbf{\ell}\)(\(\mathbf{\alpha}\), \(\mathbf{\beta}\), training_parameters) Step 4. [\(\mathbf{TP}\), \(\mathbf{FP}\), \(\mathbf{FN}\), \(\mathbf{TN}\)] = \(\mathbf{\Omega}\)(\(\gamma\)) Step 5. [\(\mathbf{TP}\), \(\mathbf{FP}\), \(\mathbf{FN}\), \(\mathbf{TN}\)] \(\rightarrow\) [class1: \(\mathbf{P_{re}}=P_{1}\), class2: \(\mathbf{P_{re}}=P_{2}\), class3: \(\mathbf{P_{re}}=P_{3}\), class4: \(\mathbf{P_{re}}=P_{4}\), class5: \(\mathbf{P_{re}}=P_{5}\)] Step 6. \(P_{i}\) = max[\(P_{1}\), \(P_{2}\), \(P_{3}\), \(P_{4}\), \(P_{5}\)], \(i\)[1, 2, 3, 4, 5], Step 7. \(P_{i}\)\(\rightarrow\) Model-\(i\) prepared Step 8. Repeat step1-step8 \(\rightarrow\) [Model-1, Model-2, Model-3, Model-4, Model-5] \(\rightarrow\) Parallel structure model Step 9. \(\mathbf{\Omega}\) = \(\mathbf{\ell}\) (Parallel structure model: \(\gamma_{p}\)) Step 10. Output: \(\mathbf{A_{p}}\) = \(\mathbf{\Omega}\) (\(\gamma_{p}\)) \(\mathbf{\alpha}\) is training data, \(\mathbf{\beta}\) is testing data, \(\mathbf{\gamma}\) is validation data, \(\mathbf{\Omega}\) is trained model, \(\mathbf{D}\) is dataset, \(\mathbf{A}\) is accuracy, \(\mathbf{TP}\) is true positive, \(\mathbf{FP}\) is false positive, \(\mathbf{FN}\) is false negative, \(\mathbf{TN}\) is true negative, \(\mathbf{P_{re}}\) is precision, \(\mathbf{P_{j}}\) is probability, \(\mathbf{\gamma_{p}}\) is parallel structure validation data, and \(\mathbf{A_{p}}\) is parallel structure decision layer accuracy. ```  
**Algorithm 1**Model acquisition process of the CNN-CDMV algorithm