Rock mass joint network identification and amplification method based on SinGAN model

By using a rock mass joint network identification and magnification method based on the SinGAN model, the global structure and local details of the joint network can be learned from a single image. The generated joint network is closer to the real geological features, which solves the problems of structural distortion and insufficient multi-scale coupling representation in traditional methods during scale expansion, and improves modeling efficiency.

CN121074635APending Publication Date: 2025-12-05CENT SOUTH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511115376.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-11
Publication Date
2025-12-05

AI Technical Summary

Technical Problem

Existing rock mass joint network modeling methods are difficult to effectively extend to larger scales, and there are problems of structural distortion and insufficient multi-scale coupling representation during the scale expansion process.

Method used

A rock mass joint network identification and amplification method based on the SinGAN model is adopted. Through multi-feature fusion and binarization processing with directional growth, combined with image pyramid training of the SinGAN model, end-to-end joint network identification and amplification are achieved.

Benefits of technology

The generated joint network is closer to real geological features and has strong robustness. It can effectively reduce interference from non-joint structures, improve edge integrity and joint connectivity, and solve the computational bottleneck of traditional methods in cross-scale modeling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121074635A_ABST
    Figure CN121074635A_ABST
Patent Text Reader

Abstract

The invention discloses a rock mass joint network identification and amplification method based on a SinGAN model, and the method comprises the following steps: carrying out the binarization processing of multi-feature fusion and directional growth on an engineering rock mass joint image, obtaining a binarized image which can be directly used as machine learning input, inputting the obtained binarized image into the SinGAN model, and carrying out the training, and identification and amplification of the rock mass joint network are realized. According to the method, probability distribution or a mechanical model does not need to be preset, the method is a data-driven generation mode, the generated joint network is closer to real geologic features, the robustness to noise and data missing is high, and the modeling efficiency is high. In practical engineering application, the rock mass joint network with the hectometer engineering scale can be generated only by one local shot image, and support is provided for rock mass stability evaluation and the like.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image analysis in mining engineering, and particularly relates to a SinGAN model-based rock mass joint network identification and amplification method. BACKGROUND

[0002] Rock mass joints are naturally formed crack structures inside rocks, and their distribution characteristics (such as density, direction, connectivity, etc.) have a decisive influence on rock mass stability evaluation, underground engineering support design and geological disaster prediction. At present, the modeling methods of rock mass joint networks include artificial field investigation, laser scanning or close-range photogrammetry. Based on these methods, detailed information of the rock mass joint network can be obtained, but it is difficult to extend it to a larger scale due to sparse information. In order to make up for the limitations of measured data, researchers generate joint units that meet the statistical distribution law through a discrete fracture network (DFN) model to construct a joint network model. The advantage of this method is the parameterized modeling capability. In addition, existing researches also integrate the advantages of different methods through multi-source data fusion technology to establish a DFN model that is more consistent with measured data. However, the statistical assumptions of the DFN model and the limitations of the multi-source data fusion algorithm make it difficult to efficiently capture the self-similar fractal characteristics of rock mass joints from the local to the whole, and still face the challenges of structure distortion and insufficient multi-scale coupling representation in the scale expansion process. SUMMARY

[0003] The main purpose of the present application is to provide a SinGAN model-based rock mass joint network identification and amplification method, which does not need to preset a probability distribution or a mechanical model, is a "data-driven" generation mode, and the generated joint network is closer to the real geological characteristics.

[0004] To this end, the SinGAN model-based rock mass joint network identification and amplification method provided by the present application comprises the following steps:

[0005] Step 1: Perform multi-feature fusion and directional growth binaryzation processing on the engineering rock mass joint image to obtain a binary image that can be directly used as machine learning input;

[0006] Step 2: input the binary image obtained in step 1 into the SinGAN model for training to realize identification and amplification of the rock mass joint network.

[0007] Specifically, step 1 specifically comprises the following processes:

[0008] Step 11, pre-processing of rock mass image: read the rock mass image file and load it into the running memory using the imread function; sharpen the image to enhance edge information using the imsharpen function, and by setting and adjusting the sharpening radius and intensity, the details in the image can be more clearly highlighted; in order to improve the accuracy of subsequent processing, the image is enlarged using the imresize function with bicubic interpolation method; finally, local Laplace filtering is realized through the locallapfilt function, combining gradient information of different scales to further enhance the edges and details of the image.

[0009] Step 12, gray scale and gradient processing: first convert the image to a gray scale image, and use the Prewitt operator to calculate the horizontal and vertical gradients of the image. The gradient amplitude reflects the intensity of the edges in the image, which is helpful for subsequent edge detection. Then, the image is converted to the frequency domain after Fourier transform, and a Gaussian filter H(u,v) is applied in the frequency domain to enhance the mid-frequency details:

[0010]

