# Research on Lightweight Lithology Intelligent Recognition System Incorporating Attention Mechanism
###### Abstract  
How to achieve high-precision detection and real-time deployment of the lithology intelligent identification system has significant engineering implications in the geotechnical, geological, water conservation, and mining disciplines. In this study, a lightweight lithology intelligent identification model is proposed to overcome this problem. The MobileNetV2 model is utilized as the basic backbone network to decrease network operation parameters. Furthermore, channel attention and spatial attention methods are incorporated into the model to improve the network's extraction of complicated and abstract petrographic elements. In addition, based on the findings of network training, computing power performance, test results, and Grad-CAM interpretability analysis and comparison tests with Resnet101, InceptionV3, and MobileNetV2 models. The training accuracy of the proposed model is 98.59 percent, the training duration is 76 min, and the trained model is just 6.38 megabytes in size. The precision (P), recall (R), and harmonic mean (FI-score) were, respectively, 89.62%, 91.38%, and 90.42%. Compared to the three competing models, the model presented in this work strikes a better balance between lithology recognition accuracy and speed, and it gives greater consideration to the rock feature area. Wider and more uniform, strong anti-interference capability, improved robustness and generalization performance of the model, which can be deployed in real-time on the client or edge devices and has some promotion value. e 2020 October 20222 October 202227 October 202227 October 2022  
Few researchers have utilized computer vision in deep learning [15; 16; 17; 18] and migration learning techniques [19] to conventional domains such as geotechnical and geological engineering, etc., during the past few years. As research progresses, CV and migration learning approaches have been used for tasks such as the intelligent categorization of certain photographs of rocks. [PERSON] et al. [20] introduced the Xception model and migration learning techniques to recognize lithology by manually constructing 10 types of rock datasets, and the recognition accuracy reached 86%, achieving good recognition results; [PERSON] et al. [21] used the InceptionV3 model as a pre-training model to establish lithology recognition models for three types of rocks, including granite, micaceous rock, and breccia, and the recognition accuracy was greater than 85%, and an improved lithology recognition model was developed; [PERSON] et al. [22] used the self-supervised network to negatively influence the rock images, and the migration learning-based Resnet101 model was introduced to recognize different lithologies; [PERSON] et al. [23] combined the migration learning of InceptionV3 model and the audio regression model of SVM and established lithology recognition models for six types of rocks, including dolomite, slate, granite, quartzite, marble, and basalt. The literature's building of rock datasets [21; 23] lacks diversity and does not refine the construction of the three primary rocks. In the literature [22], the Resnet101 model is used for lithology recognition, and it has achieved good recognition accuracy. However, the number and volume of model parameters are huge, and they can typically only be performed on GPU systems with high processing capacity. In addition, deep learning networks have black-box features, and the majority of academics do not provide model interpretability analyses, making them difficult for non-computer experts to comprehend and lacking in conviction.