A core column analysis method and system combined with attention mechanism

Through the core column analysis method combined with attention mechanism, and the core column chart is generated using computer vision and deep learning technology, the problems of cumbersome and inaccurate lithologic marking in traditional methods are solved, and the accuracy and efficiency of geological exploration are improved.

CN116597222BActive Publication Date: 2025-03-21CHINA THREE GORGES CORPORATION
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310606213.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-23
Publication Date
2025-03-21
Estimated Expiration
2043-05-23

AI Technical Summary

Technical Problem

In the prior art, lithologic marking and interval measurement work is extremely cumbersome and easy to label errors, which affects the accuracy and effect of geological exploration.

Method used

The core column analysis method combined with attention mechanism is adopted to obtain the core box pictures at the geological exploration site, and the core box main map is generated using the enrichment area recognition algorithm and semantic segmentation algorithm. The core column map is generated based on standard segmentation information and segment fitting linear information, and input it into the image neural network model to generate lithologic classification information.

Benefits of technology

It improves the accuracy of core box area identification, solves the problem of incoherent and unfluent column effects in traditional methods, simplifies the lithologic annotation process, and improves the accuracy and efficiency of geological exploration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116597222B_ABST
    Figure CN116597222B_ABST
Patent Text Reader

Abstract

The present invention provides a core column analysis method and system combined with an attention mechanism, a core column analysis method combined with an attention mechanism, including: obtaining a core box picture at a geological exploration site, generating a core box main body picture by using an enrichment region recognition algorithm and a semantic segmentation algorithm based on the core box picture at the geological exploration site; dividing the width of the core box main body picture into equal parts to generate standard segmentation information; based on the core box main body picture, generating segmented fitting straight line information by using a slope-optimized straight line detection fitting algorithm; fusing the standard segmentation information and the segmented fitting straight line information to generate a core column picture; inputting the core column picture into an image neural network model to generate lithology classification information. The method improves the accuracy of box area recognition, reduces the error rate of lithology labeling and interval measurement, and improves the accuracy of geological exploration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of core exploration technology, and in particular to a core column analysis method and system combined with an attention mechanism. Background Art

[0002] Geological exploration is a very important part of hydropower station construction. Before the construction of a hydropower station, sufficient exploration is required to determine the geological conditions of the project site, including geological structure, rock layer properties, rock strength, etc. Core exploration, as an important geological exploration method, can obtain more detailed and accurate geological information and provide a more reliable basis for hydropower station construction. Core images are important research materials in the geological exploration process, and the generation of core columns is an important preliminary work in core analysis.

[0003] Core exploration combines core samples from different depths to form a borehole column chart. Through the analysis and study of the borehole column chart, researchers can better understand the topography of the exploration site and provide a reference for subsequent engineering construction in the area. In engineering construction, traditional column reports use black and white schematic diagrams to display geological layered structure information, which cannot well represent the true appearance of the collected cores.

[0004] The traditional exploration and analysis method requires the exploration personnel to perform complex operations through professional software to obtain the core box image. At the same time, the traditional column splicing task is simply divided and spliced ​​according to the number of core box blocks. Due to the shooting angle problem, the column effect is poor, and there will be incoherence and fluency, which affects the analysis and display effect. The lithology labeling and interval measurement work after the column is also extremely cumbersome and prone to labeling errors, which affects the accuracy and effect of geological exploration and is a considerable burden for geological engineers. Summary of the invention

[0005] Therefore, the technical solution of the present invention mainly solves the defects in the prior art that the lithology labeling and interval measurement work is extremely cumbersome and prone to labeling errors, which affects the accuracy and effect of geological exploration, thereby providing a core column analysis method and system combined with an attention mechanism.

[0006] In a first aspect, an embodiment of the present invention provides a core column analysis method combined with an attention mechanism, comprising:

[0007] Obtaining a core box image at a geological exploration site, and generating a core box main body image based on the core box image at the geological exploration site using an enrichment region recognition algorithm and a semantic segmentation algorithm;

[0008] Divide the width of the core box main body image into equal parts to generate standard segmentation information;

[0009] Based on the core box main body diagram, using a slope-optimized straight line detection fitting algorithm to generate piecewise fitting straight line information;

[0010] The standard segmentation information and the segmentation fitting straight line information are integrated to generate a core column diagram;

[0011] The core column map is input into the image neural network model to generate lithology classification information.

[0012] The embodiment of the present invention provides a core column analysis method combined with an attention mechanism. Based on the core box picture at the geological exploration site, the core box main body picture is generated by using an enrichment region recognition algorithm and a semantic segmentation algorithm. The core box main body can be separated from the picture containing the core box more accurately, avoiding the complicated operation of geological professionals on the photos taken at the exploration site through professional software and equipment. In addition, the traditional computer vision algorithm (enrichment region recognition algorithm) and the deep learning algorithm (semantic segmentation algorithm) are combined to solve the problem that the traditional computer vision algorithm cannot adapt to complex environments. The problem of poor recognition of core box areas in field scenarios is solved, and the efficiency of post-processing of semantic segmentation results is also accelerated, thereby improving the accuracy of box area recognition. Secondly, the standard segmentation information and segmented fitting straight line information are integrated to generate a core column map, which solves the problem of incoherence and unsmoothness in segmenting and splicing columns based on prior knowledge. Finally, the core column map is input into the image neural network model to generate lithology classification information, and the column report is automatically output in the prescribed format, which brings convenience to the exploration personnel in marking the lithology sections, which is of great significance for the initial site selection and exploration work of power station construction.

[0013] In combination with the first aspect, in a possible implementation, based on the geological exploration site core box picture, using the enrichment region recognition algorithm and the semantic segmentation algorithm to generate the optimal core box circumscribed rectangle and contour vertex coordinates includes:

[0014] Processing the core box image of the geological exploration site using an enrichment region recognition algorithm to generate a core box contour region;

[0015] Acquire a core box data set, train a semantic segmentation neural network model based on the core box data set, and generate a core box recognition model;

[0016] Inputting the geological exploration site core box picture into the core box recognition model to generate a mask map;

[0017] Determine an optimal core box circumscribed rectangle and contour vertex coordinates based on the mask image and the core box contour area;

[0018] Based on the outline vertex coordinates, a core box main body image is generated using perspective transformation.

[0019] In combination with the first aspect, in another possible implementation, the using of the enrichment region recognition algorithm to process the geological exploration site core box image to generate the core box contour region includes:

[0020] Using the Otsu binarization algorithm to identify the core box image at the geological exploration site, and generate a core exploration description board;

[0021] The area above the lower edge of the core exploration explanation plate is removed to generate a two-dimensional denoised grayscale image;

[0022] Performing morphological corrosion and expansion processing on the two-dimensional denoised grayscale image to generate a minimum circumscribed rectangle of the core box;

[0023] The minimum circumscribed rectangle of the core box is compared with the enrichment area identification threshold, and the core box contour area is determined based on the comparison result.

[0024] In combination with the first aspect, in another possible implementation, determining the optimal core box circumscribed rectangle and contour vertex coordinates based on the mask image and the core box contour area includes:

