# Research on Lightweight Lithology Intelligent Recognition System Incorporating Attention Mechanism
## 4 Results
### Grad-CAM Model Visualization Interpretation  
As we all know, due to the black box nature of convolutional neural networks and other problems, the visualization interpretation is not strong, and the image pixels extracted from its convolutional layer almost tend to be distorted, so in order to overcome this shortcoming enable the model to be better interpreted in terms of visualization, the Grad-CAM model is used to visualize the interpretation of the network, and the heat map shows the focus of the model for the rock regions of interest. In this paper, only the macroscopic recognition of rock images using deep learning models is presented, and the advantages of the proposed model are only explained from the principal point of view for the mentioned abstract feature recognition, but not for the specific lithological features. This technological model is not the topic of this study; thus, it will not be repeated, and its specific principles may be found in the literature [30; 31; 32]. Because there is a restriction on the amount of storage space available, only one picture of each of the six different kinds of rocks in the data set will be used for the Grad-CAM interpretability study. The findings of the heat maps generated by the four different models  
Figure 9: Confusion matrix of rock image classification with MobileNetV2 model fused with attention mechanism. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Model** & **Precision/\%** & **Recall/\%** & **FI-Score/\%** \\ \hline CBAM+MobileNetV2* & 89.62 & 91.38 & 90.49 \\ ResNet101 [22] & 81.32 & 92.66 & 86.62 \\ InceptionV3 [21] & 79.65 & 88.52 & 83.85 \\ MobileNetV2 & 82.43 & 71.65 & 76.66 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Model evaluation index results. are presented in Table 6. The range of rock feature areas that are concerned by the Resnet101, InceptonV3, and MobileNetV2 models is not as large as that of the model proposed in this paper, and the rock feature areas that are concerned are not as uniform as the model proposed in this paper. This is true for the categories that have less background interference. The Resnet101, InceptonV3, and MobileNetV2 models pay more attention to the feature areas of some background interferences, which leads to the deterioration of the feature extraction of the model. The model that is proposed in this paper, on the other hand, only interferes with the background for those categories that have a large amount of background interference, such as limestone and marble. Although just a little amount of care has been devoted to the material, rock characteristics continue to be the primary emphasis, and both the uniformity and the extent of the concern are noticeably superior to those of the other three models. To summarize, through the visual interpretation and analysis of the Grad-CAM model, the model in this paper pays more attention to the rock feature area more evenly and can better filter the background interferences that are not rock features, thereby improving the network's extraction of lithofacies features. Additionally, the model pays more attention to the background interferences that are not rock features. The MobileNetV2 model, which is a fused attention mechanism, is being applied to rock lithology identification and program development design for the very first time in this study. Despite this, there are certain limitations to the study. The following are some areas that will see further development in the near future: (1) Expanding the data set of rock types to enrich the samples of each rock type, so that more images of rock types can be generalized to the model of this study. (2) The next step will be to identify the lithology by coupling mechanical characteristics (for example, rock strength) to make it more close to the actual engineering and field exploration scenarios.