[0011] where u and v are the coordinate variables of the horizontal and vertical directions in the frequency domain respectively, D(u,v) is the distance from the frequency domain point (u,v) to the origin, and σ is the standard deviation. Then the image is restored to the spatial domain through inverse Fourier transform:

[0012] g(x1,y1)=f -1 {F(u,v)·H(u,v)} (2)

[0013] where g(x1,y1) is the result of the spatial domain after processing, x1 and y1 are the pixel coordinates of the spatial domain; f -1 {·} is the inverse Fourier transform operator that converts the frequency domain signal to the spatial domain; F(u,v) is the image after effective noise removal and important feature highlighting.

[0014] Step 13, edge detection: linearly combine the image after adaptive histogram equalization with the gradient amplitude in step 12 to form a multi-feature fusion image. Use nonlinear transformation to adjust the image contrast and further enhance the edge information. Use the Canny edge detection algorithm to extract the edges in the image. In this process, the sensitivity of edge detection is controlled by adjusting the low threshold and high threshold of detection to ensure that high-quality edges are extracted.

[0015] Step 14, direction analysis: perform Hough transform on the edge image to extract the peak corresponding angle and calculate the average angle to determine the main direction of joint;

[0016] By Hough transform of the edge image, the straight line is expressed as ρ = x2cosθ + y2sinθ, and the accumulator A(ρ,θ) counts the collinear points:

[0017] A(ρ,θ) = ∑ (x,y)∈edge points δ(ρ - x2cosθ - y2sinθ) (3)

[0018] In the formula, ρ is the vertical distance of the straight line to the coordinate origin; x2 and y2 are pixel coordinates in the edge image; θ is the angle between the straight line and the positive direction of the x-axis; and δ is the impulse function. According to this, the most significant straight line direction is found, and then the angles θ1, θ1, …, θk corresponding to the top k peaks of the accumulator are selected, and the average angle θ is calculated. k

[0019]

[0020] Step 15, binarization and morphological processing: the Otsu method is used to automatically calculate the optimal threshold, and the image is converted into a binary image. By adjusting the threshold coefficient, the foreground and background can be better separated. Small noise points are removed by opening operation, and then the bwareaopen function is used to remove isolated small regions to further purify the image. According to the main direction of the joint obtained in step 14, a multi-scale growing algorithm is constructed to expand the connected regions in the image, and a orthogonal compensation mechanism is introduced to repair the cross joint area. By gradually increasing the size of the structure element, the gaps in the image are gradually filled, and the continuity of the joint is enhanced. Through dilation and erosion operations, the connected regions are refined to ensure that the shape of the joint is more regular.

[0021] Step 16, geometric screening and skeleton optimization: geometric screening is used to remove regions that do not meet the conditions, and the major axis, minor axis and area of each connected region are calculated to select regions with relatively large areas to ensure that the final result only contains significant joints. The skeleton S(J) of the final selected joint is obtained by iterative erosion and opening operation, and small branches are removed. The continuity and thickness of the skeleton are enhanced by closing operation and dilation operation:

[0022]

[0023] In the formula,! is erosion; is opening operation; J is the input binary joint region; i is the iteration number; and B is the structure element. Finally, geometric screening is used to remove short skeletons to ensure that the final result only contains significant joints.

[0024] Specifically, the specific training process of step 2 is as follows:

[0025] ​Step 21, constructing image pyramid and initializing network: starting from the original image x0, N times of down-sampling are performed with a scaling factor r to generate an image sequence {x N , x N-1 …x0} (N is the number of scale layers, x N is the coarsest scale, and x0 is the original scale). And the corresponding generator G n and discriminator D n are initialized for each layer (the nth layer, n from 0 to N).

[0026] Step 22, independent training according to scale level: training starts from the coarsest scale (x N ), and after completing the training of this scale, the finer scales (x N-1 to x0) are sequentially trained, and the training processes of each scale are independent of each other.

[0027] Workflow of the nth layer generator G n : the up-sampled version of the generated image of the previous layer and the noise of the current layer are taken as inputs, and then the residual image is output through the residual learning mechanism, and finally the realistic image of the current layer is generated by combining the residual image. For the discriminator, a Markovian discriminator is adopted, the patch size is set to 11x11 pixels, and the average score of all patches is calculated to distinguish whether the input sample is a real image (from the original image sequence) or a generated image (generated by G n ).

[0028] In the whole process, a variety of loss functions are adopted, including the adversarial loss of the generator and the discriminator (WGAN-GP): the loss of the discriminator includes the difference between the score of the real sample and the score of the generated sample, and the gradient penalty term, which ensures that the gradient norm of the discriminator is close to 1.

[0029] Step 23, scale up: using the trained SinGAN model, the joint network image of the rock mass of any scale is generated by adjusting the size of the noise image.

