《计算机应用》唯一官方网站 ›› 2026, Vol. 46 ›› Issue (7): 2355-2363.DOI: 10.11772/j.issn.1001-9081.2025060785
收稿日期:2025-07-16
修回日期:2025-10-23
接受日期:2025-10-29
发布日期:2025-11-12
出版日期:2026-07-10
通讯作者:
张郁红
作者简介:刘苗苗(1982—),女,河南洛阳人,教授,博士,CCF高级会员,主要研究方向:数据挖掘、群体智能算法、油气大数据;
基金资助:
Miaomiao LIU1,2, Yuhong ZHANG1(
), Qiang ZHANG1,2, Ruishan DU1,2
Received:2025-07-16
Revised:2025-10-23
Accepted:2025-10-29
Online:2025-11-12
Published:2026-07-10
Contact:
Yuhong ZHANG
About author:LIU Miaomiao, born in 1982, Ph. D., professor. Her research interests include data mining, swarm intelligence algorithm, oil and gas big data.
Supported by:摘要:
针对岩石薄片岩性识别中存在的识别精度不高和效率低等问题,提出一种基于改进GhostNet的岩石薄片岩性识别模型。首先,采用多方向Sobel算子构建边缘引导模块,有效提取岩石薄片图像中的边缘和纹理信息;其次,在GhostNet模型的关键位置嵌入卷积块注意力模块(CBAM)强化模型的特征提取能力,进一步提高模型的识别效果;最后,重新设计分类器结构,用全局平均池化层替换原始分类器,减少模型的参数量,提高模型训练效率。采用分层分类方法将数据集分为3大类别和108小类,分别进行粗粒度和细粒度识别。实验结果表明,本文模型在测试集上的一级分类准确率为98.15%,二级分类准确率为96.39%,模型大小为16.3 MB。与EfficientNetV2相比,本文模型在一级分类准确率上提高了1.31个百分点,参数量减少了81%,展现出更佳的分类性能,能够为岩石薄片的岩性识别提供高效且准确的解决方案。
中图分类号:
刘苗苗, 张郁红, 张强, 杜睿山. 基于改进GhostNet的岩石薄片岩性识别模型[J]. 计算机应用, 2026, 46(7): 2355-2363.
Miaomiao LIU, Yuhong ZHANG, Qiang ZHANG, Ruishan DU. Rock thin section lithology identification model based on improved GhostNet[J]. Journal of Computer Applications, 2026, 46(7): 2355-2363.
| 模型 | 参数量/106 | 计算量/MFLOPs | Top-1准确率/% | 计算加速比 |
|---|---|---|---|---|
| ResNet50[ | 25.6 | 4 100 | 76.1 | 1.0 |
| MobileNetV2[ | 5.4 | 219 | 75.2 | 2.0 |
| ShuffleNetV2[ | 5.3 | 299 | 74.9 | 1.9 |
| GhostNet[ | 5.2 | 142 | 75.7 | 2.9 |
表1 4种神经网络性能的对比(基于ImageNet数据集)
Tab. 1 Performance comparison of four neural networks (based on ImageNet dataset)
| 模型 | 参数量/106 | 计算量/MFLOPs | Top-1准确率/% | 计算加速比 |
|---|---|---|---|---|
| ResNet50[ | 25.6 | 4 100 | 76.1 | 1.0 |
| MobileNetV2[ | 5.4 | 219 | 75.2 | 2.0 |
| ShuffleNetV2[ | 5.3 | 299 | 74.9 | 1.9 |
| GhostNet[ | 5.2 | 142 | 75.7 | 2.9 |
| 配置项 | 信息 |
|---|---|
| CPU | AMD Ryzen 7 5800H with Radeon Graphics |
| GPU | NVIDIA GeForce RTX 3060 |
| 内存 | 32 GB |
| 编程语言 | Python 3.13.0 |
| 学习框架 | PyTorch 2.7.1 |
| 计算框架 | CUDA 12.8 |
| 开发工具 | PyCharm |
表2 实验环境信息
Tab. 2 Experimental environment information
| 配置项 | 信息 |
|---|---|
| CPU | AMD Ryzen 7 5800H with Radeon Graphics |
| GPU | NVIDIA GeForce RTX 3060 |
| 内存 | 32 GB |
| 编程语言 | Python 3.13.0 |
| 学习框架 | PyTorch 2.7.1 |
| 计算框架 | CUDA 12.8 |
| 开发工具 | PyCharm |
一级 分类 | 不同类样本张数对应的小类别数 | 小类别 总数 | 样本 总数 | ||||
|---|---|---|---|---|---|---|---|
| 23张 | 24张 | 25张 | 26张 | 27张 | |||
| 总计 | 1 | 90 | 3 | 2 | 12 | 108 | 2 634 |
| 变质岩 | 0 | 36 | 0 | 0 | 4 | 40 | 972 |
| 沉积岩 | 1 | 15 | 3 | 2 | 7 | 28 | 699 |
| 火成岩 | 0 | 39 | 0 | 0 | 1 | 40 | 963 |
表3 岩石薄片样本基本信息汇总
Tab. 3 Summary of basic information of rock thin section samples
一级 分类 | 不同类样本张数对应的小类别数 | 小类别 总数 | 样本 总数 | ||||
|---|---|---|---|---|---|---|---|
| 23张 | 24张 | 25张 | 26张 | 27张 | |||
| 总计 | 1 | 90 | 3 | 2 | 12 | 108 | 2 634 |
| 变质岩 | 0 | 36 | 0 | 0 | 4 | 40 | 972 |
| 沉积岩 | 1 | 15 | 3 | 2 | 7 | 28 | 699 |
| 火成岩 | 0 | 39 | 0 | 0 | 1 | 40 | 963 |
| 层级 | 准确率 | 精确率 | 召回率 | F1值 |
|---|---|---|---|---|
| 一级(3分类) | 98.15 | 98.16 | 98.15 | 98.15 |
| 二级(108分类) | 96.39 | 96.95 | 96.38 | 96.31 |
表4 分层分类实验结果 ( %)
Tab. 4 Experimental results of hierarchical classification
| 层级 | 准确率 | 精确率 | 召回率 | F1值 |
|---|---|---|---|---|
| 一级(3分类) | 98.15 | 98.16 | 98.15 | 98.15 |
| 二级(108分类) | 96.39 | 96.95 | 96.38 | 96.31 |
| 改进点 | 准确率/% | 精确率/% | 召回率/% | F1值/% | 参数量/106 | |
|---|---|---|---|---|---|---|
| Sobel | CBAM | |||||
| — | — | 95.56 | 95.88 | 95.50 | 95.58 | 4.205 |
| √ | — | 96.48 | 96.65 | 96.14 | 96.49 | 4.211 |
| — | √ | 96.30 | 96.44 | 96.62 | 96.31 | 4.206 |
| √ | √ | 98.15 | 98.16 | 98.15 | 98.15 | 4.212 |
表5 消融实验结果
Tab. 5 Results of ablation experiments
| 改进点 | 准确率/% | 精确率/% | 召回率/% | F1值/% | 参数量/106 | |
|---|---|---|---|---|---|---|
| Sobel | CBAM | |||||
| — | — | 95.56 | 95.88 | 95.50 | 95.58 | 4.205 |
| √ | — | 96.48 | 96.65 | 96.14 | 96.49 | 4.211 |
| — | √ | 96.30 | 96.44 | 96.62 | 96.31 | 4.206 |
| √ | √ | 98.15 | 98.16 | 98.15 | 98.15 | 4.212 |
| 模型 | 准确率/% | 精确率/% | 召回率/% | F1值/% | 参数量/106 | 模型大小/MB | 每轮平均迭代时间/s |
|---|---|---|---|---|---|---|---|
| 本文模型 | 98.15 | 98.16 | 98.15 | 98.15 | 4.2 | 16.3 | 68.17±0.35 |
| GhostNet[ | 95.56 | 95.88 | 95.50 | 95.58 | 4.2 | 16.3 | 65.07±1.06 |
| RepViT[ | 95.00 | 95.09 | 95.10 | 95.03 | 5.1 | 18.4 | 46.29±1.24 |
| EfficientNetV2[ | 96.84 | 96.21 | 96.63 | 96.79 | 22.1 | 85.3 | 92.43±2.32 |
| MobileNetV2[ | 94.77 | 94.89 | 94.43 | 93.97 | 2.7 | 8.7 | 38.46±0.52 |
| ShuffleNetV2[ | 93.69 | 93.33 | 93.47 | 93.75 | 2.2 | 5.0 | 44.50±0.84 |
| ResNet50[ | 86.22 | 86.54 | 86.38 | 86.92 | 23.5 | 90.0 | 123.00±0.43 |
表6 各类模型的评价指标
Tab. 6 Evaluation indicators for various models
| 模型 | 准确率/% | 精确率/% | 召回率/% | F1值/% | 参数量/106 | 模型大小/MB | 每轮平均迭代时间/s |
|---|---|---|---|---|---|---|---|
| 本文模型 | 98.15 | 98.16 | 98.15 | 98.15 | 4.2 | 16.3 | 68.17±0.35 |
| GhostNet[ | 95.56 | 95.88 | 95.50 | 95.58 | 4.2 | 16.3 | 65.07±1.06 |
| RepViT[ | 95.00 | 95.09 | 95.10 | 95.03 | 5.1 | 18.4 | 46.29±1.24 |
| EfficientNetV2[ | 96.84 | 96.21 | 96.63 | 96.79 | 22.1 | 85.3 | 92.43±2.32 |
| MobileNetV2[ | 94.77 | 94.89 | 94.43 | 93.97 | 2.7 | 8.7 | 38.46±0.52 |
| ShuffleNetV2[ | 93.69 | 93.33 | 93.47 | 93.75 | 2.2 | 5.0 | 44.50±0.84 |
| ResNet50[ | 86.22 | 86.54 | 86.38 | 86.92 | 23.5 | 90.0 | 123.00±0.43 |
| [1] | Jiang C, Zhang D, Chen S. Lithology identification from well-log curves via neural networks with additional geologic constraint [J]. Geophysics, 2021, 86(5): IM85- IM100. |
| [2] | 朱世松,杨文艺,侯广顺,等.一种岩石薄片智能分类识别方法[J].矿物学报, 2020, 40(1): 106-106. |
| Zhu Shisong, Yang Wenyi, Hou Guangshun, et al. An intelligent classification and recognition method for rock thin sections [J]. Acta Mineralogica Sinica, 2020, 40(1): 106-106. | |
| [3] | 佘明军,李油建,夏相成,等.光谱检测识别岩性技术对比及发展方向[J].录井工程, 2018, 29(3): 16-21. |
| She Mingjun, Li Youjian, Xia Xiangcheng, et al. Comparison and development direction of identifying lithology technology with spectrographic detection [J]. Mud Logging Engineering, 2018, 29(3): 16-21. | |
| [4] | 李娟,孙惠兰,侯庆香. XRD岩性快速识别方法研究[J].中国石油石化, 2017(10): 61-62. |
| Li Juan, Sun Huilan, Hou Qingxiang. Research on rapid identification method of XRD lithology [J]. China Petrochem, 2017(10): 61-62. | |
| [5] | 胡书林,王国瓦,陈向辉,等. X射线荧光元素录井在库车克深区块岩屑岩性识别中的应用[J].录井工程, 2021, 32(1): 26-32. |
| Hu Shulin, Wang Guowa, Chen Xianghui, et al. Application of XRF element logging in lithology identification of cuttings in Keshen block, Kuqa depression [J]. Mud Logging Engineering, 2021, 32(1): 26-32. | |
| [6] | Singh N, Singh T N, Tiwary A, et al. Textural identification of basaltic rock mass using image processing and neural network [J]. Computational Geosciences, 2010, 14(2): 301-310. |
| [7] | Młynarczuk M, Górszczyk A, Ślipek B. The application of pattern recognition in the automatic classification of microscopic rock images [J]. Computers and Geosciences, 2013, 60: 126-133. |
| [8] | 程国建,杨静,黄全舟,等.基于概率神经网络的岩石薄片图像分类识别研究[J].科学技术与工程, 2013, 13(31): 9231-9235. |
| Cheng Guojian, Yang Jing, Huang Quanzhou, et al. Rock image classification recognition based on probabilistic neural networks [J]. Science Technology and Engineering, 2013, 13(31): 9231-9235. | |
| [9] | 郭超,刘烨.多色彩空间下的岩石图像识别研究[J].科学技术与工程, 2014, 14(18): 247-251. |
| Guo Chao, Liu Ye. Recognition of rock images based on multiple color spaces [J]. Science Technology and Engineering, 2014, 14(18): 247-251. | |
| [10] | Perez C A, Saravia J A, Navarro C F, et al. Rock lithological classification using multi-scale Gabor features from sub-images, and voting with rock contour information [J]. International Journal of Mineral Processing, 2015, 144: 56-64. |
| [11] | 刘烨,程国建,马微,等.基于铸体薄片图像颜色空间与形态学梯度的岩石分类[J].中南大学学报(自然科学版), 2016, 47(7): 2375-2382. |
| Liu Ye, Cheng Guojian, Ma Wei, et al. Rock classification based on features form color space and morphological gradient of rock thin section image [J]. Journal of Central South University (Science and Technology), 2016, 47(7): 2375-2382. | |
| [12] | 贺金鑫,任小玉,陈圣波,等.融合学习模型的岩石光谱特征自动分类[J].光谱学与光谱分析, 2021, 41(1): 141-144. |
| He Jinxin, Ren Xiaoyu, Chen Shengbo, et al. Automatic classification of rock spectral features based on fusion learning model [J]. Spectroscopy and Spectral Analysis, 2021, 41(1): 141-144. | |
| [13] | Esmaeili B, Hosseinzadeh S, Kadkhodaie A, et al. Simulating reservoir capillary pressure curves using image processing and classification machine learning algorithms applied to petrographic thin sections [J]. Journal of African Earth Sciences, 2024, 209: No.105098. |
| [14] | dos Anjos C E M, Avila M R V, Vasconcelos A G P, et al. Deep learning for lithological classification of carbonate rock micro-CT images [J]. Computational Geosciences, 2021, 25(3): 971-983. |
| [15] | Ma H, Han G, Peng L, et al. Rock thin sections identification based on improved Squeeze-and-Excitation networks model [J]. Computers and Geosciences, 2021, 152: No.104780. |
| [16] | 程国建,李碧,万晓龙,等.基于SqueezeNet卷积神经网络的岩石薄片图像分类研究[J].矿物岩石, 2021, 41(4): 94-101. |
| Cheng Guojian, Li Bi, Wan Xiaolong, et al. Research on classification of rock section image based on SqueezeNet convolutional neural network [J]. Mineralogy and Petrology, 2021, 41(4): 94-101. | |
| [17] | Zhang Z, Li H, Lei Z, et al. Research on lightweight lithology intelligent recognition system incorporating attention mechanism [J]. Applied Sciences, 2022, 12(21): No.10918. |
| [18] | Sandler M, Howard A, Zhu M, et al. MobileNetV2: inverted residuals and linear bottlenecks [C]// CVPR 2018. Piscataway: IEEE, 2018: 4510-4520. |
| [19] | He K, Zhang X, Ren S, et al. Deep residual learning for image recognition [C]// CVPR 2016. Piscataway: IEEE, 2016: 770-778. |
| [20] | 王婷婷,黄志贤,王洪涛,等.基于MobileNetV2的岩石薄片岩性识别[J].吉林大学学报(地球科学版), 2024, 54(4): 1432-1442. |
| Wang Tingting, Huang Zhixian, Wang Hongtao, et al. Rock thin slice lithology identification based on MobileNetV2 [J]. Journal of Jilin University (Earth Science Edition), 2024, 54(4): 1432-1442. | |
| [21] | 王琼,杨杰,霍凤财,等.基于MobileViT的岩石薄片图像岩性识别方法研究[J].地质通报, 2024, 43(6): 938-946. |
| Wang Qiong, Yang Jie, Huo Fengcai, et al. Lithology identification method of rock thin section images based on MobileViT [J]. Geological Bulletin of China, 2024, 43(6): 938-946. | |
| [22] | Tao L, Li X, Li J, et al. CfRNet: a lightweight convolutional neural network classification model for rock image [C]// ICCEA 2024. Piscataway: IEEE, 2024: 1013-1018. |
| [23] | Han K, Wang Y, Tian Q, et al. GhostNet: more features from cheap operations [C]// CVPR 2020. Piscataway: IEEE, 2020: 1577-1586. |
| [24] | Ma N, Zhang X, Zheng H T, et al. ShuffleNet V2: practical guidelines for efficient CNN architecture design [C]// ECCV 2018. Cham: Springer, 2018: 122-138. |
| [25] | Liu H, Ren Y L, Li X, et al. Rock thin-section analysis and identification based on artificial intelligent technique [J]. Petroleum Science, 2022, 19(4): 1605-1621. |
| [26] | Wang A, Chen H, Lin Z, et al. RepViT: revisiting mobile CNN from ViT perspective [C]// CVPR 2024. Piscataway: IEEE, 2024: 15909-15920. |
| [27] | Tan M, Le Q V. EfficientNetV2: smaller models and faster training [C]// ICML 2021. New York: JMLR.org, 2021: 10096-10106. |
| [1] | 孙敏, 成倩, 丁希宁. 基于CBAM-CGRU-SVM的Android恶意软件检测方法[J]. 《计算机应用》唯一官方网站, 2024, 44(5): 1539-1545. |
| [2] | 沈嫣然, 温昕, 张瑾昊, 张帅, 曹锐, 高保禄. 轻量级多尺度卷积网络的功能磁共振成像脑龄预测模型[J]. 《计算机应用》唯一官方网站, 2024, 44(12): 3949-3957. |
| [3] | 龙杰, 谢良, 徐海蛟. 集成的深度强化学习投资组合模型[J]. 《计算机应用》唯一官方网站, 2024, 44(1): 300-310. |
| [4] | 韩春港, 刘永辉. 基于GhostNet和特征融合的人脸活体检测算法[J]. 《计算机应用》唯一官方网站, 2023, 43(8): 2588-2592. |
| [5] | 郭奕裕, 周箩鱼, 刘新瑜, 李尧. 改进注意力机制的电梯场景下危险品检测方法[J]. 《计算机应用》唯一官方网站, 2023, 43(7): 2295-2302. |
| [6] | 郝巨鸣, 杨景玉, 韩淑梅, 王阳萍. 引入Ghost模块和ECA的YOLOv4公路路面裂缝检测方法[J]. 《计算机应用》唯一官方网站, 2023, 43(4): 1284-1290. |
| [7] | 胡嵽, 冯子亮. 基于深度学习的轻量级道路图像语义分割算法[J]. 计算机应用, 2021, 41(5): 1326-1331. |
| [8] | 史梦安, 陆振宇. 基于YOLO-tiny-RFB模型的电站旋钮开关状态识别[J]. 计算机应用, 2020, 40(12): 3679-3686. |
| [9] | 陈放, 刘晓瑞, 杨明业. 基于活体检测和身份认证的人脸识别安防系统[J]. 计算机应用, 2020, 40(12): 3666-3672. |
| [10] | 汪敏, 武禹伯, 闵帆. 基于多种聚类算法和多元线性回归的多分类主动学习算法[J]. 计算机应用, 2020, 40(12): 3437-3444. |
| [11] | 高雷阜, 李超. 改进的自适应广义整体变分图像降噪模型[J]. 计算机应用, 2016, 36(6): 1699-1703. |
| [12] | 陈真真, 卿粼波, 何小海, 汪芸. 基于非均匀量化的小波域分布式深度图视频编码[J]. 计算机应用, 2016, 36(4): 1080-1084. |
| [13] | 刘珏先, 滕奇志, 王正勇, 何小海. 基于协同表示的多特征融合岩石分类[J]. 计算机应用, 2016, 36(3): 854-858. |
| [14] | 王程啸, 黄辉先, 杨辉, 徐建闽. 基于Riemann-Liouville改进的1~2阶分数阶边缘提取新模型[J]. 计算机应用, 2016, 36(1): 227-232. |
| [15] | 靳玉萍 李保霖. 基于遗传优化径向基概率神经网络的岩性识别应用[J]. 计算机应用, 2013, 33(02): 353-356. |
| 阅读次数 | ||||||
|
全文 |
|
|||||
|
摘要 |
|
|||||