[0025] Binarizing the mask image, and performing contour detection on the mask image after the binarization process to generate a plurality of contour rectangles;

[0026] Analyzing the plurality of contour rectangles based on the core box contour area, and removing contour rectangles outside the core box;

[0027] Sorting the remaining contour rectangles according to the contour perimeter, and selecting the contour rectangle with the largest contour perimeter as the target area based on the sorting result; wherein the remaining contour rectangles are other contour rectangles among the multiple contour rectangles except the contour rectangle of the core box;

[0028] Performing polygon fitting on the target area to determine the number of vertices of the target area;

[0029] The number of vertices in the target area is compared with the number of vertices in the quadrilateral. When the number of vertices in the target area does not match the number of vertices in the quadrilateral, a minimum rectangle fitting is performed on the target area to generate the optimal core box circumscribed rectangle and the contour vertex coordinates corresponding to the optimal core box circumscribed rectangle.

[0030] In combination with the first aspect, in another possible implementation, the generating of the piecewise fitting straight line information based on the core box main body diagram using a slope-optimized straight line detection fitting algorithm includes:

[0031] Based on the core box main body diagram, a local horizontal boundary line segment set is generated using a straight line segment detection algorithm;

[0032] Performing a connected domain analysis on the local horizontal boundary line segment set to generate a plurality of straight lines;

[0033] The plurality of straight lines are compared with preset conditions respectively, the straight lines meeting the preset conditions are sorted vertically, and the piecewise fitting straight line information is generated.

[0034] In combination with the first aspect, in another possible implementation, the fusing the standard segmentation information and the segmentation fitting straight line information to generate a core column diagram includes:

[0035] Calculating the intercept difference and the straight line angle between the standard segment information and the segment fitting straight line information;

[0036] Compare the intercept difference with a first preset threshold, and compare the straight line angle with a second preset threshold;

[0037] When the intercept difference meets the first preset threshold, and the straight line angle meets the second preset threshold, generating current straight line information;

[0038] The edge position coordinates of each core segment are determined based on the current straight line information, and the core column diagram is generated based on the edge position coordinates of each core segment.

[0039] In combination with the first aspect, in another possible implementation, inputting the core column image into an image neural network model to generate lithology classification information includes:

[0040] The core column map is segmented using a sliding window mode, and the segmented core column map is input into the image neural network model to generate the lithology classification information.

[0041] In a second aspect, an embodiment of the present invention further provides a core column analysis system combined with an attention mechanism, comprising:

[0042] An acquisition module is used to acquire a core box image at a geological exploration site, and based on the core box image at the geological exploration site, generate a core box main body image using an enrichment region recognition algorithm and a semantic segmentation algorithm;

[0043] An equal division module, used for equally dividing the width of the core box main body image to generate standard segmentation information;

[0044] A detection module, for generating piecewise fitting straight line information based on the core box main body diagram using a slope-optimized straight line detection fitting algorithm;

[0045] A fusion module, which fuses the standard segmentation information and the segmentation fitting straight line information to generate a core column diagram;

[0046] A generation module is used to input the core column diagram into an image neural network model to generate lithology classification information. In a third aspect, an embodiment of the present invention further discloses an electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of a core column analysis method combined with an attention mechanism as described in the first aspect or any optional embodiment of the first aspect.

[0047] In a fourth aspect, an embodiment of the present invention further discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a core column analysis method combined with an attention mechanism as described in the first aspect or any optional embodiment of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0049] Figure 1 A flowchart of a core column analysis method combined with an attention mechanism provided in an embodiment of the present invention;

[0050] Figure 2 A schematic diagram of data augmentation for a core box plot data set provided by an embodiment of the present invention;

[0051] Figure 3 The original image of the core box body in the core box image data set provided by the embodiment of the present invention;

[0052] Figure 4 A label map of a core box body in a core box map data set provided by an embodiment of the present invention;

[0053] Figure 5 A schematic diagram of standard straight line detection provided by an embodiment of the present invention;

[0054] Figure 6 A straight line diagram of a rock and soil shielding edge provided in an embodiment of the present invention;

[0055] Figure 7 A flowchart of S101 provided in an embodiment of the present invention;

[0056] Figure 8A schematic diagram of the prediction results of each model provided in an embodiment of the present invention;

[0057] Fig. 9 A flowchart of S1011 provided in an embodiment of the present invention;

[0058] Fig.10 A schematic diagram of a two-dimensional denoised grayscale image provided by an embodiment of the present invention;

[0059] Fig.11 A schematic diagram of a picture after removing interference items provided by an embodiment of the present invention;

[0060] Fig.12 A schematic diagram of a picture after dilation operation provided by an embodiment of the present invention;

[0061] Fig.13 A flowchart of S1014 provided in an embodiment of the present invention;

[0062] Fig.14 A flowchart of S103 provided in an embodiment of the present invention;

[0063] Fig.15 A schematic diagram of piecewise fitting straight line information provided by an embodiment of the present invention;

[0064] Fig.16 A flowchart of S104 provided in an embodiment of the present invention;

[0065] Fig.17 A schematic diagram of core column splicing provided by an embodiment of the present invention;

[0066] Fig.18 A schematic diagram of data interaction of a core column analysis system combined with an attention mechanism provided in an embodiment of the present invention;

[0067] Fig.19 A schematic diagram of a core column analysis system combined with an attention mechanism provided in an embodiment of the present invention;

[0068] Fig. 20 A block diagram of a core column analysis system combined with an attention mechanism provided in an embodiment of the present invention;

[0069] Fig.21 FIG. 4 is a specific example diagram of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0070] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0071] In the description of the present invention, it should be noted that the terms "first", "second" and "third" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. In addition, unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a mechanical connection, or an electrical connection; or it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal connection of two components, which can be a wireless connection or a wired connection. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0072] The embodiment of the present invention provides a core column analysis method combined with an attention mechanism, such as Figure 1 As shown, including:

[0073] S101. Obtain a core box image at a geological exploration site, and generate a core box main body image based on the core box image at the geological exploration site using an enrichment region recognition algorithm and a semantic segmentation algorithm.

[0074] Specifically, by using mobile shooting equipment (mobile phone, camera, etc.), take photos as orthogonally as possible to reduce image distortion, and obtain a two-dimensional image including the core box body, the core exploration instruction board corresponding to the core box, the on-site environment, etc. The image format must include RGB (a color standard) three primary color channels, and the image must be clear and complete, with uniform color tone and moderate contrast.

[0075] Furthermore, a core box map dataset is constructed based on the core box images of geological exploration sites, and the data is augmented without changing the size of the dataset using methods such as horizontal / vertical flipping, rotation, scaling, cropping, shearing, translation, contrast, color jittering, modifying hue saturation, modifying brightness, and modifying contrast. Figure 2 shown.