[0030] Specifically, in step 22, when n=N (the coarsest scale), the input of the generator G N is pure noise z N ; when n n is the up-sampled version of the generated image of the previous layer and the noise z n of the current layer.

[0031] Compared with the prior art, the beneficial technical effects of the present application are as follows:

[0032] 1. The adaptive histogram equalization image is combined with the gradient amplitude to realize multi-feature fusion, and the frequency domain Gaussian filter is combined to enhance the medium frequency details, so that the spatial edge texture and the frequency domain medium scale structure are cooperatively optimized. The actual effect of this processing strategy is reflected in the following aspects: in the low-contrast and high-noise field image, the non-joint structure interference can be effectively reduced, the microcrack details can be reserved, and the edge integrity can be improved. The joint main direction is obtained by Hough transform, and a multi-scale directional growth algorithm is constructed based on the joint main direction, that is, the broken joint is expanded and connected along the main direction at different scales, and an orthogonal compensation mechanism is introduced to repair the cross joint and improve the joint connectivity. The generated topological structure is closer to the actual one.

[0033] 2. The pyramid generator architecture of SinGAN can learn the global structure and local details of the joint network from a single binary image without predefining the probability distribution or mechanical equivalent model. Compared with the traditional method which relies on Monte-Carlo simulation or REV assumption, the generalization ability of the present application to complex joint morphology (such as branching, non-uniform rough surface) is stronger, and the generated joint network is closer to the real geological characteristics. Moreover, it has strong robustness to data loss or noise interference.

[0034] 3. The joint recognition and amplification are realized by SinGAN to realize end-to-end learning without step-by-step processing. n Through the residual learning mechanism, a realistic joint network is generated directly from noise and up-sampled images, and the WGAN-GP loss function is combined to optimize the generation quality. Compared with the traditional finite element or discrete element modeling which needs to manually define the contact properties, the modeling efficiency is greatly improved. In addition, G n Since the full convolution structure is adopted, the present application can generate a joint network of any scale by adjusting the size of the noise image, solving the calculation bottleneck in the cross-scale modeling of the traditional method.

[0035] In summary, the present application does not need to predefine the probability distribution or the mechanical model, and is a "data-driven" generation mode. The generated joint network is closer to the real geological characteristics, has strong robustness to noise and data loss, and has high modeling efficiency. In practical engineering applications, only one local image can generate a rock joint network of hundreds of meters in engineering scale, providing support for rock stability evaluation. BRIEF DESCRIPTION OF DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0037] Figure 1 is a flow chart of the method of the present application;

[0038] Figure 2 is a working principle diagram of the SinGAN model in the method of the present application

[0039] Figure 3 is a schematic diagram of the GUI operation interface of the APP created in Matlab;

[0040] Figure 4 is a visualization result in the image processing process based on the Matlab APP;

[0041] Figure 5 is the final processing result of different images based on the Matlab APP.

[0042] Figure 6 is a 3 actual processing result diagram of the method of the present application. DETAILED DESCRIPTION

[0043] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0044] In the description of the present application, it should be understood that the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and therefore cannot be understood as indicating or implying that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application.

[0045] In addition, the terms "first", "second" are only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "multiple" is two or more, unless otherwise specifically limited.

[0046] Referring to Figure 1 and Figure 2A rock mass joint network identification and magnification method based on a SinGAN model, comprising the following steps:

[0047] Step 1, performing multi-feature fusion and directional growth binarization processing on the engineering rock mass joint image to obtain a binarized image that can be directly used as machine learning input;

[0048] Step 2, inputting the binarized image obtained in step 1 into the SinGAN model for training to realize identification and magnification of the rock mass joint network.

[0049] Specifically, step 1 specifically includes the following processes:

[0050] Step 11, pre-processing the rock mass image: using the imread function to read the rock mass image file and loading it into the running memory; using the imsharpen function to sharpen the image to enhance the edge information, and by setting and adjusting the sharpening radius and intensity, the details in the image can be more clearly highlighted; in order to improve the accuracy of subsequent processing, the imresize function is used to magnify the image using bicubic interpolation method; finally, the local laplace filter function is used to realize local laplace filtering, which further enhances the edges and details of the image in combination with gradient information of different scales.

[0051] Step 12, gray scale and gradient processing: first, convert the image to a gray scale image, and use the Prewitt operator to calculate the gradient in the horizontal and vertical directions of the image, and the gradient amplitude reflects the intensity of the edges in the image, which is helpful for subsequent edge detection. Subsequently, the image is converted to the frequency domain after Fourier transform, and then a Gaussian filter H(u,v) is applied in the frequency domain to enhance the middle frequency details:

[0052]

[0053] In the formula, u and v are coordinate variables in the horizontal and vertical directions of the frequency domain respectively, D(u,v) is the distance from the frequency domain point (u,v) to the origin, and sigma is the standard deviation. Then, the image is restored to the spatial domain through inverse Fourier transform:

[0054] g(x1,y1)=f -1 {F(u,v)·H(u,v)} (2)

[0055] In the formula, g(x1,y1) is the result of the processed spatial domain, x1 and y1 are pixel coordinates of the spatial domain respectively; f -1 {·} is the inverse Fourier transform operator, which converts the frequency domain signal to the spatial domain; F(u,v) is the image after effective noise removal and important feature highlighting.

[0056] Step 13, Edge detection: Linearly combine the image after adaptive histogram equalization with the gradient magnitude in step 12 to form a multi-feature fusion image. Use a nonlinear transformation to adjust the image contrast and further enhance the edge information. Use the Canny edge detection algorithm to extract the edges in the image. In this process, adjust the low threshold and high threshold of the detection to control the sensitivity of edge detection to ensure that high-quality edges are extracted.

[0057] Step 14, Direction analysis: Perform Hough transform on the edge image to extract the peak corresponding angle and calculate the average angle to determine the main direction of the joint;

[0058] By performing Hough transform on the edge image, the straight line is represented as ρ = x2cosθ + y2sinθ, and the accumulator A(ρ,θ) counts the collinear points:

[0059] A(ρ,θ) = ∑ (x,y)∈edge points δ(ρ - x2cosθ - y2sinθ) (3)

[0060] In the formula, ρ is the vertical distance from the straight line to the origin; x2, y2 are the pixel coordinates in the edge image; θ is the angle between the straight line and the positive direction of the x-axis; δ is the impulse function. According to this, the most prominent straight line direction is found, and then the top k peak values of the accumulator are selected corresponding to the angles θ1, θ1, …, θ k , and the average angle is calculated

[0061]

[0062] Step 15, Binaryzation and morphological processing: Use the Otsu method to automatically calculate the best threshold value, convert the image to a binary image, and adjust the threshold coefficient to better separate the foreground and background. Remove small noise points by opening operation, and then use the bwareaopen function to remove isolated small regions to further purify the image. According to the main direction, use a multi-scale growth algorithm to expand the connected regions in the image, gradually fill the gaps in the image by gradually increasing the size of the structure element, and enhance the continuity of the joints. By dilation and erosion operations, refine the connected regions to ensure that the shape of the joints is more regular.

[0063] Step 16, Geometric screening and skeleton optimization: Remove regions that do not meet the conditions through geometric screening, calculate the major axis, minor axis and area of each connected region, and select regions with relatively large areas to ensure that the final result only contains significant joints. The final selected joints are iteratively eroded and opened to obtain the skeleton S(J), and small branches are removed. By closing and dilating operations, the continuity and thickness of the skeleton are enhanced:

[0064]

[0065] where! is erosion; is opening; J is the input binary joint region; i is the iteration number; and B is the structure element. Finally, short skeletons are removed by geometric filtering to ensure that the final result contains only significant joints.

[0066] As Figure 3 shown, the method further comprises a step of developing a MATLAB APP in which the executable program of step 1 is stored, and the APP comprises four functional modules:

[0067] a) image import module: used for importing rock mass joint images, supporting formats such as JPG / PNG, and also integrating a preview function;

[0068] b) parameter configuration module: used for visual adjustment of 12 parameters such as up-sampling factor, sharpening parameter, Canny threshold, and morphological structure element size;

[0069] c) processing execution module: the processing execution module stores the executable program described above, executes step 1 according to the pipeline of “preprocessing-feature extraction-direction analysis-morphological optimization-skeleton generation”, and automatically saves the intermediate results to a specified directory;

[0070] d) visualization module: real-time display of 10 types of processing results (such as binarization, directional growth, and final skeleton), for real-time parameter adjustment.

[0071] Specifically, the specific training process of step 2 is as follows:

[0072] Step 21, constructing an image pyramid and initializing the network: starting from the original image x0, performing N times of down-sampling according to the scaling factor r to generate an image sequence {x N , x N-1 …x0}(N is the number of scale layers, x N is the coarsest scale, and x0 is the original scale). And initialize the corresponding generator G n and discriminator D n for each layer (the nth layer, n from 0 to N).

[0073] Step 22, independent training according to the scale level: training starts from the coarsest scale (x N ), after completing the training of this scale, training of finer scales (x N-1 to x0) is performed in turn, and the training processes of each scale are independent of each other.

[0074] The nth layer generator G nThe workflow is as follows: The upsampled version of the generated image from the previous layer, along with the noise from the current layer, are used as input. A residual image is then output through a residual learning mechanism. Finally, the residual image is combined to generate a realistic image for the current layer. For the discriminator, a Markovian discriminator is used, with a patch size of 11×11 pixels. The average score of all patches is calculated to distinguish whether the input sample is a real image (from the original image sequence) or a generated image (generated by G). n generate).

