-
摘要:
野外露头区岩石裂缝的检测对于裂缝性油气藏的地质勘测具有重要意义,但传统的图像处理算法对岩石裂缝检测效果欠佳,经典的深度学习模型检测效率与复杂地质环境的岩石裂缝检测精度较低,因此提出了一种改进的露头区岩石裂缝检测算法YOLOv7-PCN。首先,融入PConv(partial convolution)模块替换主干网络的部分标准卷积,从而降低网络计算量,提高网络检测速度;其次,引入坐标注意力机制(coordinate attention,简称CA),增强对裂缝关键边缘与密集分布位置特征的提取能力;最后,边界框回归损失函数使用NWD(normalized Wasserstein distance)度量方式,优化了网络训练的收敛速度,提高了复杂地质环境岩石图像分辨率较低与小目标裂缝的定位检测精度。同时在数据处理方面结合数据增强方法构建了露头区岩石裂缝数据集,提高了网络模型的泛化能力。实验结果表明,该算法在4种岩石类别(白云岩、灰岩、泥岩和砂岩)的裂缝检测上
mAP 值(平均精确率的均值)达到82.5%,相比于原YOLOv7算法,提升了7.7%,同时模型参数量减少了29.6%,模型计算量节省了31.2%,模型检测速度提升了39.2%。本研究提出的改进YOLOv7岩石裂缝检测算法,在实现轻量化同时使得复杂环境下的裂缝检测结果更加准确,为地质岩石裂缝识别与勘测任务提供了重要的技术参考。Abstract:Objective The detection of rock fractures in outcrop areas plays a pivotal role in the geological exploration of fracture-type hydrocarbon reservoirs, an essential aspect of the energy industry. Traditional image processing methods for rock fracture detection have faced limitations in providing precise results. Furthermore, the application of traditional deep learning models for rock fracture detection in complex geological settings have a low computing efficiency and accuracy.
Methods To meet these challenges, this paper introduces an advanced and innovative rock fracture detection algorithm, known as YOLOv7-PCN. It represents a significant advancement in the field of geological exploration by improving in both accuracy and efficiency during rock fracture detection. The YOLOv7-PCN algorithm incorporates several improvements to enhance its performance. First, the PConv (Partial Convolution) module were included to replace conventional convolutions within the network backbone, which dramatically reduces computational complexity and improve the enhanced detection speed. Second, YOLOv7-PCN introduces the Coordinate Attention (CA) mechanism, a critical addition that refines the extraction of vital edge and densely-distributed features associated with fractures. It can detect and localize fractures with unprecedented accuracy, even in complex geological backgrounds. An instrumental advantage of this algorithm is the integration of the Normalized Wasserstein Distance (NWD) measurement, which are used as the bounding box regression loss function. It significantly optimizes the training convergence, leading to further improvement on localization and detection accuracy, especially for small target fractures. Notably, YOLOv7-PCN is suitable for the scenarios where rock images exhibit low resolution and complex geological contexts. To improve the model's adaptability to various datasets, YOLOv7-PCN incorporates the data augmentation into the data preprocessing pipeline.
Results The experimental results validate the remarkable performance of YOLOv7-PCN, which attains an impressive mAP (mean Average Precision) score of 82.5% in the detection of fractures among four distinct rock categories. This achievement represents a substantial increase in accuracy, with 7.7% improvement compared to the original YOLOv7 algorithm. Remarkably, YOLOv7-PCN accomplishes these advancements while significantly reducing the number of model parameters by 29.6%, with 31.2% computational resources being saved. Furthermore, it also stands out for its exceptional detection speed, with 39.2% being increased. In summary, the YOLOv7-PCN rock fracture detection algorithm represents a transformative milestone in the realm of geological exploration. It balances the relationship between lightweight modeling and detection accuracy enhancement, which is suitable for deployment in complex geological environments. This innovation not only provides a crucial technological reference for the identification and exploration of geological rock fractures, but also makes progesses in the geological exploration of fracture-type hydrocarbon reservoirs.
Conclusion Moreover, YOLOv7-PCN can accelerate and improve the precision of fracture detection, thereby contributing to geological studies and resource assessment.
-
Key words:
- fracture detection /
- YOLOv7 /
- PConv /
- NWD /
- attention mechanism /
- outcrop area
-
图 2 CA模块结构图
Input为模块输入部分;Output为模块输出部分;X Avg Pool与Y Avg Pool分别代表输入特征图水平与垂直方向的全局平均池化操作;Concat与Conv2d分别代表通道拼接及卷积操作;BatchNorm与Non-linear分别代表批量归一化及Sigmoid非线性激活操作;Split代表对空间维度分别使用不同大小卷积核的卷积操作;c、h、w、r及f、fh、fw、gh、gw分别代表相应的输入、中间转换操作、输出特征图的通道数、高度、宽度、特征维度降低倍率及所得到的相应中间特征图、高宽维度分离特征图、高宽维度上的两个注意力权重
Figure 2. Structure diagram of CA module
图 3 改进的YOLOv7网络结构图
Position 1,3,5,7为PConv模块替换的位置;Position 2,4,6为引入CA注意力机制的位置;Position 8,9,10为NWD度量方式主要作用的位置。其中,CBS:Convolution + Batch Normalization + SiLU,代表卷积 + 批量归一化 + SiLU激活函数非线性激活的结合操作;SPPCSPC:Spatial Pyramid Pooling + Cross Stage Partial Channel,代表融合空间金字塔池化及跨阶段部分通道的特殊卷积操作;MPConv:MaxPooling Convolution,代表最大池化卷积操作;CBM:Convolution + Batch Normalization + Sigmoid,代表卷积 + 批量归一化 + Sigmoid激活函数非线性激活的结合操作;RepConv:Re-parameterized Convolution,代表重新参数化的卷积操作。Input为网络输入部分;640×640×3为输入图像的尺寸大小;Output为网络输出部分;Concat为相应特征图通道拼接操作;Conv为卷积操作;BN为批量归一化操作;Maxpool为最大池化操作;UP为结合卷积、批量归一化及非线性激活的上采样(UpSample)操作;ADD为特征图相加,通道数不变的操作;c及各倍率c分别为各模块相应的输入及输出通道数,同时也通过箭头对通道数的相应变化进行表示
Figure 3. Improved YOLOv7 network structure diagram
表 1 YOLO格式标注文件内容
Table 1. The annotation file content based on YOLO format
class center_x center_y width height 0 0.222656 0.082031 0.109375 0.156250 0 0.326172 0.242188 0.121094 0.156250 0 0.421875 0.402344 0.109375 0.156250 0 0.554688 0.537109 0.148438 0.113281 0 0.693359 0.527344 0.105469 0.148438 0 0.750000 0.408203 0.117188 0.089844 0 0.902344 0.326172 0.195312 0.105469 0 0.644531 0.693359 0.109375 0.175781 0 0.628906 0.892578 0.078125 0.214844 0 0.162109 0.484375 0.152344 0.171875 表 2 实验环境配置
Table 2. Experimental environment deployment
参数 配置 操作系统 Ubuntu 20.04.2 LTS CPU Intel(R)Core(TM) i5-10400F CPU @2.90 GHz GPU NVIDIA GeForce RTX 2060 (6G)编程语言 Python 3.9.12 深度学习框架 Pytorch 1.11.0+CUDA 11.3+cudnn 8.2.0 表 3 消融实验设计
Table 3. Design of ablation experiment
序号 模型 PConv CA NWD ① YOLOv7 $\times $ $\times $ $\times $ ② YOLOv7-P √ $\times $ $\times $ ③ YOLOv7-C $\times $ √ $\times $ ④ YOLOv7-N $\times $ $\times $ √ ⑤ YOLOv7-PC √ √ $\times $ ⑥ YOLOv7-PN √ $\times $ √ ⑦ YOLOv7-PCN √ √ √ “√”代表使用该策略;“$\times $”代表未使用该策略。①代表原YOLOv7算法网络;②代表了将YOLOv7部分主干特征提取卷积模块替换为PConv模块;③代表嵌入CA注意力机制;④代表将边界框回归损失函数的IoU度量方式替换为NWD的Wasserstein距离度量;⑤与⑥分别代表主要的不同改进策略组合网络;⑦代表本研究提出的YOLOv7-PCN改进算法网络;下同 表 4 消融实验结果对比
Table 4. Comparison of ablation experimental results
序号 模型 Precision/
%Recall/
%mAP@.5/
%Params/
MGFLOPs/
GFPS ① YOLOv7 82.9 72.6 74.8 37.21 51.60 56 ② YOLOv7-P 83.5 73.3 75.6 25.98 35.46 85 ③ YOLOv7-C 84.7 74.8 77.8 37.52 51.71 54 ④ YOLOv7-N 85.7 75.5 78.6 37.21 51.60 62 ⑤ YOLOv7-PC 85.8 76 79.2 26.22 35.51 78 ⑥ YOLOv7-PN 86.2 77.6 80.8 25.98 35.46 88 ⑦ YOLOv7-PCN 86.8 78.5 82.5 26.21 35.50 78 表 5 不同检测算法效果对比
Table 5. Comparison for different detection algorithms
模型 mAP@.5/% Params/M GFLOPs/G FPS Faster-RCNN 73.4 174.38 74.23 16 SSD 71.6 24.32 78.52 22 YOLOv4 73.6 52.53 63.26 45 YOLOv5l 72.5 46.56 53.63 58 YOLOv7 74.8 37.21 51.60 56 YOLOv7-GhostNet 75.3 20.85 32.75 86 YOLOv7-ShuffleNetV2 74.6 21.36 31.63 90 YOLOv7-PCN 82.5 26.21 35.50 78 表 6 不同注意力机制对比结果
Table 6. Comparative results for different attention mechanisms
模型 mAP@.5/% Params/M FPS YOLOv7-PCN-CA 82.5 26.21 78 YOLOv7-PCN-CBAM 81.4 26.28 76 YOLOv7-PCN-SE 82.2 26.17 71 YOLOv7-PCN-ECA 81.8 26.15 73 -
[1] 高翔,冯建伟,渠继航,等. 基于数字露头的多尺度裂缝模型建立及其对地下裂缝预测指导[J]. 地质科技通报,2024,43(2):143-155.GAO X,FENG J W,QU J H,et al. Establishment of multi-scale fracture model based on digital outcrop and its guidance for subsurface fracture prediction[J]. Bulletin of Geological Science and Technology,2024,43(2):143-155. (in Chinese with English abstract [2] 梁晓伟,王庆鹏,尤源,等. 非常规油气储层天然裂缝研究方法及其适用性[J]. 中国矿业,2021,30(4):206-211.LIANG X W,WANG Q P,YOU Y,et al. Study method of natural fractures in unconventional oil and gas reservoirs and its applicability[J]. China Mining Magazine,2021,30(4):206-211. (in Chinese with English abstract [3] 黄彦庆,肖开华,金武军,等. 川东北元坝西部须家河组致密砂岩裂缝发育特征及控制因素[J]. 地质科技通报,2023,42(2):105-114.HUANG Y Q,XIAO K H,JIN W J,et al. Characteristics and controlling factors of tight sandstone reservoir fractures in the Xujiahe Formation of the western Yuanba area,northeastern Sichuan Basin[J]. Bulletin of Geological Science and Technology,2023,42(2):105-114. (in Chinese with English abstract [4] 张冠杰,张滨鑫,徐珂,等. 塔里木盆地库车坳陷博孜区块超深层致密砂岩储层裂缝特征及其对油气产能的影响[J]. 地质科技通报,2024,43(2):75-86.ZHANG G J,ZHANG B X,XU K,et al. Fracture characteristics of ultra-deep tight sandstone reservoirs in Bozi Block,Kuqa Depression of Tarim Basin,and effects on oil gas production[J]. Bulletin of Geological Science and Technology,2024,43(2):75-86. (in Chinese with English abstract [5] 陈俊杰. 油气储层裂缝预测方法及发展趋势[J]. 石化技术,2017,24(4):151.CHEN J J. Fracture prediction method and development trend of oil and gas reservoirs[J]. Petrochemical Industry Technology,2017,24(4):151. (in Chinese with English abstract [6] 曹家乐,李亚利,孙汉卿,等. 基于深度学习的视觉目标检测技术综述[J]. 中国图象图形学报,2022,27(6):1697-1722. doi: 10.11834/jig.220069CAO J L,LI Y L,SUN H Q,et al. A survey on deep learning based visual object detection[J]. Journal of Image and Graphics,2022,27(6):1697-1722. (in Chinese with English abstract doi: 10.11834/jig.220069 [7] 包晓敏,王思琪. 基于深度学习的目标检测算法综述[J]. 传感器与微系统,2022,41(4):5-9.BAO X M,WANG S Q. Survey of object detection algorithm based on deep learning[J]. Transducer and Microsystem Technologies,2022,41(4):5-9. (in Chinese with English abstract [8] LIU W,ANGUELOV D,ERHAN D,et al. SSD:Single shot MultiBox detector[C]//Anon. Proceedings of the European Conference on Computer Vision,Netherlands. Berlin,Heidelberg:Springer-Verlag,2016:21-37. [9] XIE X,CHENG G,WANG J,et al. Oriented R-CNN for object detection[C]//Anon. Proceedings of the IEEE/CVF International Conference on Computer Vision. [S. 1. ]:[S. n. ],2021:3520-3529. [10] GIRSHICK R. Fast R-CNN[C]//Anon. 2015 IEEE International Conference on Computer Vision. New York:IEEE Press,2015:1440-1448. [11] REN S Q,HE K M,GIRSHICK R,et al. Faster R-CNN:Towards real-time object detection with region proposal networks[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence,2017,39(6):1137-1149. doi: 10.1109/TPAMI.2016.2577031 [12] HE K,GKIOXARI G,DOLLÁR P,et al. Mask R-CNN[C]//Anon. Proceedings of the IEEE International Conference on Computer Vision. [S. 1. ]:[s. n. ],2017:2961-2969. [13] 李良福,马卫飞,李丽,等. 基于深度学习的桥梁裂缝检测算法研究[J]. 自动化学报,2019,45(9):1727-1742.LI L F,MA W F,LI L,et al. Research on bridge fracture detection algorithm based on depth learning[J]. Acta Automatica Sinica,2019,45(9):1727-1742. (in Chinese with English abstract [14] ZHU J Q,ZHONG J T,MA T,et al. Pavement distress detection using convolutional neural networks with images captured via UAV[J]. Automation in Construction,2022,133:103991. doi: 10.1016/j.autcon.2021.103991 [15] 廖祥灿,李彩林,姚玉凯,等. 基于改进YOLO V5的公路桥梁裂缝检测方法[J]. 山东理工大学学报(自然科学版),2023,37(4):1-7.LIAO X C,LI C L,YAO Y K,et al. Fracture detection method of highway bridge based on improved YOLO V5[J]. Journal of Shandong University of Technology (Natural Science Edition),2023,37(4):1-7. (in Chinese with English abstract [16] 余加勇,刘宝麟,尹东,等. 基于YOLOv5和U-Net3+的桥梁裂缝智能识别与测量[J]. 湖南大学学报(自然科学版),2023,50(5):65-73.YU J Y,LIU B L,YIN D,et al. Intelligent identification and measurement of bridge fractures based on YOLOv5 and U-Net3+[J]. Journal of Hunan University(Natural Sciences),2023,50(5):65-73. (in Chinese with English abstract [17] WANG C Y,BOCHKOVSKIY A,LIAO H Y M. YOLOv7:Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors[C]//Anon. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. [S. 1. ]:[S. n. ],2023:7464-7475. [18] CHEN J,KAO S,HE H,et al. Run,Don't walk:Chasing Higher FLOPS for Faster Neural Networks[C]//Anon. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. [S. l. ]:[S. n. ],2023:12021-12031. [19] HOU Q,ZHOU D,FENG J. Coordinate attention for efficient mobile network design[C]//Anon. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. [S. 1. ]:[S. n. ],2021:13713-13722. [20] ZHENG Z H,WANG P,REN D W,et al. Enhancing geometric factors in model learning and inference for object detection and instance segmentation[J]. IEEE Transactions on Cybernetics,2022,52(8):8574-8586. doi: 10.1109/TCYB.2021.3095305 [21] WANG J,XU C,YANG W,et al. A normalized Gaussian Wasserstein distance for tiny object detection[J]. arXiv preprint arXiv,2021,2110:13389. -