[0076] Furthermore, the core box map dataset was manually annotated using labelme (an image annotation tool). The annotation method was as follows: four vertices were selected to frame the main part of the core box. After annotation, a json (JavaScript Object Notation, a lightweight data exchange format) file was obtained. The file contained vertex information, label information, and images. The json file was converted into the original image and label image by writing a corresponding program. The original image is shown in Figure 3 As shown, the label diagram is as follows Figure 4 shown.

[0077] S102: Divide the width of the core box main body image into equal parts to generate standard segmentation information.

[0078] Specifically, Figure 5 As shown, based on the assumption that "the width of each core box is roughly equal", the width between the upper and lower edges obtained by intelligent identification of the core box is divided into N equal parts, where N is the number of core columns, and the boundary line (i.e., standard straight line) of each core box is obtained. The area between two adjacent standard straight lines is a core box area.

[0079] Furthermore, the standard straight line can segment each core box to a certain extent, but the standard straight line is only a theoretical straight line generated from the upper and lower boundaries based on the assumption that "the width of each core box is equal". The segmentation straight line prediction for images with irregular core placement is not accurate enough. In order to obtain a higher accuracy, it is necessary to detect straight lines from the original image, obtain the actual straight lines, and then compare them with the standard straight lines.

[0080] S103. Based on the core box main body diagram, a slope-optimized straight line detection fitting algorithm is used to generate segmented fitting straight line information.

[0081] Specifically, when the human eye observes an image, it will automatically fill in some missing line segments, such as Figure 6 As shown in the figure, although the edge of the core box is blocked by a lot of rock and soil, the human eye can still associate the entire edge straight line through the unblocked part of the edge. Based on the above principle, a straight line detection fitting algorithm based on slope optimization is proposed, which can first detect the local line segments of the edge of all core boxes, and then merge these line segments through the collinear property of the local line segments.

[0082] S104: The standard segmentation information and the segmentation fitting straight line information are integrated to generate a core column diagram.

[0083] S105, inputting the core column image into the image neural network model to generate lithology classification information.

[0084] Specifically, the core column map is segmented using a sliding window mode, and the segmented core column map is input into an image neural network model to generate lithology classification information.

[0085] Furthermore, through the previous core stratification history dataset, combined with the core column image, a core classification model dataset was produced according to different core classification heights, and the VGG16 classification network was used for training to identify rock lithology.

[0086] Furthermore, the obtained core column image is segmented using a sliding window mode with a length of 20 cm and a step size of 10 cm, and is sent to the trained VGG16 network to identify the core category in the image. Finally, the exploration report is output based on the corresponding automatic recognition results (i.e., lithology classification information).

[0087] The present embodiment proposes a core column analysis method combined with an attention mechanism. Based on the core box pictures at the geological exploration site, the enrichment region recognition algorithm and the semantic segmentation algorithm are used to generate the core box main body picture. The core box main body can be separated from the pictures containing the core box more accurately, avoiding the complicated operation of geological professionals on the pictures taken at the exploration site through professional software and equipment. In addition, the traditional computer vision algorithm (enrichment region recognition algorithm) and the deep learning algorithm (semantic segmentation algorithm) are combined to solve the problem that the traditional computer vision algorithm cannot adapt to complex environments. The problem of poor recognition of core box areas in field scenarios is solved, and the efficiency of post-processing of semantic segmentation results is also accelerated, which improves the accuracy of box area recognition; secondly, the standard segmentation information and the segmented fitting straight line information are integrated to generate a core column map, which solves the problem of incoherence and unsmoothness in segmenting and splicing columns based on prior knowledge; finally, the core column map is input into the image neural network model to generate lithology classification information, and the column report is automatically output in the prescribed format, which brings convenience to the exploration personnel to mark the lithology sections, which is of great significance for the initial site selection and exploration work of power station construction.

[0088] As an optional embodiment of the present invention, Figure 7 As shown, the above S101, i.e., based on the core box picture at the geological exploration site, using the enrichment region recognition algorithm and the semantic segmentation algorithm to generate the optimal core box circumscribed rectangle and contour vertex coordinates, includes:

[0089] S1011. Process the core box image at the geological exploration site using an enrichment region recognition algorithm to generate a core box contour region.

[0090] S1012. Obtain a core box data set, train a semantic segmentation neural network model based on the core box data set, and generate a core box recognition model.

[0091] Specifically, the core box recognition model includes a backbone network, a main network and a head network; among them, three classic neural network algorithms are selected for comparative experiments: FCN (Fully Convolutional Networks), SegNet (image semantic segmentation deep network), Unet (medical image semantic segmentation network), and improved MT-Unet (medical image segmentation network).

[0092] Furthermore, MT-Unet uses the Transformer (a sequence model based on the attention mechanism) structure to replace the 2D convolution operation in the original Unet structure, uses the move multi-head self attention mechanism (M-MSA), and adopts a cyclic shift method to extract edge information. It should be noted that the shift operation is only effective when the resolution is large, and the deep error is large. Therefore, when the size is 1 / 16 of the original size, the layer uses the ordinary Transformer structure. In the part of the network jump connection, the residual block of the bottleneck structure is introduced. The jump connection allows the network to learn parameters autonomously during the training process and decide whether to ignore the layer of the network autonomously through back propagation. The bottleneck structure first uses a 1×1 convolution kernel to process the input and changes the channel feature dimension to 64. Then, a 3×3 convolution operation is performed while ensuring that the channel dimension remains unchanged. Finally, a 1×1 convolution kernel is used to expand the channel dimension of the feature map to 256. Compared with the ordinary residual block, the bottleneck structure shortens the time required for training the model and reduces the number of network parameters. This model solves the problem of too small deep resolution of the Unet model and can well identify the boundaries of the core box.

[0093] Furthermore, the core box dataset was used to train and test FCN, SegNet, Unet and improved MT-Unet respectively. The model training conditions are as follows: the graphics card uses Tesla100, the optimizer uses SGD, momentum (impulse unit) = 0.9, weight_decay (weight decay) = 0.0001, the initial learning rate is set to 0.001, the change of learning rate uses the cosine annealing strategy, the minimum learning rate is set to 1e-5, the maximum number of iterations is set to 100, and the batch number is set to 16; the loss function uses BCEDice Loss, which is a fused loss function consisting of two parts: BCE Loss (Binary Cross Entropy) and Dice Loss, where BCE Loss is the cross entropy of the binary classification problem, and Dice Loss describes the similarity between two profiles (predicted value and true value). BCE Dice Loss combines the two losses (loss function values) by weighting. The training and testing results are shown in Table 1 below:

[0094] Table 1:

[0095]

[0096]

[0097] Based on the above table, we can see that the effects of FCN series and UNet++ are not good, the effects of SegNet and UNet are very close, and MT-Unet has the best effect. As can be seen from the table, SegNet has the most parameters. Due to its highly symmetrical structure, the parameters of the decoder and encoder are equivalent, which is almost twice the parameters of the other models; MT-Unet has achieved the best effect without a significant increase in the number of parameters, proving the effectiveness of the MT-Unet improvement; the prediction results of each model are as follows Figure 8 As shown, we can see that the prediction effects of UNet and UNet++ have smoother edges, while the prediction effects of MT-Unet and SegNet are more detailed, and the edges are rougher.

