Quality control method for automatically detecting drilling well depth through Luoyang shovel video
Through deep learning technology and YOLOv5 network, the drill pipe motion rules in the drilling process video are automatically detected, which solves the efficiency and quality problems of drilling well depth detection and achieves efficient drilling quality monitoring.
Patent Information
- Application Number
- CN202310521047.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-10
- Publication Date
- 2024-11-12
AI Technical Summary
In the prior art, automated detection of drilling well depth has not been effectively solved, resulting in drilling quality inspection relying on manual video browsing, which is time-consuming and labor-intensive, affecting engineering efficiency and quality.
Deep learning technology is used to build a YOLOv5 network, and through image annotation and model training, a drill pipe target detection and counting model is established, the drill pipe motion rules in the drilling process video are automatically detected, and the drilling depth is calculated.
It realizes automated and efficient quality inspection of drilling well depth, reduces labor costs, shortens video browsing time by 85%, reduces quality control labor by 80%, and improves the efficiency and quality of drilling quality monitoring.
Smart Images

Figure CN118941609A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of artificial intelligence technology and relates to a quality control method for drilling depth, and specifically relates to a quality control method for automating the detection of drilling depth by Luoyang shovel video. Background Art
[0002] Analyzing geological structures based on seismic waves to find and identify oil and gas resources is an important exploration method in the field of oil exploration. At present, seismic waves are mostly generated by artificially burying explosives in the wells. Therefore, whether the drilling depth meets the standard seriously affects the final oil detection results. Manual drilling based on the Luoyang shovel is the main technical means of drilling and perforating. Due to engineering needs, this process is mostly outsourced to a third party, and the company completes the subsequent manual quality inspection through video recording. However, due to the uneven quality of third-party personnel, the huge number of drilling quality inspection videos, and the time-consuming and labor-intensive manual video browsing method, it brings great work pressure to the later quality inspection, affecting the efficiency and quality of the project.
[0003] In recent years, with the continuous development of artificial intelligence, automatic detection and recognition technology has been increasingly applied to various aspects such as industrial production, social security and daily consumption, and has attracted more and more attention. Artificial intelligence technology based on deep learning has developed rapidly. It mainly outputs a large amount of data to the network through network construction, processes these actions and learns through computers, and continuously optimizes the network model to separate the effective information that needs to be identified. Since computers have the advantages of fast speed, no fatigue, and ability to adapt to harsh environments, artificial intelligence technology has broad development prospects in seismic exploration and production, but there is still no effective technical solution for automated detection of drilling depth. Summary of the invention
[0004] The purpose of the present invention is to provide a quality control method for automatically detecting drilling depth by Luoyang shovel video, and to use artificial intelligence based on deep learning to learn the movement law of the drill rod in the process video, so as to realize automated and efficient quality inspection of the drilling depth in the drilling process video.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0006] A quality control method for automatically detecting drilling depth using a Luoyang shovel video, comprising the following steps:
[0007] S1. Build YOLOv5 network;
[0008] S2, obtaining a drill rod target sample image set and annotating the drill rods therein using an image annotation tool to obtain the relative position coordinates of the drill rods in the current frame image;
[0009] S3, dividing the labeled drill pipe target sample image set into a training set and a test set, inputting the training set into the YOLOv5 network for training, and performing detection through the test set to establish a drill pipe target detection model;
[0010] S4. Detect the process video using the drill rod target detection model to obtain the frame number of the drill rod in all frame images in the process video, and obtain the relative position coordinates of the drill rod in the current frame image; draw a scatter plot of the drill rod target motion trajectory in the process video with the frame number of the drill rod as the horizontal axis and the vertical height of the drill rod in the frame image where the drill rod is located as the vertical axis;
[0011] S5. Select a sample set from the drill rod target motion trajectory scatter plot, annotate the motion trajectory of each drill rod in the sample set image using an image annotation tool, and establish a drill rod motion trajectory sample set; divide the drill rod motion trajectory sample set into a training set and a test set, input the training set into a YOLOv5 network for training, and perform detection using the test set to establish a drill rod counting network model;
[0012] S6. Detect the drill rod target motion trajectory scatter plot through the drill rod counting network model to obtain the number of repetitions of the drill rod motion law in the drill rod target motion trajectory scatter plot, that is, the total number of drill rods pulled in the process video;
[0013] S7. Calculate the drilling depth based on the total number of drill rods and the vertical height ratio of the first drill rod length to the standard drill rod in the drill rod target motion trajectory scatter diagram.
[0014] As a limitation, in step S1, the architecture of the YOLOv5 network includes an input end, a backbone network, a neck network and an output end;
[0015] The input of the YOLOv5 network uses the Mosaic data enhancement algorithm, the adaptive anchor box calculation algorithm, and the adaptive image scaling algorithm;
[0016] The backbone network uses Focus structure and CSPDarknet to extract features of frame images;
[0017] The neck network uses FPN structure and PAN structure to fuse the features from the backbone network;
[0018] The output end uses GIOU_Loss as the regression loss function for target positioning;
[0019]
[0020] In the formula, A is the predicted box, B is the real box, C is the minimum convex set of A and B, that is, the minimum circumscribed rectangle of A and B, and IoU is the intersection over union of the boxes.
[0021] As a second limitation, in step S2, the image annotation tool uses the rectangular bounding box tool of LabelImg.
[0022] As a third limitation, in step S3, when the labeled drill pipe target sample image set is divided into a training set and a test set, the ratio of the training set to the test set is 7:3.
[0023] As a fourth limitation, in step S4, the process video includes a Luoyang shovel process video.
[0024] As a fifth limitation, in step S5, when the drill rod motion trajectory sample set is divided into a training set and a test set, the ratio of the training set to the test set is 7:3.
[0025] As a sixth limitation, in step S7, the calculation formula for the drilling depth is:
[0026] H=H 1 *h 1 / H 2 +(n-1)h;
[0027] In the formula, h 1 is the actual length of the drill pipe, n is the total number of drill pipes, H 1 is the length of the first drill rod in the drill rod target motion trajectory scatter diagram. The length of the first drill rod is the average length of the drill rod in the first two frames of the drill rod target motion trajectory scatter diagram. 2 It is the maximum length of the drill rod in the scatter plot of the drill rod target motion trajectory, that is, the standard length of the drill rod.
[0028] Due to the adoption of the above technical solution, the present invention has the following technical advances compared with the prior art:
[0029] (1) The present invention adopts the YOLOv5 network to learn the drill rod movement law in the process video, realizes the automated and efficient quality inspection of the drilling depth in the drilling process video, and reduces the labor cost;
[0030] (2) The present invention uses the YOLOv5 network to learn the process video. The YOLOv5 network has the advantages of both speed and accuracy, and can efficiently detect the drill pipe targets in tens of thousands of videos. The network is lightweight and easy to transplant.
[0031] (3) The present invention realizes the transformation from human eye video browsing mode to artificial intelligence mode, shortening the video inspection time of drilling process by 85%. It not only reduces the labor of video quality control by more than 80%, but also greatly improves the efficiency and quality of drilling quality monitoring, playing an important role in promoting cost reduction, quality improvement and efficiency increase of exploration projects.
[0032] In summary, the present invention is suitable for automated and efficient quality inspection of drilling depths through machine learning based on drilling process videos, which greatly improves the efficiency and quality of drilling quality monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 Shown is a method flow chart of an embodiment of the present invention;
[0034] Figure 2 Shown is a scatter plot detected by an embodiment of the present invention. DETAILED DESCRIPTION
[0035] In order to better explain the present invention and facilitate understanding, the present invention is described in detail below through specific implementation modes in conjunction with the accompanying drawings.
[0036] Embodiment A quality control method for automatically detecting drilling depth using Luoyang shovel video
[0037] Manual drilling with a Luoyang shovel and drilling with a drilling rig are the main technical means for drilling holes. In this embodiment, manual drilling with a Luoyang shovel is used. When quality control of the drilling depth is performed, quality control of the Luoyang shovel process video is required.
[0038] like Figure 1 As shown, this embodiment is a quality control method for automatically detecting drilling depth by Luoyang shovel video, comprising the following steps:
[0039] S1. Build YOLOv5 network;
[0040] The architecture of the YOLOv5 network includes the input end, backbone network (Backbone), neck network (Neck) and output end (Head);
[0041] ①The input end of the YOLOv5 network mainly refers to the preprocessing step after the input image. The input end of the YOLOv5 network is improved by the Mosaic data enhancement algorithm, the adaptive anchor box calculation algorithm and the adaptive image scaling algorithm; among them, the Mosaic data enhancement algorithm forms training samples by randomly cropping and scaling four images, randomly distributing and splicing them on one image;
[0042] In the Luoyang shovel process video, the drill rod is smaller than the background image, the contrast is low, and the video is shaky and blurry. The Mosaic data enhancement algorithm increases the complexity of the training image background, greatly enriches the training sample set, and can reduce the memory requirements of the model.
[0043] ②The backbone network of the YOLOv5 network uses the Focus structure and CSPDarknet to extract the features of frame images. The backbone network mainly uses a network structure with excellent performance to extract core features;
[0044] The Focus structure first crops the input image through a slice operation, then concatenates multiple results through a tensor concatenation operation, and then passes through 32 layers of convolutional layers, normalized exponential layers (BN), and activation function layers (Leaky-ReLu), and then inputs the feature map into the next convolutional layer. The normalized exponential layer and the activation function layer are used together to keep the mean and variance of each batch of data within a certain range, so that the subsequent network does not need to be continuously adjusted to adapt to changes in distribution, thereby improving the learning effect and convergence speed.
[0045] The CSPDarknet structure divides the feature map of the base layer into two branches, each of which performs convolution operations. One branch passes through the residual structure component (Resunit) to build a deeper network and merge them with the cross-stage hierarchical structure. The CSPDarknet structure enables the model to learn more features, reduce the amount of calculation, and improve accuracy.
[0046] ③The neck network of the YOLOv5 network uses the FPN (Feature Pyramid Network) structure and the PAN (Path Aggregation Network) structure to fuse the features from the backbone network; the role of the neck network is mainly to transfer the features to the prediction layer by fusing and combining the features; among them, the FPN structure obtains the semantic feature information of the target with higher resolution from top to bottom through upsampling, improving the transmission and fusion of the underlying features, while the two PAN structures play the role of transmitting strong positioning features from bottom to top; the FPN structure and the PAN structure cooperate with each other to fuse the features of different backbone layers, further improving the richness of the extracted features;
[0047] ④The output of the YOLOv5 network mainly uses the positioning loss function and the classification loss function to further improve the positioning and classification results, and improves the positioning accuracy and recognition accuracy through the two. The output of the YOLOv5 network uses the border intersection over union (IoU) to calculate the prediction loss, and the bounding box regression loss function IoU_Loss is calculated by combining the intersection of the predicted box and the true box divided by their union;
[0048]
[0049] In the formula, A is the predicted box and B is the real box;
[0050] The intersection over union (IoU) of bounding boxes can remove duplicate bounding boxes and generate the final bounding box by the degree of overlap between the predicted box and the true box. However, it cannot measure the distance between the predicted box and the true box. When the two do not overlap, the IoU is 0, and the result cannot be optimized. Therefore, in this step, the output end of the YOLOv5 network uses GIOU_Loss as the regression loss function for target positioning.
[0051]
[0052] In the formula, C is the minimum convex set of A and B, that is, the minimum circumscribed rectangle of A and B;
[0053] GIoU adds a measure of the intersection scale, and can calculate the loss even when the bounding boxes do not overlap. While overcoming the shortcomings of the traditional bounding box regression loss function IoU_Loss, it retains its own advantages and improves the final detection accuracy to a certain extent.
[0054] S2, obtaining a drill rod target sample image set and annotating the drill rods therein using an image annotation tool to obtain the relative position coordinates of the drill rods in the current frame image;
[0055] In this step, the drill rod target sample image set is the frame image of the drill rod in the Luoyang shovel process video;
[0056] When drilling manually with a Luoyang shovel, a drill pipe target sample image set is established for the Luoyang shovel process video, that is, the Luoyang shovel process video is converted into images, frame images of drill pipes in the video are obtained, and a Luoyang shovel drill pipe target sample image set is established; the images in the Luoyang shovel drill pipe target sample image set must be highly representative and different to avoid underfitting, and the more the better, at least 2,000 images;
[0057] After obtaining the Luoyang shovel drill rod target sample image set, the rectangular bounding box tool of LabelImg is used to mark the drill rods in the Luoyang shovel drill rod target sample image set respectively, and the relative position coordinates (x, y, w, h) of the drill rod in the current frame image are obtained, where x represents the horizontal coordinate of the center point of the bounding box, y represents the vertical coordinate of the center point of the bounding box, w represents the width of the bounding box, and h represents the height of the bounding box;
[0058] S3, dividing the labeled drill pipe target sample image set into a training set and a test set, inputting the training set into the YOLOv5 network for training, and performing detection through the test set to establish a drill pipe target detection model;
[0059] Specifically, this step is to randomly divide the labeled Luoyang shovel drill rod target sample image set into a training set and a test set according to a preset ratio of 7:3, input the training set into the YOLOv5 network for training, and use the test set for detection to establish the Luoyang shovel drill rod target detection model; when evaluating the Luoyang shovel drill rod target detection model based on the test set, the precision rate, recall rate and class average precision MAP are used to evaluate the model accuracy;
[0060] Among them, the environment for training and testing the YOLO v5 network in this step is a graphics card version GeForce GTX1080Ti or above, a running memory of 12G or above, and a storage memory of 1T or above; the software environment used is Pytorch 1.6.0 or above, CUDA 10.0 or above, Python 3.7 or above; the operating system is Windows 10;
[0061] S4. Detect the process video using the drill rod target detection model to obtain the frame number of the drill rod in all frame images in the process video, and obtain the relative position coordinates of the drill rod in the current frame image; draw a scatter plot of the drill rod target motion trajectory in the process video with the frame number of the drill rod as the horizontal axis and the vertical height of the drill rod in the frame image where the drill rod is located as the vertical axis;
[0062] Specifically, this step is to detect the Luoyang shovel process video through the Luoyang shovel drill rod target detection model. After the Luoyang shovel process video is input into the Luoyang shovel drill rod target detection model, the video is first split frame by frame and its size is standardized to 640x640, and then it enters the backbone network, neck network and output end in turn to perform convolution, batch normalization, activation function and other underlying operations, and finally outputs the position information of the drill rod target in each frame image at the output end to obtain the relative position coordinates of the drill rod in the current frame image; the frame number of the frame image where the drill rod is located is the horizontal axis, and the vertical height of the drill rod in the frame image where the drill rod is located is the vertical axis, that is, based on the relative position coordinates of the drill rod in each frame image, the uppermost vertical coordinate of its bounding box is extracted, and this is used as the vertical axis to draw a scatter plot of the motion trajectory of the Luoyang shovel drill rod target in the Luoyang shovel process video, as shown in FIG. Figure 2 As shown;
[0063] S5. Select a sample set from the drill rod target motion trajectory scatter plot, annotate the motion trajectory of each drill rod in the sample set image using an image annotation tool, and establish a drill rod motion trajectory sample set; divide the drill rod motion trajectory sample set into a training set and a test set, input the training set into a YOLOv5 network for training, and perform detection using the test set to establish a drill rod counting network model;
[0064] In this step, the scatter plot of the target motion trajectory of the drill rod of the Luoyang shovel successfully converts the motion law of the drill rod into an intuitive and characteristic two-dimensional image, and the number of drill rods is converted into the number of times the motion law of the drill rod in the image is repeated. The YOLOv5 network is used to learn this feature and establish a drill rod counting network model. The drill rod counting network model obtained through training detects the number of times the motion law of the drill rod is repeated, which is the number of times the drill rod is pulled out in the video.
[0065] Specifically, this step is to use the rectangular bounding box tool of LabelImg to mark the motion trajectory of each drill rod in the scatter plot of the target motion trajectory of the Luoyang shovel drill rod, and establish a sample set of the motion trajectory of the Luoyang shovel drill rod; when the sample set of the motion trajectory of the Luoyang shovel drill rod is randomly divided into a training set and a test set according to a preset ratio of 7:3, the training set is input into the YOLOv5 network constructed in step S1 for training, so that it can learn the law of the motion trajectory of each drill rod, and the test set is used for detection to establish a network model for counting drill rods of the Luoyang shovel;
[0066] Among them, the environment for training and testing the YOLO v5 network in this step is a graphics card version GeForce GTX1080Ti or above, a running memory of 12G or above, and a storage memory of 1T or above; the software environment used is Pytorch 1.6.0 or above, CUDA 10.0 or above, Python 3.7 or above; the operating system is Windows 10;
[0067] S6. Detect the drill rod target motion trajectory scatter plot through the drill rod counting network model to obtain the number of repetitions of the drill rod motion law in the drill rod target motion trajectory scatter plot, that is, the total number of drill rods pulled in the process video;
[0068] Specifically, this step is to detect the scatter plot of the target motion trajectory of the Luoyang shovel drill rod through the Luoyang shovel drill rod counting network model. First, its size is standardized to 640x640, and then it enters the backbone network, neck network and output end in turn to perform convolution, batch normalization, activation function and other underlying operations. Finally, the number of repetitions of the drill rod motion law in the scatter plot is output at the output end, that is, the total number of drill rods pulled in the Luoyang shovel process video;
[0069] S7, calculating the depth of the well based on the total number of drill rods and the vertical height ratio of the first drill rod length to the standard drill rod in the drill rod target motion trajectory scatter diagram;
[0070] The calculation formula for the drilling depth is:
[0071] H=H 1 *h 1 / H 2 +(n-1)h;
[0072] Among them, for the scatter plot of the target motion trajectory of the Luoyang shovel drill rod, where h 1 is the actual length of the drill rod, n is the total number of drill rods pulled in the Luoyang shovel process video, H 1 is the length of the first drill rod in the scatter plot of the target motion trajectory of the Luoyang shovel drill rod, that is, the number of frames in which the drill rod appears when the scatter plot of the target motion trajectory of the Luoyang shovel drill rod is detected based on the Luoyang shovel drill rod counting network model, and the average length of the drill rod in the first two frames after the first drill rod appears in the scatter plot of the target motion trajectory of the drill rod, H 2 The maximum length of the drill rod in the scatter plot of the target motion trajectory of the Luoyang shovel drill rod, that is, the standard length of the drill rod;
[0073] The present invention realizes the transformation from human eye video browsing mode to artificial intelligence mode, shortening the video inspection time of drilling process by 85%. It not only reduces the labor of video quality control by more than 80%, but also greatly improves the efficiency and quality of drilling quality monitoring. It plays an important role in promoting cost reduction, quality improvement and efficiency increase of exploration projects, and successfully realizes the automated quality inspection of drilling process video and drilling depth.
[0074] It should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention is described in detail with reference to the above embodiments, those skilled in the art can still modify the technical solutions described in the above embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A quality control method for Luoyang shovel video automated detection of drilling depth, characterized in that: The following steps are involved: S1. Build YOLOv5 network; S2, obtaining a drill rod target sample image set and annotating the drill rods therein using an image annotation tool to obtain the relative position coordinates of the drill rods in the current frame image; S3, dividing the labeled drill pipe target sample image set into a training set and a test set, inputting the training set into the YOLOv5 network for training, and performing detection through the test set to establish a drill pipe target detection model; S4. Detect the process video using the drill rod target detection model to obtain the frame number of the drill rod in all frame images in the process video, and obtain the relative position coordinates of the drill rod in the current frame image; draw a scatter plot of the drill rod target motion trajectory in the process video with the frame number of the drill rod as the horizontal axis and the vertical height of the drill rod in the frame image where the drill rod is located as the vertical axis; S5. Select a sample set from the drill rod target motion trajectory scatter plot, annotate the motion trajectory of each drill rod in the sample set image using an image annotation tool, and establish a drill rod motion trajectory sample set; divide the drill rod motion trajectory sample set into a training set and a test set, input the training set into a YOLOv5 network for training, and perform detection using the test set to establish a drill rod counting network model; S6. Detect the drill rod target motion trajectory scatter plot through the drill rod counting network model to obtain the number of repetitions of the drill rod motion law in the drill rod target motion trajectory scatter plot, that is, the total number of drill rods pulled in the process video; S7. Calculate the drilling depth based on the total number of drill rods and the vertical height ratio of the first drill rod length to the standard drill rod in the drill rod target motion trajectory scatter diagram.
2. The quality control method for the Luoyang shovel video automated detection of drilling depth according to claim 1 is characterized in that: In step S1, the architecture of the YOLOv5 network includes an input end, a backbone network, a neck network and an output end; The input of the YOLOv5 network uses the Mosaic data enhancement algorithm, the adaptive anchor box calculation algorithm, and the adaptive image scaling algorithm; The backbone network uses Focus structure and CSPDarknet to extract features of frame images; The neck network uses FPN structure and PAN structure to fuse the features from the backbone network; The output end uses GIOU_Loss as the regression loss function for target positioning; In the formula, A is the predicted box, B is the real box, C is the minimum convex set of A and B, that is, the minimum circumscribed rectangle of A and B, and IoU is the intersection over union of the boxes.
3. The quality control method for the Luoyang shovel video automated detection of drilling depth according to claim 1 is characterized in that: In step S2, the image annotation tool uses the rectangular bounding box tool of LabelImg.
4. The quality control method for the Luoyang shovel video automated detection of drilling depth according to claim 1 is characterized in that: In step S3, when the labeled drill pipe target sample image set is divided into a training set and a test set, the ratio of the training set to the test set is 7:
3.
5. The quality control method for the Luoyang shovel video automated detection of drilling depth according to claim 1 is characterized in that: In step S4, the process video includes a Luoyang shovel process video.
6. The quality control method for the Luoyang shovel video automated detection of drilling depth according to claim 1 is characterized in that: In step S5, when the drill rod motion trajectory sample set is divided into a training set and a test set, the ratio of the training set to the test set is 7:
3.
7. The quality control method for the Luoyang shovel video automated detection of drilling depth according to claim 1 is characterized in that: In step S7, the calculation formula for the drilling depth is: H=H1*h1 / H2+(n-1)h; Where h1 is the actual length of the drill rod, n is the total number of drill rods, H1 is the length of the first drill rod in the drill rod target motion trajectory scatter diagram, the length of the first drill rod is the average length of the drill rod in the first two frames of the drill rod target motion trajectory scatter diagram, and H2 is the maximum length of the drill rod in the drill rod target motion trajectory scatter diagram, that is, the standard length of the drill rod.
