An oil and gas pipeline inspection UAV based on improved YOLOv7

Authors:
raw_author_name: Yongxiang Zhao
raw_affiliation_string: North China Institute of Aerospace Engineering, Langfang, China
raw_author_name: Wei Luo
raw_affiliation_string: Aerospace Remote Sensing Information Processing and Application Collaborative Innovation Center of Hebei Province, Langfang, China; Key Laboratory of Advanced Motion Control, Fujian Provincial Education Department, Minjiang University, Fuzhou, China; North China Institute of Aerospace Engineering, Langfang, China
raw_author_name: Guoqing Zhang
raw_affiliation_string: North China Institute of Aerospace Engineering, Langfang, China
raw_author_name: Jiandong Liu
raw_affiliation_string: North China Institute of Aerospace Engineering, Langfang, China
raw_author_name: Xiaoliang Li
raw_affiliation_string: North China Institute of Aerospace Engineering, Langfang, China
raw_author_name: Qi Wang
raw_affiliation_string: Hebei Institute of Geological Surveying and Mapping, Langfang, China

Abstract: This study proposes a method of autonomous navigation UAV for oil and gas pipeline (OGP) dial detection based on the improved YOLOv7 model. The canny edge detection algorithm is applied in identifying the edges of the pipeline, and the Hough transform algorithm is used to detect the pipeline in a straight line. The intelligent UAV P600 is guided to patrol the oil and gas dials (OGD) along the pipeline, and the trained improved YOLOv7-based model is adopted to identify the OGD data. Dial recognition is divided into two stages, that is, dial contour detection and dial reading recognition. For the dial recognition rate (RR), the Levenstein distance, a commonly used method, is introduced, thereby calculating the distance between two character sequences. Meanwhile, an integrated global attention mechanism (GAM) is proposed based on the YOLOv7 model, aiming at extracting more informative features. With this mechanism, the channel and spatial aspects of the features are effectively captured, and the importance of cross-dimensional interactions is increased. By introducing GAM attention mechanism in the backbone and head of YOLOv7, the network’s ability in efficiently extracting depth and primary features is enhanced. ACmix (a hybrid model combining the advantages of self-attentiveness and convolution) is also included, with ACmix module improved. The improved ACmix module has the objectives of enhancing feature extraction capability of backbone network and accelerating network convergence. By substituting 3 × 3 convolutional block with 3 × 3 ACmixBlock and adding a jump connection and a 1 × 1 convolutional structure between the ACmixBlock modules, E-ELAN module in YOLOv7 network is also improved, thus optimizing E-ELAN network, enriching features extracted by E-ELAN network, and reducing inference time of YOLOv7 model. As indicated by comparing the experimental results of the six model algorithms (improved YOLOv7, YOLOv7, YOLOX, YOLOv5, YOLOv6 and Faster R-CNN), the improved YOLOv7 model has higher mAP, faster RR, faster network convergence, and higher IOU. In addition, a generic real dataset, called custom dial reading dataset, is presented. With well-defined evaluation protocol, this dataset allows for a fair comparison of various methods in future work.