[0098] Furthermore, the labeled core box data set is input into the MT-Unet neural network model for training to obtain a trained MT-Unet neural network model, namely, the core box recognition model. Among them, MT-Unet has been trained for 100 iterations, and the loss value of the training result is 0.0546, which can well complete the recognition of the core box.

[0099] S1013. Input the core box image of the geological exploration site into the core box recognition model to generate a mask image.

[0100] Specifically, the core box recognition model can be used to output the model for the core box images of geological exploration sites obtained by mobile shooting equipment. MT-Unet accepts input of any size. For example, for a core resolution image with a length of 1366×768, the image is first divided into small blocks of the same size after the patch module. The image block size is 342×192×3. Two M-Transformers are used to extract image features in the encoder stage. The feature dimensions are converted from 342×192×3 to 86×48×6, 22×12×12, and 6×3×24. As the image size decreases, the patch size increases. The feature dimension of (image block) will be increased by 2 times; in the decoder stage, a residual module with a bottleneck structure is embedded in the jump connection part, and the patch is decoded using an M-Transformer that is symmetrical to the encoder. Sub-pixel convolution is used instead of traditional bilinear interpolation to upsample the feature map by 2 times and halve the feature dimension; finally, the image is predicted at the pixel level through a fully connected layer; according to the predicted probability value, the box area is marked as 1 and the non-box area is marked as 0. By converting the pixels of the two-dimensional image, the pixel value of the box area becomes 255, and the pixel value of the non-box area remains unchanged, thus obtaining a mask image.

[0101] S1014, determining the optimal core box circumscribed rectangle and outline vertex coordinates based on the mask image and the core box outline area.

[0102] Specifically, a contour detection post-processing algorithm is proposed by binarizing the mask image. The core box contour area and the circumscribed contour rectangle are combined to select the optimal circumscribed contour rectangle through multiple combined optimization methods. The optimal core box circumscribed rectangle and contour vertex coordinates are obtained, and the contour vertex coordinates are returned to the front end.

[0103] S1015. Generate a core box main body image using perspective transformation based on the contour vertex coordinates.

[0104] Specifically, different original core box images (i.e., images of core boxes at geological exploration sites) are shot at different angles, and a perspective transformation operation is needed to transform the irregular core box area in the image into a standard rectangular area. The size of the rectangle is the average length and width of the core box in the original image. The contour vertex coordinates are combined with the input original core box image to obtain a core box area image with a regular spatial position through perspective transformation, which can eliminate image distortion caused by the shooting angle problem of the mobile device.

[0105] In the above optional implementation, the MT-Unet model, compared with classic semantic segmentation neural network models such as FCN, SegNet, and Deeplab, has significantly smaller parameters than other models, and can achieve extremely excellent recognition effects, reduce service deployment overhead, save a lot of costs, and has strong practical application value.

[0106] As an optional embodiment of the present invention, Fig. 9 As shown, the above S1011, i.e., using the enrichment region recognition algorithm to process the core box image at the geological exploration site to generate the core box contour area, includes:

[0107] S10111. Use the Otsu binarization algorithm to identify the core box images at the geological exploration site and generate a core exploration description board.

[0108] Specifically, the core box image at the geological exploration site is uploaded to the server through the front-end web page to establish the core map regional feature engineering: the core box to be identified has a white core exploration description board (generally rectangular in shape) indicating the rock and soil properties, and the main body of the core box is below the core exploration description board.

[0109] Furthermore, the core box images at the geological exploration site can be binarized using the Otsu method, and the pixel threshold can be automatically identified to identify the core exploration instruction plate.

[0110] S10112. Remove the area above the lower edge of the core exploration description plate to generate a two-dimensional denoised grayscale image.

[0111] S10113. Perform morphological corrosion and dilation processing on the two-dimensional denoised grayscale image to generate the minimum circumscribed rectangle of the core box.

[0112] Specifically, Figure 10-12 As shown in the figure, after the interference above the lower edge of the white board (i.e., the core exploration description board) is eliminated, the binary grayscale image of the core box has a richer outline in the middle area, and whether it is a core box area can be judged by the degree of outline enrichment. However, the core outline is relatively sparse at this time, so a morphological blur operation is performed to remove part of the noise in the image, and then an erosion operation is performed to remove the messy and irrelevant areas in the image environment background, and then an expansion operation is performed to make the enriched area more obvious; finally, the boundaries of the enriched area are screened in both horizontal and vertical directions, that is, when a straight line in a horizontal direction passes through enough white areas, it is determined to have reached the boundary of the enriched area and marked as the boundary. The same is true for the vertical direction, thereby generating the minimum circumscribed rectangle of the core box.

[0113] S10114. Compare the minimum circumscribed rectangle of the core box with the enrichment area identification threshold, and determine the core box contour area based on the comparison result.

[0114] Specifically, since the minimum circumscribed rectangle of the core box is sensitive to small local disturbances in the surrounding area, such as the appearance of a short-term enriched area, it will produce a bad effect. Therefore, in order to address the noise influence of the short-term dense area, an enriched area recognition threshold is added to improve the robustness of the algorithm, and the recognition threshold is used to limit the boundary algorithm to determine the core box contour area.

[0115] Furthermore, the steps of determining the core box contour area using the recognition threshold boundary algorithm are as follows: when judging the boundary, the boundary is considered correct only when several consecutive judgments meet the enrichment area recognition threshold, otherwise it is not considered as a boundary; let the enrichment area recognition threshold be thresh, and the number of consecutively satisfied recognition thresholds be thresh num When judging the boundary, first calculate the number of points with a pixel value of 255 in both the horizontal and vertical directions, set to n; use the sliding window form to count, if there is a continuous thresh num If n exceeds thresh, the window stops sliding and takes the starting position of the window as the boundary; in the horizontal direction, the boundaries in each direction need to be determined; in the vertical direction, since the upper boundary has been determined in the process of identifying the whiteboard, it is only necessary to confirm the lower boundary to obtain the vertex coordinate information of the core box contour area position, and then generate the core box contour area from the vertex coordinate information of the core box contour area position; the code for the algorithm for identifying the threshold limit boundary is as follows:

[0116] Input: binary image image1, upper edge miny, recognition threshold p, number of recognition thresholds p num Output: coordinates of four vertices;

[0117] 1.x1=0, x1then=0, x2=image1.shape[1]-1, x2then=x2, y1=image1.shape[0]-1, y1then=y1;

[0118] 2. / / Initialize x1, x2, y1, x1then, x2then, y1then. x1, x2, y1 represent the two horizontal coordinates and the vertical coordinate of the lower edge of the rectangle, and the upper edge is miny. x1then, x2then, y1then are used for counting. For example, x1then records the number of consecutive horizontal coordinates whose number of pixels is 255 and exceeds the recognition threshold.

[0119] 3.x1Num=0, x2Num=0, y2Num=0;

[0120] 4. Calculate the number of all pixels with a value of 255 at a certain horizontal coordinate, and record it as array y;