[0075] Throughout the process, multiple loss functions were employed, including adversarial loss for both the generator and the discriminator (WGAN-GP): the discriminator's loss included the difference between the real sample score and the generated sample score, as well as a gradient penalty term to ensure that the gradient norm of the discriminator was close to 1.

[0076] Step 23, Scale Up: Using the trained SinGAN model, generate rock mass joint network images of arbitrary scale by adjusting the size of the noise map.

[0077] Specifically, in step 22, when n = N (coarsest scale), the generator G... N The input is pure noise z N When n < N, the generator G N The input is the upsampled version of the image generated in the previous layer and the noise z in the current layer. n .

[0078] The present application realizes multi-feature fusion by linearly combining the image after adaptive histogram equalization with the gradient amplitude, and realizes the synergistic optimization of the spatial edge texture and the frequency domain medium scale structure by combining the frequency domain Gaussian filter to enhance the medium frequency details. The actual effect of this processing strategy is reflected in the following aspects: in the low-contrast and high-noise field image, the non-joint structure interference can be effectively reduced, the microcrack details can be retained, and the edge integrity can be improved. The joint main direction is obtained by Hough transform, and a multi-scale directional growth algorithm is constructed based on this, that is, the broken joint is expanded and connected along the main direction at each scale, and the orthogonal compensation mechanism is introduced to repair the cross joint and improve the joint connectivity. The generated topological structure is closer to the actual one. By using the pyramid generator architecture of SinGAN, the present application can learn the global structure and local details of the joint network from a single binary image without predefining the probability distribution or the mechanical equivalent model. Compared with the traditional method which relies on Monte-Carlo simulation or REV assumption, the present application has stronger generalization ability for complex joint morphology (such as branching, non-uniform rough surface), and the generated joint network is closer to the real geological characteristics, and has strong robustness to data loss or noise interference. The end-to-end learning of joint recognition and enlargement is realized by SinGAN, without step-by-step processing. Generator G n Through the residual learning mechanism, a realistic joint network is directly generated from the noise and the up-sampled image, and the WGAN-GP loss function is used to optimize the generation quality. Compared with the traditional finite element or discrete element modeling which needs to manually define the contact properties, the modeling efficiency is greatly improved. In addition, since G n Since the full convolution structure is adopted, the present application can generate a joint network of any scale by adjusting the size of the noise image, solving the calculation bottleneck in the cross-scale modeling of the traditional method.

[0079] Referring to Figure 1 and Figure 2 , the present application provides a method for rock mass joint network recognition and enlargement, and the specific implementation steps are as follows:

[0080] a) import the rock mass joint image taken on the engineering site into the "rock mass joint binary image processing APP" developed by the present application, as shown in Figure 3 .

[0081] b) after importing the image, the following parameters need to be configured:

[0082] ① up-sampling magnification: used to improve the image resolution and enhance the details. The value range is 1.0-4.0, and the default value is 1.8. When the original resolution of the image is low and the details are difficult to identify, increasing the parameter value can effectively improve the resolution to highlight the details; if the image resolution already meets the detail presentation requirement, reducing the parameter value can optimize the calculation efficiency and avoid excessive operation.

[0083] ②Sharpness parameters: used to enhance image edges and improve clarity. Sharpness radius: used to control the range of image edge enhancement, with a value range of 0.5-3.0 and a default value of 1.2. When the image edges are blurred, increasing the radius value can expand the edge enhancement area and improve overall clarity; sharpness intensity: used to regulate the degree of edge enhancement, with a value range of 0.5-3.0 and a default value of 1.5. When the edge clarity is insufficient, increasing the intensity value can strengthen the edge contrast, and vice versa to reduce the risk of excessive edge enhancement.

[0084] ③Canny edge detection parameters: used to extract edges in the image. The low threshold value range is 0.01-0.5, with a default value of 0.05. When the image noise is more, appropriately increasing the threshold value can filter weak noise response and retain strong edge features; the high threshold value range is 0.1-1.0, with a default value of 0.15. Combined with the low threshold value, it can realize double-threshold edge detection and improve edge extraction accuracy; the smoothing parameter in Canny edge detection is used to control the degree of Gaussian smoothing, with a value range of 0.5-3.0 and a default value of 1.2. When noise interference is significant, increasing this parameter can enhance the smoothing effect and suppress noise, and vice versa to retain more edge details.

