A forward-looking drilling video image fissure intelligent identification and quantitative characterization method and system
By improving the YOLOv8 and Mask R-CNN models and combining SURF and the Lucas-Kanade method of optical flow, the accuracy and efficiency problems of crack identification and quantitative characterization in complex backgrounds were solved, achieving high-precision crack identification and dynamic tracking, and providing more accurate crack geometric information.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA UNIV OF MINING & TECH
- Filing Date
- 2025-04-07
- Publication Date
- 2026-07-03
AI Technical Summary
Existing methods for crack identification and quantitative characterization are insufficient in terms of accuracy and efficiency in the field of geotechnical engineering, especially in complex backgrounds where it is difficult to accurately identify and process complex crack geometries.
An improved YOLOv8 model is used for crack detection, combined with an optimized Mask R-CNN model for segmentation. Cross-frame matching and tracking are performed using SURF feature matching and Lucas-Kanade optical flow method to extract crack morphological features, thereby improving the accuracy and efficiency of crack identification and quantitative characterization.
It significantly improves the accuracy and robustness of fracture identification, enhances dynamic tracking capabilities, and provides high-precision fracture geometry information, providing reliable data support for rock mass stability assessment and geological disaster prevention.
Smart Images

Figure CN120279464B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of geotechnical engineering analysis, resource extraction design, and disaster early warning, and specifically relates to a method and system for intelligent identification and quantitative characterization of fractures in forward-looking borehole video images. Background Technology
[0002] In fields such as mining engineering, geotechnical engineering, and geological disaster prevention, forward-looking borehole imaging technology acquires high-resolution images of the interior of rock boreholes, accurately recording the characteristics and structure of fractures. This makes it a crucial tool for fracture identification and analysis in underground engineering projects such as mines and tunnels. Analysis of forward-looking borehole images provides a deeper understanding of the fracture characteristics of underground rock masses, offering precise data for rock mass stability assessment and support design, and ultimately effectively guiding the safe and optimized design of underground engineering projects.
[0003] However, traditional crack identification methods rely heavily on manual observation, which is inefficient and susceptible to subjective factors. While technological advancements have led to automated methods such as edge detection, texture analysis, and morphological processing, improving efficiency, false positives and false negatives still occur in complex backgrounds. In recent years, Convolutional Neural Network (CNN) models have made progress by automatically extracting crack image features, but limitations remain when handling high-resolution and complex background images. To address this, advanced CNN models like ResNet and Inception, through residual connections and multi-scale feature extraction mechanisms, have significantly improved the accuracy and robustness of crack identification, but false positives and false negatives may still occur in complex backgrounds. Meanwhile, object detection models also play a crucial role in crack identification. The YOLO series models (such as YOLOv5, YOLOv6, and YOLOv7) possess high real-time detection capabilities, but still fall short in fine-grained crack segmentation. Although Faster R-CNN demonstrates superior accuracy, its high computational complexity limits its widespread use in real-time applications. Single detection models have limitations when dealing with complex crack geometries, especially in terms of detail processing.
[0004] Therefore, in the field of geotechnical engineering, the accuracy and efficiency of existing methods for crack identification and quantitative characterization need to be improved. Summary of the Invention
[0005] To improve the accuracy and efficiency of fracture identification and quantitative characterization in forward borehole images, especially in complex geological contexts, and to provide more accurate and comprehensive fracture information, this invention provides a method and system for intelligent identification and quantitative characterization of fractures in forward borehole video images. This method and system can provide more accurate fracture geometric information and provide reliable data support for rock mass stability assessment, support design, and geological disaster prevention.
[0006] To achieve the above objectives, the present invention provides the following solution:
[0007] A method for intelligent identification and quantitative characterization of cracks in forward-looking borehole video images, the method comprising:
[0008] Step 1: Use the improved YOLOv8 model to detect cracks in the forward-looking borehole video and generate bounding boxes for the crack regions.
[0009] Step 2: Use the optimized Mask R-CNN model to segment the region within the bounding box of the crack area to obtain the crack mask;
[0010] Step 3: Extract the crack morphology features from the crack mask;
[0011] Step 4: Based on the crack region and crack morphology feature parameters, feature matching SURF and optical flow method Lucas-Kanade are used to realize cross-frame matching and tracking of cracks, and crack length and attitude change are calculated.
[0012] Preferably, the method for detecting cracks in forward-looking borehole videos using an improved YOLOv8 model includes:
[0013] A Capsule layer is added after the C2f layer in the Neck part of the YOLOv8 model to transmit and aggregate feature information through a dynamic routing mechanism and capture the spatial relationship of the cracks.
[0014] Preferably, the method for segmenting the region within the bounding box of the crack region using an optimized Mask R-CNN model to obtain the crack mask includes:
[0015] Introducing a boundary-weighted binary cross-entropy loss function, by defining the weight matrix... W Weights are assigned to the fracture boundary region; the expression is:
[0016]
[0017] In the formula, The weighted segmentation loss function; For real labels, 0 represents the background and 1 represents the crack; For predicting pixels The probability that it belongs to a crack. pixels in the weight matrix The weights;
[0018] The weight matrix is calculated based on the crack gradient information and edge region, guiding the Mask R-CNN model to focus on the boundary region of the crack.
[0019] Preferably, the method for guiding the Mask R-CNN model to focus on the boundary region of the crack, based on the crack gradient information and edge region calculation, includes:
[0020] The Sobel operator is used to calculate the horizontal and vertical gradients in the image, i.e., the borehole video frame. G ( x , y And generate an edge intensity map, analyze the edge intensity at each location in the image, and calculate the gradient as follows:
[0021]
[0022] In the formula, G x ( x , y )and G y ( x , y ) represent the gradients of the image in the horizontal and vertical directions, respectively;
[0023] Edge information in the image is extracted using the Canny edge detection method. C ( x , y The distance transformation is used to calculate the distance from each pixel to the nearest boundary. The gradient magnitude is combined with the Canny edge detection results, and weights based on the distance transformation are introduced. The distance values are mapped to the [0,1] interval through a normalization operation to assign weights to the crack edge region. The distance transformation is as follows:
[0024]
[0025] In the formula, dist ( x , y ) represents the distance from the current pixel to the nearest boundary; max( x , y () represents the maximum distance from all pixels in the image to the nearest boundary;
[0026] The weight matrix is defined as the product of the gradient magnitude and the edge detection result. W ( x,y ), and combined with the results of distance transformation, guide the Mask R-CNN model to focus on the boundary region of the crack, the calculation formula is:
[0027]
[0028] In the formula, α and β To adjust the parameters, control the relative importance of gradient information, edge detection, and distance transformation; min(W ) and max( W ) are the minimum and maximum values of all pixels in the weight matrix, respectively.
[0029] Preferably, the method for extracting the crack morphology features in the crack mask includes:
[0030] The area of the crack is calculated by counting the number of non-zero pixels in the binary image, and the perimeter is calculated using the boundary point set of foreground pixels. The Zhang-Suen thinning algorithm is used to extract the skeleton of the crack, and the bifurcation points in the skeleton are identified by neighbor analysis. The crack width is calculated by distance transformation, and the width of the bifurcation points is processed to obtain the average width of the crack. At the same time, the centroid position of the crack is extracted by the image moment method, and the crack direction is determined by fitting the crack ellipse.
[0031] Preferably, the method for cross-frame matching and tracking of cracks using feature matching SURF and optical flow method Lucas-Kanade includes:
[0032] In the crack mask obtained by the two-level network detection, the SURF algorithm is used to extract key feature points of the crack region and calculate feature descriptor v for inter-frame matching.
[0033] The KNN algorithm is used based on the Euclidean distance of feature descriptors. d ( v i , v j Find the nearest neighbor feature point for each feature point to initially establish the matching relationship of crack feature points across multiple frames;
[0034] The Lucas-Kanade optical flow method is used to further track the positional changes of feature points in the image sequence, especially in scenes where the position of the crack changes little in consecutive frames. For the matched feature points, the motion vector is calculated by optical flow to obtain the motion trajectory of the crack in consecutive frames and track the changes of the crack.
[0035] By combining the motion vectors of optical flow tracking with the results of feature matching, the position and morphological changes of crack feature points are tracked frame by frame. For the matched feature points in adjacent frames, the length of the crack is calculated by accumulating the distance between the feature points along the crack trajectory.
[0036] This invention provides an intelligent identification and quantitative characterization system for cracks in forward-looking borehole video images. The system is used to implement the aforementioned method and includes a detection module, a segmentation module, an extraction module, and a calculation module.
[0037] The detection module is used to detect cracks in the forward-looking borehole video using an improved YOLOv8 model and generate a bounding box for the crack region.
[0038] The segmentation module is used to segment the region within the bounding box of the crack region using an optimized Mask R-CNN model to obtain a crack mask.
[0039] The extraction module is used to extract the crack morphology features in the crack mask;
[0040] The calculation module is used to perform cross-frame matching and tracking of cracks based on crack region and crack morphology feature parameters, using feature matching SURF and optical flow method Lucas-Kanade, and to calculate crack length and attitude changes.
[0041] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0042] 1. Improved accuracy in crack identification and segmentation. Traditional crack identification methods (such as edge detection and threshold segmentation) often suffer from false detections, false negatives, and inefficiency, especially in complex backgrounds where accurate crack identification is difficult. This invention, by combining YOLOv8 and Mask R-CNN models, utilizes deep learning technology to achieve rapid detection and fine segmentation, significantly improving the accuracy and robustness of crack identification. YOLOv8 can quickly detect crack locations in a short time, while Mask R-CNN improves the accuracy of crack boundaries through fine segmentation, performing particularly well in complex backgrounds and small crack identification. This allows crack identification to be more accurately applied to risk assessment and monitoring in underground engineering projects such as mines and tunnels.
[0043] 2. Enhanced Dynamic Crack Tracking Capabilities. This invention employs a cross-frame matching and dynamic tracking technique combining the SURF algorithm and the Lucas-Kanade optical flow method, enabling real-time and accurate tracking of crack development in video. This technology addresses the problem of traditional methods' inability to effectively track crack evolution dynamically. By tracking the crack's positional changes across multiple video frames, the invention can accurately calculate the crack's length, orientation, and evolution process, providing dynamic data on crack development trends, thereby better supporting safety monitoring and optimized design in underground engineering.
[0044] 3. Provides high-precision quantitative characterization of fractures. This invention utilizes image processing and mathematical calculation techniques to extract morphological features of fractures, such as area, width, direction, and centroid, for precise quantitative analysis. Particularly in details such as fracture width, perimeter, and skeleton extraction, this invention provides a more accurate and refined quantitative method. This data helps engineers comprehensively understand the geometric morphology of fractures and their variation patterns, providing a scientific basis for rock mass stability analysis, support design, and geological disaster prevention. Compared with traditional qualitative or coarse quantitative methods, this invention significantly improves the accuracy and usability of fracture characterization. Attached Figure Description
[0045] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 This is a schematic diagram of the results of rapid identification and fine segmentation of cracks in the forward-looking borehole video in an embodiment of the present invention;
[0047] Figure 2 This is a schematic diagram of the crack feature extraction and matching results from the forward-looking borehole video in an embodiment of the present invention;
[0048] Figure 3 The following are the fracture parameter characterization results from the forward-looking borehole video in this embodiment of the invention: (a) fracture length characterization; (b) fracture width characterization; (c) fracture angle characterization;
[0049] Figure 4 This is a schematic diagram of the video association dynamic matching method in an embodiment of the present invention;
[0050] Figure 5 This is a visualization result of the crack parameter characterization in the front-view borehole video in an embodiment of the present invention;
[0051] Figure 6 This is an architecture diagram of the dual-strategy identification and representation method in an embodiment of the present invention;
[0052] Figure 7 This is an optimized diagram of the YOLOv8 network structure in an embodiment of the present invention. Detailed Implementation
[0053] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0054] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0055] Example 1
[0056] This invention provides a method for intelligent identification and quantitative characterization of cracks in forward-looking borehole video images, the specific steps of which are as follows:
[0057] Step 1: Use the improved YOLOv8 model to quickly detect cracks in the forward-looking borehole video and generate the bounding box of the crack region.
[0058] Step 2: Based on the crack bounding box described in Step 1, the region within the crack bounding box is finely segmented using the Mask R-CNN model. A boundary-weighted binary cross-entropy loss function is introduced, and a weight matrix is designed. W By assigning higher weights to the crack boundary region, the model segmentation accuracy can be improved, thereby obtaining the crack mask;
[0059] Step 3: Extract the crack morphology features from the crack mask described in Step 2, count the number of non-zero pixels in the binary image to calculate the crack area, and calculate the perimeter using the foreground pixel boundary point set; use the Zhang-Suen thinning algorithm to extract the crack skeleton, and identify the bifurcation points in the skeleton through neighbor analysis; calculate the crack width through distance transformation, and process the width of the bifurcation points to obtain the average width of the crack; simultaneously, use the image moment method to extract the centroid position of the crack, and fit the crack ellipse to determine the crack direction;
[0060] Step 4: Based on the fracture region and fracture morphology feature parameters described in Step 1 and Step 3, cross-frame matching and tracking of the fracture are achieved using Feature Matching (SURF) and Optical Flow (Lucas-Kanade) methods, and the fracture length and its attitude change are calculated.
[0061] Furthermore, the dual-strategy architecture described above is as follows: Figure 6 As shown.
[0062] Furthermore, the YOLOv8 model mentioned in step one is an improved YOLOv8 model used for rapid crack detection, specifically as follows:
[0063] A Capsule layer is added after the C2f layer in the Neck part of the YOLOv8 model. This layer uses a dynamic routing mechanism to accurately transmit and aggregate feature information, enhancing multi-scale feature fusion capabilities, effectively improving the detection performance of small and complex crack morphologies, capturing the spatial relationships of cracks, and improving the model's generalization ability. Figure 7 As shown.
[0064] Furthermore, the Mask R-CNN model mentioned in step two is an optimized Mask R-CNN model for fine segmentation of the crack region, specifically:
[0065] A boundary-weighted binary cross-entropy loss function is introduced. By defining a weight matrix W, higher weights are assigned to the crack boundary region, thereby improving the model's segmentation accuracy of the boundary region.
[0066] (3)
[0067] In Equation 3, The weighted segmentation loss function; For real labels, 0 represents the background and 1 represents the crack; For predicting pixels The probability that it belongs to a crack. pixels in the weight matrix The weights are calculated by assigning higher weights to pixels closer to the crack boundary, based on the distance of each pixel to the crack boundary: , For pixels Distance to the nearest boundary δ The parameter is used to adjust the rate of weight decay.
[0068] The weight matrix is calculated based on crack gradient information and edge regions, guiding the segmentation model to focus more on the boundary regions of the cracks. First, the horizontal and vertical gradients in the image (i.e., the borehole video frame) are calculated using the Sobel operator. G ( x , y And generate an edge intensity map, analyze the edge intensity at each location in the image, and calculate the gradient as follows:
[0069] (4)
[0070] In Equation 4, G x ( x , y )and G y ( x , y ) represent the gradients of the image in the horizontal and vertical directions, respectively.
[0071] Subsequently, the Canny edge detection method was used to extract edge information from the image. C ( x , y The distance to the nearest boundary of each pixel is calculated using a distance transform. To further enhance the weight of edge regions, the gradient magnitude is combined with the Canny edge detection results, and a weight based on the distance transform is introduced. The distance values are mapped to the [0,1] interval through a normalization operation, assigning higher weights to the crack edge region. The distance changes are as follows:
[0072] (5)
[0073] In Equation 5, dist ( x , y ) represents the distance from the current pixel to the nearest boundary; max( x, y ) represents the maximum distance from all pixels in the image to the nearest boundary.
[0074] Finally, the weight matrix is defined as the product of the gradient magnitude and the edge detection result. W ( x,y This weighted approach, combined with the results of distance transformation, optimizes the model's segmentation accuracy in the crack boundary region. This weighted strategy allows the model to pay more attention to the edge details of the cracks during training, thereby improving overall segmentation performance.
[0075] (6)
[0076] In Equation 6, α and β To adjust the parameters, control the relative importance of gradient information, edge detection, and distance transformation; min( W ) and max( W ) are the minimum and maximum values of all pixels in the weight matrix, respectively.
[0077] Furthermore, in the crack feature extraction method described in step three, in order to avoid interference from feature points at the crack edge and surrounding area, the centroid of the first frame crack mask image is used as the center point for crack tracking, and the range initially identified by YOLOv8 is used as the feature point detection area, thereby extracting the initial feature points of the crack in the first frame.
[0078] Furthermore, the specific implementation steps of the aforementioned crack dynamic tracking and cross-frame matching method are as follows:
[0079] Step 1: In the crack mask obtained by the two-level network detection, the SURF algorithm is used to extract the key feature points of the crack region and calculate the feature descriptor v for inter-frame matching.
[0080] (7)
[0081] In Equation 17: dx The horizontal Haar wavelet response; dy The vertical Haar wavelet response; ∑d x Let ∑∣d be the sum of the Haar wavelet responses in the horizontal direction within the neighborhood of the feature point. x | represents the sum of the absolute values of the Haar wavelet responses in the horizontal direction within the neighborhood of the feature point; ∑d y Let ∑∣d be the sum of the Haar wavelet responses in the vertical direction within the neighborhood of the feature point. y | represents the sum of the absolute values of the Haar wavelet responses in the vertical direction within the neighborhood of the feature point.
[0082] Step 2: Use the KNN algorithm based on the Euclidean distance of feature descriptorsd ( v i , v j The nearest neighbor feature point is found for each feature point to initially establish the matching relationship between crack feature points across multiple frames, ensuring that these feature points belong to the same crack region. The Euclidean distance matching calculation is as follows:
[0083] (8)
[0084] In Equation 18: For feature vectors; v i k , v j k It is the k-th component of the eigenvector; n is the dimension of the feature vector.
[0085] Step 3: Use optical flow (Lucas-Kanade) to further track the positional changes of feature points in the image sequence, especially for scenes where the position of the crack changes little in consecutive frames. For the matched feature points, calculate their motion vectors using optical flow to obtain the motion trajectory of the crack in consecutive frames, and further accurately track the changes of the crack.
[0086] (9)
[0087] Solve the optical flow equation using the least squares method:
[0088] (10)
[0089] In equations 19 and 20: I x For the image in x Gradient in direction; I y For the image in y Gradient in direction; I t For the image in time t Gradient (time derivative) on the time axis; u For pixels in x Optical flow in direction (motion vector component); v For pixels in y Optical flow in a direction (motion vector component).
[0090] Step 4: Combine the motion vectors from optical flow tracking with the results of feature matching to track the position and morphological changes of crack feature points frame by frame. For matched feature points in adjacent frames, the length of the crack is calculated by accumulating the distance between feature points along the crack trajectory. To avoid duplicate matching and tracking interruptions when summarizing cracks across multiple frames, the RANSAC algorithm is used to remove mismatched feature points, ensuring the accuracy of crack tracking results.
[0091] (11)
[0092] In Equation 21: D et( H ) is the determinant of the Hessian matrix; L xx For the image at point ( x , y ) location and scale σ The second derivative of the underside ( x direction); L yy For the image at point ( x , y ) location and scale σ The second derivative of the under-order derivative ( y direction); L xy For the image at point ( x , y ) location and scale σ Mixed derivative under ( xy direction).
[0093] Furthermore, in the quantitative characterization, the maximum trajectory length is used as a reasonable alternative to the crack length.
[0094] This invention improves the feature fusion method of the YOLOv8 model, optimizes the segmentation loss function of Mask R-CNN, and coordinates the real-time processing performance and computational overhead of the two-level models in a cascaded manner, significantly improving the speed of fracture identification while ensuring high detection accuracy. This invention mainly includes fracture bounding box generation, fracture mask extraction, analysis of fracture morphological features (such as area, width, centroid, etc.), and dynamic tracking and cross-frame matching of fractures, effectively extracting information such as fracture trace length, aperture, and orientation from borehole video images. This invention uses feature matching and optical flow to dynamically track fractures, directly and accurately quantifying fracture features from borehole video images, avoiding the influence of adverse factors such as borehole video acquisition, stitching, and environmental conditions on identification and characterization. This invention can provide more accurate fracture geometric information, providing reliable data support for rock mass stability assessment, support design, and geological disaster prevention.
[0095] Example 2
[0096] The forward-looking borehole image in this embodiment is from the roof of a mining roadway in a mine in Jiaozuo mining area. The borehole depth is 15 m, the diameter is 50 mm, the resolution is 800×600 mm, and the imaging speed is 0.5 m / min.
[0097] The specific implementation steps are as follows: Figures 1 to 5 As shown, the intelligent identification and quantitative characterization method for cracks in forward-looking borehole video images according to the present invention is detailed below:
[0098] Step 1: Use the YOLOv8 model to quickly detect cracks in the forward-looking drilling video and generate crack bounding boxes, such as... Figure 1 As shown in (a) and (b) in the text;
[0099] Step 2: The crack bounding box region is cropped and used as input to the Mask R-CNN model. The crack region within the bounding box is then finely segmented to obtain the crack mask, such as... Figure 1 As shown in (c), (d), and (e);
[0100] Step 3: Use image processing techniques and mathematical calculations to extract the morphological features in the crack mask, including parameters such as area, width, orientation, and centroid in each video frame, as shown in (f), (g), and (h) in the figure;
[0101] Step 4: Use Feature Matching (SURF) and Optical Flow (Lucas-Kanade) to achieve cross-frame matching and tracking of cracks (process as follows). Figure 4 As shown), the development process of the fracture is dynamically tracked, and the changes in fracture length and orientation are calculated. Figure 2 As shown.
[0102] Quantitative characterization results of cracks are as follows Figure 3 As shown, four cracks were detected in this video segment. According to... Figure 3 (a) and visualization results (e.g.) Figure 5 As shown in the figure, crack 1 has the longest feature point trajectory length, reaching 672.03 mm, with data concentrated between 300 mm and 500 mm, indicating that crack 1 is large in scale and highly extensible. A few data points are less than 200 mm, indicating that crack 1 has relatively small local variability, but the overall trend is that it is a relatively long crack. Crack 2 has a maximum length of 437.40 mm, slightly shorter than crack 1, and its data points are distributed across multiple length ranges, showing a relatively uniform expansion of the local crack. Crack 3 has a maximum length of 557.46 mm, close to that of crack 2, with a sparser data distribution, concentrated between 390 mm and 400 mm, indicating that the feature point trajectory length of crack 3 is relatively average and has little variation, possibly indicating a relatively regular crack. Crack 4 has a maximum length of 210.91 mm, significantly shorter than the other cracks.
[0103] Figure 3 (b) and visualization results (e.g.) Figure 5 As shown in the figure, the average width of crack 1 is 13.77 mm, and its width distribution ranges widely, from 1.20 mm to 19.60 mm, indicating that the width of crack 1 varies greatly. The data at the wider end (>10 mm) are more concentrated, showing a higher degree of cracking. The average width of crack 2 is 8.86 mm, significantly smaller than that of crack 1, and its width variation is smaller, mainly concentrated between 7 mm and 18 mm. The average width of crack 3 is 13.17 mm, close to that of crack 1, but its width distribution is more uniform, concentrated between 11.20 mm and 19.70 mm, with fewer extreme width fluctuations. The average width of crack 4 is 8.10 mm, slightly smaller than that of crack 2, and its width distribution is extremely concentrated with almost no obvious fluctuations.
[0104] Figure 3 (c) and visualization results (such as) Figure 5 As shown in the figure, cracks 1 and 2 have a wide range of angles and diverse directions, with crack 1 ranging from 13.45° to 156.80° and crack 2 from 50.60° to 110.24°. In contrast, cracks 3 and 4 have a narrower range of angles and exhibit stronger directional consistency, with crack 3 ranging from 76.45° to 107.49° and crack 4 at 102.06°.
[0105] Reliability basis: By combining advanced deep learning models and dynamic feature tracking technology, the patent's crack parameter characterization results not only approach the accuracy of manual annotation (see Table 1), but also surpass the capabilities of traditional image processing, especially in crack dynamic evolution analysis and large-scale crack identification applications, crack boundary processing, etc.
[0106] Table 1 Quantitative characterization results of crack length
[0107]
[0108] Example 3
[0109] This invention provides a method and system for intelligent identification and quantitative characterization of cracks in forward-looking borehole video images. The system is used to implement the aforementioned method and includes a detection module, a segmentation module, an extraction module, and a calculation module.
[0110] The detection module is used to detect cracks in the forward-looking borehole video using an improved YOLOv8 model and generate bounding boxes for the crack regions.
[0111] The segmentation module is used to segment the region within the bounding box of the crack area using the Mask R-CNN model, introducing a boundary-weighted binary cross-entropy loss function and designing a weight matrix.W We assign weights to the fracture boundary regions to obtain the fracture mask;
[0112] The extraction module is used to extract the crack morphology features in the crack mask;
[0113] The calculation module is used to perform cross-frame matching and tracking of cracks based on crack region and crack morphology feature parameters, using feature matching SURF and optical flow method Lucas-Kanade, and to calculate crack length and attitude changes.
[0114] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made to the technical solutions of the present invention by those skilled in the art without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.
Claims
1. A method for intelligent identification and quantitative characterization of cracks in forward-looking borehole video images, characterized in that, The method includes: Step 1: Use the improved YOLOv8 model to detect cracks in the forward-looking borehole video and generate bounding boxes for the crack regions. Step 2: Use the optimized Mask R-CNN model to segment the region within the bounding box of the crack area to obtain the crack mask; Step 3: Extract the crack morphology features from the crack mask; Step 4: Based on the crack region and crack morphology feature parameters, feature matching SURF and optical flow method Lucas-Kanade are used to realize cross-frame matching and tracking of cracks, and crack length and attitude change are calculated. Methods for detecting cracks in forward-looking borehole videos using an improved YOLOv8 model include: A Capsule layer is added after the C2f layer in the Neck part of the YOLOv8 model to transmit and aggregate feature information through a dynamic routing mechanism and capture the spatial relationship of the cracks. The method for segmenting the region within the bounding box of the fracture region using an optimized Mask R-CNN model to obtain the fracture mask includes: Introducing a boundary-weighted binary cross-entropy loss function, by defining the weight matrix... W Weights are assigned to the fracture boundary region; the expression is: In the formula, The weighted segmentation loss function; The labels are real; 0 represents the background and 1 represents the crack. For predicting pixels The probability that it belongs to a crack. pixels in the weight matrix The weights; The weight matrix is calculated by combining the gradient magnitude of the crack region, the Canny edge detection results, and the normalized results of the distance change from each pixel to the nearest boundary of the crack, and assigning weights to guide the Mask R-CNN model to focus on the boundary region of the crack and obtain the crack mask.
2. The method according to claim 1, characterized in that, The weight matrix is calculated based on crack gradient information and edge regions. Methods to guide the Mask R-CNN model to focus on the boundary regions of cracks include: The Sobel operator is used to calculate the horizontal and vertical gradients in the image, i.e., the borehole video frame. G ( x , y And generate an edge intensity map, analyze the edge intensity at each location in the image, and calculate the gradient as follows: In the formula, G x ( x , y )and G y ( x , y ) represent the gradients of the image in the horizontal and vertical directions, respectively; Edge information in the image is extracted using the Canny edge detection method. C ( x , y The distance transformation is used to calculate the distance from each pixel to the nearest boundary. The gradient magnitude is combined with the Canny edge detection results, and weights based on the distance transformation are introduced. The distance values are mapped to the [0,1] interval through a normalization operation to assign weights to the crack edge region. The distance transformation is as follows: In the formula, dist ( x , y ) represents the distance from the current pixel to the nearest boundary; max( x , y () represents the maximum distance from all pixels in the image to the nearest boundary; The weight matrix is defined as the product of the gradient magnitude and the edge detection result. W ( x,y ), and combined with the results of distance transformation, guide the Mask R-CNN model to focus on the boundary region of the crack, the calculation formula is: In the formula, α and β To adjust the parameters, control the relative importance of gradient information, edge detection, and distance transformation; min( W ) and max( W ) are the minimum and maximum values of all pixels in the weight matrix, respectively.
3. The method according to claim 1, characterized in that, The method for extracting the crack morphology features from the crack mask includes: The area of the crack is calculated by counting the number of non-zero pixels in the binary image, and the perimeter is calculated using the boundary point set of foreground pixels. The Zhang-Suen thinning algorithm is used to extract the skeleton of the crack, and the bifurcation points in the skeleton are identified by neighbor analysis. The crack width is calculated by distance transformation, and the width of the bifurcation points is processed to obtain the average width of the crack. At the same time, the centroid position of the crack is extracted by the image moment method, and the crack direction is determined by fitting the crack ellipse.
4. The method according to claim 1, characterized in that, Methods for cross-frame matching and tracking of cracks using SURF feature matching and the Lucas-Kanade optical flow method include: In the crack mask obtained by the two-level network detection, the SURF algorithm is used to extract key feature points of the crack region and calculate feature descriptor v for inter-frame matching. The KNN algorithm is used based on the Euclidean distance of feature descriptors. d ( v i , v j Find the nearest neighbor feature point for each feature point to initially establish the matching relationship of crack feature points across multiple frames; The Lucas-Kanade optical flow method is used to further track the positional changes of feature points in the image sequence. For the matched feature points, the motion vector is calculated by optical flow to obtain the motion trajectory of the crack in consecutive frames and track the changes of the crack. By combining the motion vectors of optical flow tracking with the results of feature matching, the position and morphological changes of crack feature points are tracked frame by frame. For the matched feature points in adjacent frames, the length of the crack is calculated by accumulating the distance between the feature points along the crack trajectory.
5. A forward-looking borehole video image crack intelligent identification and quantitative characterization system, the system being used to implement the method described in any one of claims 1-4, characterized in that, The system includes: a detection module, a segmentation module, an extraction module, and a calculation module; The detection module is used to detect cracks in the forward-looking borehole video using an improved YOLOv8 model and generate a bounding box for the crack region. The segmentation module is used to segment the region within the bounding box of the crack region using an optimized Mask R-CNN model to obtain a crack mask. The extraction module is used to extract the crack morphology features in the crack mask; The calculation module is used to perform cross-frame matching and tracking of cracks based on crack region and crack morphology feature parameters, using feature matching SURF and optical flow method Lucas-Kanade, and to calculate crack length and attitude changes.