[0121] 5. Calculate the number of all pixels with a value of 255 at a certain vertical coordinate, recorded as array x;

[0122] 6.while x1 <image1.shape[1]do

[0123] if y[x1then]>p then

[0124] x1Num=x1Num+1;

[0125] else

[0126] x1=x1then,x1Num=0;

[0127] end

[0128] if x1Num>p num then

[0129] break;

[0130] end

[0131] x1then++;

[0132] end

[0133] 17. The calculation method of x2 and y1 is the same as above;

[0134] 18. Return the coordinates of 4 vertices, the coordinates are (x1, y1) (x2, y1) (x1, miny) (x2, miny)

[0135] As an optional embodiment of the present invention, Fig.13As shown, the above S1014, i.e. determining the optimal core box circumscribed rectangle and contour vertex coordinates based on the mask image and the core box contour area, includes:

[0136] S10141. Binarize the mask image, and perform contour detection on the mask image after the binarization process to generate multiple contour rectangles.

[0137] Specifically, the core box recognition model is used to output a mask image. However, the core box is not completely irregular. The core box area is a quadrilateral, and the irregular shape of the mask image cannot reflect the characteristics of the quadrilateral. In addition, the irregular shape is not conducive to the user to adjust the core box area. Therefore, in order to obtain the four vertices of the quadrilateral and simplify the information of the core box area, the contour detection post-processing algorithm is used to process the mask image.

[0138] Furthermore, the mask image is binarized, and then contour detection is performed on the binary image. Since some images may generate multiple identification areas during semantic segmentation, contour detection may generate multiple contours, and the largest connected domain needs to be found.

[0139] S10142. Analyze multiple contour rectangles based on the core box contour area, and remove contour rectangles outside the core box.

[0140] Specifically, the mask image is analyzed according to the core box contour area, and multiple contours located outside the core box can be excluded.

[0141] S10143. Sort the remaining contour rectangles according to their contour perimeters, and select the contour rectangle with the largest contour perimeter as the target area based on the sorting result; wherein the remaining contour rectangles are other contour rectangles among the multiple contour rectangles except the contour rectangle of the core box.

[0142] Specifically, the remaining contour rectangles are sorted according to the contour perimeter, the contour with the largest perimeter is taken as the target area, and the vertices are obtained by polygon fitting.

[0143] S10144. Perform polygon fitting on the target area to determine the number of vertices in the target area.

[0144] S10145. Compare the number of vertices in the target area with the number of vertices in the quadrilateral. When the number of vertices in the target area does not match the number of vertices in the quadrilateral, perform minimum rectangle fitting on the target area to generate an optimal core box circumscribed rectangle and contour vertex coordinates corresponding to the optimal core box circumscribed rectangle.

[0145] Specifically, the number of polygon vertices (i.e., the number of vertices in the target area) is determined. If there are 4 vertices, it means that a quadrilateral is fitted; otherwise, the polygon is fitted with a minimum rectangle; the IOU (Intersection over Union, a standard for measuring the accuracy of detecting corresponding objects in a specific data set) is calculated between the identified area and the target area. Usually, the result obtained by MT-Unet semantic segmentation is more accurate than the enrichment recognition method. If the IOU is greater than 90%, the coordinate values ​​and IOU information recognized by MT-Unet are returned to the front-end page, and the next step of column erection is carried out; otherwise, a recognition error is returned and manual intervention is required.

[0146] As an optional embodiment of the present invention, Fig.14 As shown, the above S103, i.e., based on the core box main body diagram, using the slope optimized straight line detection fitting algorithm to generate the segmented fitting straight line information, includes:

[0147] S1031. Based on the core box main body diagram, a local horizontal boundary line segment set is generated using a straight line segment detection algorithm.

[0148] Specifically, in an image, a boundary may be split into multiple line segments due to occlusion or other reasons, so all boundary line segments need to be extracted; the present invention adopts EDLines algorithm (edge ​​drawing lines) to detect local horizontal boundary line segments in the core box main body image, and the specific steps are: first, a filter kernel is used to traverse the image to suppress noise, and then the pixel gradient is calculated, and the "anchor" is selected with a larger gradient. These anchors represent points that are very likely to be part of the line segment, and then the anchor points are connected to generate an initial line segment. The initial line segment will be not smooth, so it is necessary to screen and remove unqualified points. The least squares method is used to make the line segment smoother. After EDLines introduces anchors, the detection speed is greatly improved by connecting anchor points instead of calculating the circumscribed rectangle. Therefore, EDLines is used to detect straight line segments.

[0149] S1032. Perform connected domain analysis on the set of local horizontal boundary line segments to generate multiple straight lines.

[0150] Specifically, the gradient size δ and direction θ of all points in the image are first calculated. It should be noted that through multiple experiments, δ is selected as 20 and θ is 3. Then, the adjacent points with small gradient direction changes are regarded as a connected domain. Then, according to the rectangularity of each domain, it is determined whether it needs to be disconnected according to the rules to form multiple domains with larger rectangularity. Finally, all the generated domains are improved and screened, and the domains that meet the conditions are retained, which are the final straight line detection results. The detection speed is fast and no parameter adjustment is required. The error control method is used to improve the accuracy of straight line detection.

[0151] Furthermore, after obtaining the set of local horizontal boundary segments, since the boundary segments are distributed on the straight line where the boundary is located, the location of the boundary can be found from the boundary segments; the connected domain analysis is used to merge adjacent local edge lines, and the specific steps are as follows: when analyzing the connected domain, the connected domain is first integrated to return the attributes of each connected area, including the number of labels, label matrix, connected area circumscribed rectangle and centroid; then, the connected area with a diagonal length greater than a certain threshold is found, and the position of its circumscribed rectangle is obtained, and the edge segments are grouped, each rectangular area is a group, and the connected areas belonging to the same boundary are grouped; then for each group, straight line detection is performed separately; the obtained rectangles are divided into categories according to the vertical position, and the characteristic values ​​of the rectangles at the same horizontal position are classified into the same category. At this time, the circumscribed rectangle of the connected area belonging to each horizontal line is obtained; the next step is to classify the points according to the connected area classification, that is, the straight lines on each horizontal line are fitted separately.

[0152] S1033. Compare the plurality of straight lines with preset conditions respectively, sort the straight lines that meet the preset conditions vertically, and generate piecewise fitting straight line information.

[0153] Specifically, Fig.15 As shown in the figure, after straight line detection and connected domain extraction, multiple straight lines will be obtained, including straight lines with excessive deviation and multiple straight lines with too close distances; the straight lines whose deviation angle from the median straight line exceeds a certain threshold (i.e., the preset condition) are judged as deviated straight lines, and the straight lines whose spacing between two straight lines is less than a certain threshold are judged as coincident, the deviated straight lines and redundant coincident straight lines are eliminated, and the straight lines are sorted from top to bottom according to the vertical coordinate to obtain the extracted core box edge straight lines, i.e., the piecewise fitting straight line information.

[0154] Furthermore, the pseudo code of the line detection algorithm is as follows:

[0155] Input: core box area image, maximum slope max_angle, minimum length min_len

[0156] Output: real straight line set image lines

[0157] 1.grey=cvtColor(image); / / Convert the image to grayscale;

[0158] 2.sobel = Sobel (grey); / / Use the sobel operator to perform horizontal sharpening on the image;

[0159] 3.lines = createEDLines().detect(sobel); / / Use EDLines line segment detection algorithm to get the line segment set selected_lines;

[0160] 4. selected_lines = filter_line(lines, max_angle, min_len); / / Filter the line segments in the set, requiring the slope to be approximately horizontal. For each line segment, if the slope is greater than max_angle or the line segment length is less than min_len, remove it from selected_lines;

[0161] 5.image lines = lines2binary(selected_lines, image.shape); / / Draw the image separately in a matrix of the same size as the original image, denoted as image lines ;

[0162] 6.connected_component=detect_connected_components(image lines ); / / for image lines Perform operations to dilate the straight lines and integrate the connected areas in the graph, which will merge some closely spaced straight lines.

[0163] 7.classify = classify_labels(connected_components); / / Classify the incoming rectangles according to their vertical positions, and classify the feature values ​​of rectangles at the same horizontal position into the same category, so that the connected domains of the same horizontal line are found;

[0164] 8. lines = fit_lines(classify) performs straight line fitting for each connected region on each set of horizontal lines, samples the points in the connected region, and fits multiple line segments into a straight line based on the sampling points;

[0165] 9. lines = modify_lines(lines); / / Remove some lines that do not meet the conditions. There are mainly two situations: the first is that the angle deviation is too large, and the second is that the interval is too small;

[0166] 10. Return the line set

[0167] In the above optional implementation, the straight line detection fitting algorithm based on slope optimization obtains standard segmentation information of the core box image through feature engineering and prior knowledge, and can better obtain the core box segmentation fitting straight line information and solve the core density and covering problems in the core box image.

[0168] As an optional embodiment of the present invention, Fig.16 As shown, the above S104, that is, fusing the standard segmentation information and the segmentation fitting straight line information to generate a core column diagram, also includes:

[0169] S1041. Calculate the intercept difference and the straight line angle between the standard segment information and the segment fitting straight line information.

[0170] Specifically, the two groups of straight lines, standard straight lines and true straight lines, have their own characteristics. Standard straight lines can roughly determine the positions of all boundaries, but the accuracy is relatively low. The accuracy of true straight lines is higher. However, due to the blurring and occlusion of boundaries, some boundary straight lines cannot be detected. Therefore, these straight lines need to be merged to find the accurate boundaries and fill in the missing boundaries. The criterion for judging whether two straight lines represent the same straight line is whether the distance between the two straight lines is less than a certain threshold. The specific algorithm flow is as follows:

[0171]

[0172] S1042: Compare the intercept difference with a first preset threshold, and compare the straight line angle with a second preset threshold.

[0173] S1043: When the intercept difference meets the first preset threshold and the straight line angle meets the second preset threshold, generate current straight line information.

[0174] Specifically, the equations of the two straight lines are first obtained. For adjacent straight lines, the intercept difference and the angle between the two lines are calculated as the basis for judgment, and a threshold is set. If one of the two indicators exceeds the threshold, the line is considered unqualified. In the data set, most of the pictures have 5 rows of cores. In order to unify the number of straight lines, this experiment collected a total of 1197 photos with 5 rows of cores, and counted the number of straight lines that met the requirements in each picture. The experiment set two thresholds: the intercept difference does not exceed 20, the angle does not exceed 0.2 and the intercept difference does not exceed 30, the angle does not exceed 0.25. The experimental results are shown in Table 2 below. As can be seen from Table 2, the above method can automatically detect straight lines well. When the qualified straight line is less than 4, the algorithm code will automatically call out this type of picture and adjust the straight line manually.

[0175] Table 2:

[0176]

[0177] Furthermore, by obtaining the final straight line information, the edge position coordinates of each core segment can be obtained. When the number of identified segments is less than 4, the relevant information will be returned to the front end and marked as an abnormal identification situation, which requires manual processing; when the number of identified segments is 4, that is, the core box block area is 5, subsequent operations can be performed.

[0178] S1044. Determine the edge position coordinates of each core segment based on the current straight line information, and generate a core column diagram based on the edge position coordinates of each core segment.

[0179] With land, such as Fig.17 As shown in the figure, based on the edge position coordinates of each core segment and combined with the core box picture at the geological exploration site, the perspective transformation operation is used to transform the irregular core box segment area in the image into a standard rectangular area with a length of 1m and a width of 20cm. Through perspective transformation, the image distortion caused by the shooting angle of the mobile device can be eliminated, and the stitching effect can be improved.

[0180] In the above optional implementation manner, on the basis of the traditional line segment detection method, operations such as straight line fusion, corner point detection, and affine transformation are added to fuse the standard segmentation information with the segment fitting straight line information to form a complete core box area segmentation and splicing process, which can better cut and splice the rock column of the core box map, and use perspective transformation to splice the core segments to obtain core columns, which solves the problem of incoherence and unsmoothness in cutting and splicing columns based on prior knowledge.

[0181] like Fig.18 As shown, a core column analysis method combined with an attention mechanism is described below through a specific embodiment.

[0182] Embodiment 1:

[0183] like Fig.19 This embodiment is applied in a multi-level core column analysis device, which includes a front-end (Vue+ElementUI), an application layer, a service layer, an algorithm layer, and a data storage layer (including a relational database management system MySQL and an object storage service database OBS). The front-end adopts a Vue+ElementUI (Vue is a library for building an interactive Web interface, and ElementUI is a user interface framework based on Vue) architecture, and the algorithm layer and the service layer belong to the Java back-end. The service layer provides Python (a cross-platform computer programming language) service, and the analysis of the core column is realized through the interaction between the front-end and the Java back-end. The specific analysis steps are as follows:

[0184] Use mobile photography equipment to obtain core box images at geological exploration sites and create core box map datasets;

[0185] The gray value of the image is calculated by shooting the core image, the core exploration description board corresponding to the core box is identified, and the environmental noise is removed;

[0186] Through the enrichment recognition optimization algorithm, the minimum circumscribed rectangle of the core box is obtained to further screen the core box area;

[0187] The classic semantic segmentation model and the improved Unet neural network were trained respectively, and the optimal algorithm was selected according to the exploration needs to perform morphological recognition on the core box contour area;

[0188] By binarizing the mask image, a contour detection post-processing algorithm is proposed. By combining the enrichment area and the external contour rectangle, the optimal external contour rectangle is selected through multiple optimization methods, the coordinates of the contour vertices are obtained, and the vertex information is returned to the front end.

[0189] By obtaining the coordinates of the contour vertices and using morphological affine transformation and perspective transformation, the main body of the cut core box is obtained;

[0190] Through feature engineering and prior knowledge, the standard segmentation information of the core box diagram is obtained, and a straight line detection fitting algorithm based on slope optimization is proposed to obtain the segmented fitting straight line information of the core box.