[0085] ④Hough transform parameters: used to detect straight lines (joints) in the image. Peak number: used to limit the maximum number of detected straight lines (joints), with a value range of 3-20 and a default value of 5. When the image joints are complex and diverse, increasing this value can ensure that more joints are detected; when the joints are simple and sparse, reducing this value can improve detection efficiency; threshold: sets the peak value judgment standard in Hough space, with a value range of 0.1-0.8 and a default value of 0.3. When the joints are complex, increasing the threshold value can filter out more significant joint features; in simple scenarios, reducing the threshold value can avoid missed detection; angle resolution: determines the precision of straight line angle detection in Hough transform, with a value range of 0.5-2.0 (units: degrees), and a default value of 1.0. When the joint direction is complex and high-precision detection is required, reducing this value can improve the angle resolution capability, but it will also incur certain computational overhead; when the joint direction is simple, increasing this value can balance precision and efficiency.

[0086] ⑤Morphological processing parameters: used for noise removal and joint refinement. Structure element size: used to define the size of the structural element for morphological operations (such as opening operation, closing operation), the value range is 2-30 pixels, the default value is 4 pixels, when the noise interference is serious, increasing the size can enhance the noise removal ability; when the noise is less, reducing the size can retain more fine joint structure; MinArea: used to filter noise areas with small area, the value range is 5-150 pixels, the default value is 100 pixels, when the image noise is dense, increasing the value can effectively eliminate small area noise; when the joint is fine and needs to be retained, reducing the value can avoid false deletion; Direction tolerance: in the process of directional growth, the allowed deviation range of the direction is limited to control the region connection and growth mode, the value range is 10-60 (unit: degree), the default value is 40, when the joint direction is variable, increasing the tolerance can promote the connection of joints in different directions; when the joint direction is concentrated, reducing the tolerance can make the growth more consistent with the main direction characteristics.

[0087] c) After the parameter configuration is completed, click the "Start processing" button, and the built-in processing execution module of the APP will execute image processing according to the following standardized pipeline, each step contains parameter self-adaptation mechanism and intermediate result caching function, the specific steps are as follows:

[0088] ① Read the image in JPG / PNG format through the imread function, automatically identify the path and size, call the imsharpen function for edge enhancement, set the default sharpening radius and sharpening intensity parameters, use the Laplacian operator to highlight the joint edge gray mutation, use the imresize function to perform bicubic interpolation enlargement according to the default upsampling factor, and record the resolution ratio of the enlarged resolution to the original resolution as resolution_ratio for subsequent parameter self-adaptation adjustment, and finally realize local Laplacian filtering through the locallapfilt function to enhance different scale gradient information and suppress background noise.

[0089] ② After converting the image to a grayscale image, use imgradientxy combined with Prewitt operator to calculate horizontal and vertical gradients and obtain gradient amplitude, perform two-dimensional Fourier transform through fft2, use a custom Gaussian filter to enhance mid-frequency details, and then restore the spatial domain image through ifft2 inverse transform to suppress high-frequency noise and low-frequency uneven illumination.

[0090] ③ Perform adaptive histogram equalization on the frequency domain enhanced image through adapthisteq, linearly combine it with the gradient amplitude according to the weight, then perform nonlinear transformation to stretch the edge gray contrast, and finally call the edge function to set the double threshold and smoothing parameter to perform Canny edge detection, which preserves the real edge and suppresses noise through the double threshold mechanism.

[0091] (4) Hough transform is performed on the edge image with a certain angular resolution, and the first several peaks are extracted by houghpeaks. The average value of the corresponding angles is calculated as the main direction theta of the joint. If no valid peak is detected, the parameter automatic adjustment mechanism is triggered.

[0092] (5) The Otsu threshold is calculated using graythresh and multiplied by a coefficient for binarization. Small noise points and isolated regions are removed by open operation and bwareaopen. The directional_growth_enhanced function is called to perform multi-scale dilation along the main direction theta, and short-scale compensation is performed in the orthogonal direction to repair intersecting joints.

[0093] (6) Connected regions with an aspect ratio greater than a certain value and an area that meets the conditions are screened out, and short and small joint fragments are removed. The skeletonization process is performed on the screened image, and spur operation is used to remove branches less than a certain length. The closed operation and dilation operation are used to enhance the continuity and thickness of the skeleton. Finally, the skeletons that meet the area requirements are screened out, and the final results are generated and saved to the specified folder "processed_images" according to the rules.

[0094] d) Intermediate result management

[0095] The processing execution module saves 10 types of intermediate results to the "processed_images" folder according to the following naming rules, including morphological processing (morphology_1_cleaned_joints.png), isolated point removal (morphology_2_noise_removed.png), directional growth (morphology_3_connected_joints.png), directional refinement (morphology_4_refined_joints.png), secondary denoising (morphology_5_large_joints.png), geometric screening (morphology_6_final_joints.png), basic skeleton (skeleton_1_clean_skeleton.png), main direction connection (skeleton_2_connected_prim.png), reinforced joint (skeleton_3_thick_skel.png) and final optimization (skeleton_4_final_line_image.png). In addition, after the processing is completed, the processing results can also be viewed in the result visualization module, including the results of morphological processing, isolated point removal, directional growth, directional refinement, secondary denoising, geometric screening, basic skeleton, main direction connection, reinforced joint and final optimization, as shown in Figure 4 andFigure 5 as shown.

