# Research on Lightweight Lithology Intelligent Recognition System Incorporating Attention Mechanism
## 4 Results
### Model Validation  
To assess the models' robustness and generalizability, they were verified using the dataset from the test set (a brand new dataset). Figure 8a through Figure 8c display the findings of the three primary classes' rock identification accuracy. Figure 8a displays the recognition effect and accuracy rate for Class I rock images; the MobileNetV2 model has a general recognition effect in Class I rocks, but the average recognition rate is only 77.26%, and no rock has recognition accuracy higher than 90%; the MobileNetV2 model with fused attention mechanism has a better recognition effect in Class I rocks for three types of rocks, including andesitic volcanic breccia, tuff, and granite, with an average rec rate of 87.44% The recognition effect is better; the recognition accuracy exceeds 90%; the best recognition effect is granite; its accuracy is 98.47%; the average recognition accuracy is 87.14%; when compared to the unimproved MobileNetV2 model, it has increased by 11.88%; the average recognition accuracy of the ResNet101 model and the Inceptionv3 model, respectively, is 83.17% and 85.71%. For the ResNet101 and Inceptionv3 models, the average recognition accuracy is 83.17% and 85.71%, respectively. The recognition effect and accuracy for Class II rock images are shown in Figure 8b. The MobileNetV2 model has a recognition accuracy higher than 90% for anthracic rocks in Class II rocks, with an average recognition accuracy of 75.25%; the model in this study has a better recognition effect for four types of rocks, namely conglomerate, shale, Greisen and Smokeless Coal in Class II rocks, with a recognition accuracy of more than 90% and an average recognition accuracy of 90.59%; for ResNet101 and Inceptionv3 models, the average recognition accuracy is 86.51% and 84.47%, respectively. Figure 8c displays the effectiveness of the identification and the precision of Class III rock photos (c). In Class III rocks, the MobileNetV2 model performs poorly, with an average identification rate of 71.34%. No rock has a recognition accuracy greater than 90%, and Marble is the only rock with a recognition accuracy higher than 80%. The typical accuracy of recognition is 89.24%. The average recognition accuracy for the ResNet101 and Inceptionv3 models is 81.41% and 86.98%, respectively. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Model** & \begin{tabular}{c} **Minimum** \\ **Validation Loss** \\ \end{tabular} & \begin{tabular}{c} **Maximum Validation** \\ **Accuracy/\%** \\ \end{tabular} & \
\begin{tabular}{c} **Training** \\ **Time/min** \\ \end{tabular} &
\begin{tabular}{c} **Post-Training Model** \\ **Size/MB** \\ \end{tabular} \\ \hline CBAM + MobileNetV2* & 0.0723 & 95.71 & 76 & 6.38 \\ ResNet101 [22] & 0.1125 & 94.79 & 195 & 485.78 \\ InceptionV3 [21] & 0.1955 & 92.55 & 234 & 371.59 \\ MobileNetV2 & 0.2885 & 86.43 & 69 & 5.98 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Model performance comparison performance. Figure 7: Model training loss, training accuracy curve comparison. (**a**) training loss curve; (**b**) training accuracy curve. In conclusion, the test set performance comparison shows that the average recognition accuracy of the current research model for Class I-III rocks is 88.99%. The overall average recognition accuracy of the ResNet101 model is inferior to the present study model, with the exception of the individual rocks, which have higher recognition accuracy than the present study model. This shows that the present study model is more stable for the recognition of Class I-III rocks and further demonstrates the superiority and universality of the model proposed in this paper. Only the confusion matrix of the MobileNetV2 model with fused attention mechanism for classifying rocks is listed in Figure 9 due to space restrictions.