[0191] By proposing a straight line fusion algorithm, the standard segmentation information and the segmentation fitting straight line information are fused, and the core segments are spliced ​​and erected using perspective transformation to obtain the rock column map;

[0192] Through the trained image classification neural network model, the lithology of the rock column diagram (i.e., the core column diagram) is identified in a sliding window mode to obtain the lithology classification information and output the exploration report.

[0193] The embodiment of the present invention also discloses a core column analysis system combined with an attention mechanism, such as Fig. 20 As shown, including:

[0194] The acquisition module 201 is used to obtain the core box picture at the geological exploration site, and generate the core box main body map based on the core box picture at the geological exploration site using the enrichment area recognition algorithm and the semantic segmentation algorithm; for details, please refer to the relevant description of S101 in the above method embodiment.

[0195] The equal division module 202 is used to divide the width of the core box main body image into equal parts to generate standard segmentation information; for details, please refer to the relevant description of S102 in the above method embodiment.

[0196] The detection module 203 is used to generate piecewise fitting straight line information based on the core box main body diagram using a slope-optimized straight line detection fitting algorithm; for details, see the relevant description of S103 in the above method embodiment.

[0197] The fusion module 204 fuses the standard segmentation information and the segmentation fitting straight line information to generate a core column diagram; for details, see the relevant description of S104 in the above method embodiment.

[0198] The generation module 205 is used to input the core column map into the image neural network model to generate lithology classification information; for details, please refer to the relevant description of S105 in the above method embodiment.

[0199] The present invention provides a core column analysis system combined with an attention mechanism. Based on the core box pictures at the geological exploration site, the core box main body picture is generated by using the enrichment region recognition algorithm and the semantic segmentation algorithm. The core box main body can be separated from the picture containing the core box more accurately, avoiding the complicated operation of geological professionals on the pictures taken at the exploration site through professional software and equipment. In addition, the system combines the traditional computer vision algorithm (enrichment region recognition algorithm) and the deep learning algorithm (semantic segmentation algorithm), solving the problem that the traditional computer vision algorithm cannot adapt to complex environments. The problem of poor recognition of core box areas in field scenarios is solved, and the efficiency of post-processing of semantic segmentation results is also accelerated, which improves the accuracy of box area recognition; secondly, the standard segmentation information and the segmented fitting straight line information are integrated to generate a core column map, which solves the problem of incoherence and unsmoothness in segmenting and splicing columns based on prior knowledge; finally, the core column map is input into the image neural network model to generate lithology classification information, and the column report is automatically output in the prescribed format, which brings convenience to the exploration personnel to mark the lithology sections, which is of great significance for the initial site selection and exploration work of power station construction.

[0200] As an optional embodiment of the present invention, the acquisition module 201 includes: a processing submodule, which is used to process the core box image of the geological exploration site using the enrichment area recognition algorithm to generate the core box contour area; a training submodule, which is used to obtain the core box data set, train the semantic segmentation neural network model based on the core box data set, and generate the core box recognition model; a first generation submodule, which is used to input the core box image of the geological exploration site into the core box recognition model to generate a mask map; a determination submodule, which is used to determine the optimal core box circumscribed rectangle and contour vertex coordinates based on the mask map and the core box contour area; a transformation submodule, which is used to generate the core box main body image using perspective transformation based on the contour vertex coordinates.

[0201] As an optional embodiment of the present invention, the above-mentioned processing submodule includes: a generating unit, which is used to identify the core box image at the geological exploration site by using the Otsu binarization algorithm to generate a core exploration description board; a removing unit, which is used to remove the upper area of ​​the lower edge of the core exploration description board to generate a two-dimensional denoised grayscale image; a processing unit, which is used to perform morphological corrosion and expansion processing on the two-dimensional denoised grayscale image to generate a minimum circumscribed rectangle of the core box; and a first comparing unit, which is used to compare the minimum circumscribed rectangle of the core box with the enrichment area identification threshold, and determine the core box contour area based on the comparison result.

[0202] As an optional embodiment of the present invention, the above-mentioned determination submodule includes: a detection unit, which is used to binarize the mask image and perform contour detection on the binarized mask image to generate multiple contour rectangles; an analysis unit, which is used to analyze the multiple contour rectangles based on the core box contour area and remove the contour rectangles outside the core box; a sorting unit, which is used to sort the remaining contour rectangles according to the contour perimeter, and select the contour rectangle with the largest contour perimeter as the target area based on the sorting result; wherein the remaining contour rectangles are other contour rectangles of the contour rectangle other than the core box in the multiple contour rectangles; a fitting unit, which is used to perform polygon fitting on the target area to determine the number of vertices of the target area; a second comparison unit, which is used to compare the number of vertices of the target area with the number of quadrilateral vertices. When the number of vertices of the target area does not match the number of quadrilateral vertices, the target area is fitted with a minimum rectangle to generate an optimal core box circumscribed rectangle and contour vertex coordinates corresponding to the optimal core box circumscribed rectangle.

[0203] As an optional embodiment of the present invention, the above-mentioned detection module 203 includes: a second generation submodule, which is used to generate a local horizontal boundary line segment set based on the core box main body diagram using a straight line segment detection algorithm; an analysis submodule, which is used to perform a connected domain analysis on the local horizontal boundary line segment set to generate multiple straight lines; a first comparison submodule, which is used to compare the multiple straight lines with preset conditions respectively, sort the straight lines that meet the preset conditions vertically, and generate piecewise fitting straight line information.

[0204] As an optional embodiment of the present invention, the above-mentioned fusion module 204 includes: a calculation submodule, which is used to calculate the intercept difference and the straight line angle between the standard segmentation information and the segmented fitting straight line information; a second comparison submodule, which is used to compare the intercept difference with the first preset threshold and the straight line angle with the second preset threshold; a third generation submodule, which is used to generate current straight line information when the intercept difference meets the first preset threshold and the straight line angle meets the second preset threshold; a fourth generation submodule, which is used to determine the edge position coordinates of each core segment based on the current straight line information, and generate a core column diagram based on the edge position coordinates of each core segment.

[0205] In addition, an embodiment of the present invention further provides an electronic device, such as Fig.21 As shown, the electronic device may include a processor 110 and a memory 120, wherein the processor 110 and the memory 120 may be connected via a bus or in other ways. Fig.21 In the example, the connection through a bus is taken. In addition, the electronic device further includes at least one interface 130, and the at least one interface 130 may be a communication interface or other interface, which is not limited in this embodiment.

[0206] The processor 110 may be a central processing unit (CPU). The processor 110 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.

[0207] The memory 120, as a non-transient computer-readable storage medium, can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to a core column analysis method combined with an attention mechanism in an embodiment of the present invention. The processor 110 executes various functional applications and data processing of the processor by running the non-transient software programs, instructions and modules stored in the memory 120, that is, realizing a core column analysis method combined with an attention mechanism in the above method embodiment.