[0096] e) input the binary image of the rock mass joint output after the above APP processing into the SinGAN model, and the SinGAN model will train and learn the global structure features and local details of the rock mass joint network in the binary image layer by layer according to the following steps:

[0097] ① image pyramid construction, the model starts from the original image x0, and generates an image sequence {x N , x N-1 …x0} through N times of downsampling according to the scaling factor r.

[0098] ② Before starting the training of each layer, the generator G n and the discriminator D n are initialized, the training starts from the coarsest scale (x N ), and the training of the image is carried out independently, that is, after training one scale, the next finer scale is trained. When n = N, that is, at the beginning (the coarsest scale), G n is trained by inputting pure noise z N , and in other cases, G n inputs the up-sampled version of the generated image of the previous layer and the noise of the current layer, learns the residual image through the residual, and finally generates a realistic image of the current layer.

[0099] ③ For the discriminator of each layer, the Markov discriminator is adopted, the patch size is 11*11 pixels, and the average score of all patches is calculated to distinguish the real sample and the generated sample. In the whole process, a variety of loss functions are adopted, including the adversarial loss (WGAN-GP) and the reconstruction loss of the generator and the discriminator, so as to ensure that the generator can accurately reconstruct the original image under a specific noise. In addition, the noise of the current layer is also adjusted according to the comparison between the generated image and the original image to balance the amount of details to be added at each scale.

[0100] ④ In the process of generating any image, the generator network is also started from the coarsest scale layer by layer. Since the generator is a full convolutional structure, images of any size and aspect ratio can be generated by adjusting the noise image size, as shown in Figure 6 .

[0101] Through a series of digital image processing techniques, the present application realizes automatic identification and optimization of rock mass joints. In addition, a MATLAB APP integrating visual configuration of 12 adjustable parameters is developed, which can support dynamic adjustment of processing strategies according to different rock mass image features, and enhance the generalization ability of the method.

[0102] Any of the technical solutions of the present application disclosed above, if it discloses numerical ranges, the disclosed numerical ranges are preferred numerical ranges, any person skilled in the art should understand that the preferred numerical ranges are only the values with more obvious technical effects or representative values among the many implementable values. Because there are too many values to enumerate, the present application discloses some values to illustrate the technical solutions of the present application, and the above-mentioned enumerated values should not constitute a limitation on the protection scope of the present application.

[0103] At the same time, if the above-mentioned present application discloses or involves mutually fixed connecting parts or structural parts, except otherwise stated, the fixed connection can be understood as: detachable fixed connection (for example, using bolt or screw connection), and can also be understood as: non-detachable fixed connection (for example, riveting, welding), of course, the mutually fixed connection can also be replaced by an integral structure (for example, using casting process integral forming manufacturing) (obviously, except for integral forming process).

[0104] In addition, the terms used to represent the position relationship or shape in any of the technical solutions of the present application disclosed above, except otherwise stated, its meaning includes the approximate, similar or close state or shape. Any component provided by the present application can be assembled from a plurality of individual components, or can be a single component manufactured by integral forming process.

[0105] The above examples are only examples for clearly illustrating the present application, and are not limited to the embodiments. Based on the above description, other different forms of changes or variations can also be made by those skilled in the art. Here, it is neither necessary nor possible to enumerate all the examples. The obvious changes or variations derived therefrom are still within the protection scope of the present application.

Claims

1. A method for rock mass joint network identification and magnification based on a SinGAN model, characterized in that, Comprise the following steps: Step 1, the image of the engineering rock mass joint is subjected to multi-feature fusion and directional growth binarization processing, and a binary image which can be directly used as the input of machine learning is obtained; Step 2, the binary image obtained in step 1 is input into the SinGAN model for training, so as to realize the identification and amplification of the rock mass joint network.

2. The rock mass joint network identification and amplification method of claim 1, wherein, Step 1 specifically includes the following processes: Step 11, pre-processing the rock mass joint image: reading the image using the imread function, sharpening to enhance the edge through the imsharpen function, using the imresize function to enlarge the image with bicubic interpolation, and then performing local laplace filtering through the locallapfilt function to enhance the edge and details; Step 12, gray scale and gradient processing: convert the pre-processed image to a gray scale image, calculate the horizontal and vertical direction gradients using the Prewitt operator and obtain the gradient amplitude; perform Fourier transform to the frequency domain, apply a Gaussian filter to enhance the mid-frequency details, and then recover to the spatial domain through inverse Fourier transform; Step 13, edge detection: the frequency domain enhanced image is subjected to adaptive histogram equalization, and the gradient amplitude is linearly combined to form a multi-feature fusion image, which is subjected to nonlinear transformation to adjust the contrast, and then the Canny edge detection algorithm is used to extract the edge; Step 14, direction analysis: Hough transform is performed on the edge image, the angle corresponding to the peak value is extracted, and the average angle is calculated to determine the main direction of the joint; Step 15, binarization and morphological processing: calculate the threshold value and binarize using the Otsu method, remove noise and isolated regions through opening operation and bwareaopen function, expand the connected region along the main direction of the joint using a multi-scale growth algorithm, and thicken the connected region through dilation and erosion operations, while introducing an orthogonal compensation mechanism to repair the cross-joint area; Step 16, geometric screening and skeleton optimization: screen the connected regions with area meeting the conditions, obtain the skeleton and remove the small branches through iterative erosion and opening operation, and enhance the skeleton continuity and thickness through closing operation and dilation operation.

