# GAN Data Augmentation Methods in Rock Classification
## 4 Experimental Procedure and Analysis
### Experimental Procedure and Analysis of Results
From Figure 7, it can be seen that the images of coal enhanced via the traditional method do not differ much from the original images, and there is redundancy in feature information; the images generated via DCGAN are relatively single and blurred; the images generated via CRDCGAN are clearly visible, rich in details with obvious features. The traditional method, DCGAN method, and CRDCGAN method are used to expand the rock image dataset, respectively, and the classification model AlexNet is trained on the same test  
Figure 6: CRDCGAN generates rock images. set with 100 iterations. The loss value and accuracy variation curves of the classification model are shown in Figure 8.  
As seen in Figure 8, after 100 iterations, the classification accuracy of the proposed method CRDCGAN reaches 96.38%, which is 13.39%, 8.57%, and 6.28% higher than that of the classification models trained using the non-augmented, traditional data augmentation methods and DCGAN data augmentation methods, respectively, on the same test set. The classification accuracy of the network trained via the CRDCGAN-augmented dataset is less volatile and stable at around 0.13. The loss value of the network trained via CRDCGAN with the expanded dataset fluctuates less and is stable at about 0.13. The CRDCGAN method is more stable than the other methods and achieves higher classification accuracy. The advantages and disadvantages of classification models are analyzed in depth using confusion matrices [25]. The confusion matrix can visualize the classification of each type of rock. The confusion matrix is shown in Figure 9.  
figfig:applsci-2335948-f009 visualizes that the confusion matrix of the classification model trained via CRDCGAN enhancement has significantly larger values at the diagonal line, which also reflects a greater number of correctly classified images. The four classification models were subjected to performance analysis, and the results are shown in Tables 1-4. Figure 8: Rock image classification model loss value accuracy change curve. Figure 7: Different data augmentation methods to generate images of coal. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Type** & **Precision** & **Recall** & \(\boldsymbol{F_{1}}\)**Score** & **Number** \\ \hline Basalt & 0.8438 & 0.7714 & 0.8060 & 27 \\ Coal & 0.9061 & 0.9820 & 0.9425 & 164 \\ Granite & 0.9000 & 0.7941 & 0.8437 & 27 \\ Limestone & 0.9630 & 0.7123 & 0.8189 & 104 \\ Marble & 0.6632 & 0.8514 & 0.7456 & 126 \\ Quartzite & 0.7753 & 0.7797 & 0.775 & 138 \\ Sandstone & 0.9273 & 0.8361 & 0.8793 & 102 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Original image test set metrics. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Type** & **Precision** & **Recall** & \(\boldsymbol{F_{1}}\)**Score** & **Number** \\ \hline Basalt & 0.8710 & 0.7714 & 0.8182 & 27 \\ Coal & 0.9647 & 0.9820 & 0.9733 & 164 \\ Granite & 1.0000 & 0.8235 & 0.9032 & 28 \\ Limestone & 0.9348 & 0.8836 & 0.9085 & 129 \\ Marble & 0.7922 & 0.8243 & 0.8079 & 122 \\ Quartzite & 0.8146 & 0.8192 & 0.8169 & 145 \\ Sandstone & 0.8692 & 0.9262 & 0.8968 & 113 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Traditional augmentation method test set metrics. Figure 9: Rock classification confusion matrix. (**a**) Confusion matrix without data augmentation methods. (**b**) Confusion matrix for traditional data augmentation methods. (**c**) Confusion matrix for DC-GAN data augmentation methods. (**d**) Confusion matrix for CRDCGAN data augmentation method. As seen from Tables 1-4, the method CRDCGAN in this paper achieves more obvious results compared with the traditional image data enhancement method and DCGAN image data enhancement method. The number of correct recognitions for quartzite and marble improved significantly. The data from Tables 1-4 can show that the classification performance of the classification network trained by the method in this paper is better, and the classification accuracy recall and \(F_{1}\) values are higher for each category in the dataset.