[0208] The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data created by the processor 110, etc. In addition, the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 120 may optionally include a memory remotely arranged relative to the processor 110, and these remote memories may be connected to the processor 110 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0209] In addition, at least one interface 130 is used for communication between the electronic device and external devices, such as communication with a server, etc. Optionally, at least one interface 130 can also be used to connect external input and output devices, such as a keyboard, a display screen, etc.

[0210] The one or more modules are stored in the memory 120 and when executed by the processor 110, perform the following steps: Figure 1 A core pillar analysis method combined with an attention mechanism in the illustrated embodiment.

[0211] For details of the above electronic equipment, please refer to Figure 1 The corresponding related descriptions and effects in the illustrated embodiments can be understood and will not be repeated here.

[0212] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.

[0213] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the invention.

Claims

1. A core column analysis method combined with an attention mechanism, characterized in that: include: Obtaining a core box image at a geological exploration site, and generating a core box main body image based on the core box image at the geological exploration site using an enrichment region recognition algorithm and a semantic segmentation algorithm; Divide the width of the core box main body image into equal parts to generate standard segmentation information; Based on the core box main body diagram, using a slope-optimized straight line detection fitting algorithm to generate piecewise fitting straight line information; The standard segmentation information and the segmentation fitting straight line information are integrated to generate a core column diagram; Inputting the core column image into an image neural network model to generate lithology classification information; The method of generating the optimal core box circumscribed rectangle and contour vertex coordinates based on the geological exploration site core box picture by using the enrichment region recognition algorithm and the semantic segmentation algorithm includes: Processing the core box image of the geological exploration site using an enrichment region recognition algorithm to generate a core box contour region; Acquire a core box data set, train a semantic segmentation neural network model based on the core box data set, and generate a core box recognition model; Inputting the geological exploration site core box picture into the core box recognition model to generate a mask map; Determine an optimal core box circumscribed rectangle and contour vertex coordinates based on the mask image and the core box contour area; Based on the coordinates of the contour vertices, generating a core box main body image by using perspective transformation; The method of processing the core box image of the geological exploration site using the enrichment region recognition algorithm to generate the core box contour region includes: Using the Otsu binarization algorithm to identify the core box image at the geological exploration site, and generate a core exploration description board; The area above the lower edge of the core exploration explanation plate is removed to generate a two-dimensional denoised grayscale image; Performing morphological corrosion and expansion processing on the two-dimensional denoised grayscale image to generate a minimum circumscribed rectangle of the core box; The minimum circumscribed rectangle of the core box is compared with the enrichment area identification threshold, and the core box contour area is determined based on the comparison result.

2. A core column analysis method combined with an attention mechanism according to claim 1, characterized in that: The determining of the optimal core box circumscribed rectangle and contour vertex coordinates based on the mask map and the core box contour area comprises: Binarizing the mask image, and performing contour detection on the mask image after the binarization process to generate a plurality of contour rectangles; Analyzing the plurality of contour rectangles based on the core box contour area, and removing contour rectangles outside the core box; Sorting the remaining contour rectangles according to the contour perimeter, and selecting the contour rectangle with the largest contour perimeter as the target area based on the sorting result; wherein the remaining contour rectangles are other contour rectangles among the multiple contour rectangles except the contour rectangle of the core box; Performing polygon fitting on the target area to determine the number of vertices of the target area; The number of vertices in the target area is compared with the number of vertices in the quadrilateral. When the number of vertices in the target area does not match the number of vertices in the quadrilateral, a minimum rectangle fitting is performed on the target area to generate the optimal core box circumscribed rectangle and the contour vertex coordinates corresponding to the optimal core box circumscribed rectangle.

3. A core column analysis method combined with an attention mechanism according to claim 1, characterized in that: The generating of the segmented fitting straight line information based on the core box main body diagram using the slope optimized straight line detection fitting algorithm comprises: Based on the core box main body diagram, a local horizontal boundary line segment set is generated using a straight line segment detection algorithm; Performing a connected domain analysis on the local horizontal boundary line segment set to generate a plurality of straight lines; The plurality of straight lines are compared with preset conditions respectively, the straight lines meeting the preset conditions are sorted vertically, and the piecewise fitting straight line information is generated.

4. A core column analysis method combined with an attention mechanism according to claim 1, characterized in that: The step of fusing the standard segmentation information and the segmentation fitting straight line information to generate a core column diagram includes: Calculating the intercept difference and the straight line angle between the standard segment information and the segment fitting straight line information; Compare the intercept difference with a first preset threshold, and compare the straight line angle with a second preset threshold; When the intercept difference meets the first preset threshold, and the straight line angle meets the second preset threshold, generating current straight line information; The edge position coordinates of each core segment are determined based on the current straight line information, and the core column diagram is generated based on the edge position coordinates of each core segment.

5. A core column analysis method combined with an attention mechanism according to claim 1, characterized in that: The step of inputting the core column diagram into the image neural network model to generate lithology classification information includes: The core column map is segmented using a sliding window mode, and the segmented core column map is input into the image neural network model to generate the lithology classification information.

6. A core column analysis system combined with an attention mechanism, characterized in that: include: An acquisition module is used to acquire a core box image at a geological exploration site, and based on the core box image at the geological exploration site, generate a core box main body image using an enrichment region recognition algorithm and a semantic segmentation algorithm; An equal division module, used for equally dividing the width of the core box main body image to generate standard segmentation information; A detection module, for generating piecewise fitting straight line information based on the core box main body diagram using a slope-optimized straight line detection fitting algorithm; A fusion module, which fuses the standard segmentation information and the segmentation fitting straight line information to generate a core column diagram; A generation module, used for inputting the core column image into an image neural network model to generate lithology classification information; The acquisition module includes: a processing submodule, which is used to process the core box picture of the geological exploration site using the enrichment area recognition algorithm to generate the core box contour area; a training submodule, which is used to obtain the core box data set, train the semantic segmentation neural network model based on the core box data set, and generate the core box recognition model; a first generation submodule, which is used to input the core box picture of the geological exploration site into the core box recognition model to generate a mask map; a determination submodule, which is used to determine the optimal core box circumscribed rectangle and contour vertex coordinates based on the mask map and the core box contour area; a transformation submodule, which is used to generate the core box main body map based on the contour vertex coordinates using perspective transformation; The processing submodule includes: a generating unit, which is used to identify the core box picture of the geological exploration site by using the Otsu binarization algorithm to generate a core exploration description board; a removing unit, which is used to remove the upper area of ​​the lower edge of the core exploration description board to generate a two-dimensional denoised grayscale picture; a processing unit, which is used to perform morphological corrosion and expansion processing on the two-dimensional denoised grayscale picture to generate a minimum circumscribed rectangle of the core box; and a first comparing unit, which is used to compare the minimum circumscribed rectangle of the core box with the enrichment area identification threshold, and determine the core box contour area based on the comparison result.

7. An electronic device, characterized in that: comprising a processor and a memory, the memory being coupled to the processor; The memory stores computer-readable program instructions, and when the instructions are executed by the processor, the method according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Adaptive meta-learning lithology identification method and device based on attention

    CN114708517A