3. The method of rock mass joint network identification and amplification according to claim 2, characterized in that: Step S12 specifically includes: First, convert the image to a gray scale image, and calculate the horizontal and vertical direction gradients of the image using the Prewitt operator; Then, the image is converted to the frequency domain through Fourier transform, and a Gaussian filter H(u,v) is applied in the frequency domain to enhance the mid-frequency details: Where, u and v are the coordinate variables of the horizontal and vertical directions in the frequency domain respectively, D(u,v) is the distance from the frequency domain point (u,v) to the origin, and sigma is the standard deviation; Then, the image is restored to the spatial domain through inverse Fourier transform: g(x1,y1) = f -1 {F(u,v) · H(u,v)} (2) In the formula, g(x1, y1) is the result of the processed spatial domain, x1 and y1 are pixel coordinates of the spatial domain respectively; f -1 {·} is an inverse Fourier transform operator, which converts the frequency domain signal to the spatial domain; F(u, v) is an image after effective removal of noise and highlighting of important features.

4. The method of rock mass joint network identification and amplification of claim 2, wherein: Step S14 specifically includes: Through Hough transform on the edge image, the straight line is represented as rho=x2cos theta+y2sin theta, and the accumulator A(rho,theta) accumulates the collinear points: A(p, θ) = ∑ (x,y)∈edgepoints δ(p - x2cosθ - y2sinθ) (3) Where, rho is the vertical distance from the straight line to the origin of the coordinates; x2 and y2 are the pixel coordinates in the edge image; theta is the angle between the straight line and the positive direction of the x-axis; and delta is the impulse function; Accordingly, the most significant straight line direction is found, and then the angles θ1, θ1, …, θk corresponding to the top k peaks of the accumulator are selected k and the average angle is calculated 5. The method for rock mass joint network identification and amplification according to claim 2, characterized in that: Step S16 specifically includes: By geometric screening to remove the area that does not meet the conditions, the long axis, short axis and area of each connected region are calculated, and the area of the relatively large region is screened out to ensure that the final result only contains significant joints; The final screened joints are obtained by iterative erosion and opening operation to obtain the skeleton S(J), and the small branches are removed, and the continuity and thickness of the skeleton are enhanced by closing operation and inflation operation: where! is the erosion; is the opening operation; J is the input binary joint region; i is the iteration number; B is the structuring element, and finally a geometric filter is applied to remove short skeletons, ensuring that the final result contains only significant joints.

6. The method of rock mass joint network identification and amplification according to any one of claims 1-3, characterized in that, Step 2 specifically includes the following processes: Step 21, constructing image pyramid and initializing network: the original binary image is down-sampled N times according to the scaling factor r to generate an image sequence {x N , x N-1 …x0}, N is the number of scale layers, x N is the coarsest scale, x0 is the original scale, and the corresponding generator G n and discriminator D n are initialized for each layer; Step 22, layered independent training: from the coarsest scale x N Start, train layer by layer to the finest scale x0, each scale is trained independently; wherein, the nth layer generator G n The above upsampling version of the generated image of the last layer and the current layer noise are input, a residual image is output through a residual learning mechanism, and a realistic image of the current layer is generated; the discriminator adopts a Markov discriminator, sets the patch size to 11x11 pixels, and distinguishes the real image from the generated image by calculating the average score of all patches; the training process adopts multiple loss functions including WGAN-GP adversarial loss; Step 23, scale up: using the trained SinGAN model, the noise map size is adjusted to generate rock joint network images of any scale.

7. The rock mass joint network identification and amplification method according to claim 6, characterized in that, In step 22, in the WGAN-GP adversarial loss, the loss of the discriminator includes the difference between the scores of the real samples and the generated samples, and the gradient penalty term to ensure that the gradient norm of the discriminator is close to 1.

8. The rock mass joint network identification and amplification method of claim 6, wherein, In step 22, when n = N, the generator G... N The input is pure noise z N When n < N, the generator G n The input is the upsampled version of the image generated in the previous layer and the noise z in the current layer. n .