A core measurement method and device based on bidirectional cascade pixel difference network
Through the core measurement method based on the bidirectional cascaded pixel differential network, the problem of low accuracy of core measurement results in the prior art is solved, and higher measurement accuracy and more efficient exploration process are achieved.
Patent Information
- Application Number
- CN202310655780.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-02
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2043-06-02
AI Technical Summary
The accuracy of the core measurement results of the existing technology is low, which affects the subsequent exploration geological analysis work.
The core measurement method based on a bidirectional cascaded pixel differential network is adopted. By acquiring multiple core images, the edge detection model is trained to generate a bidirectional cascaded pixel differential network model, and then edge prediction, rectangular frame generation and measurement of the core box main map is performed to improve the accuracy of the measurement results.
It improves the accuracy of core measurement results, simplifies the exploration process, and improves the exploration work efficiency.
Smart Images

Figure CN116630352B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of core measurement, and in particular to a core measurement method and device based on a bidirectional cascade pixel difference network. Background Art
[0002] Large and medium-sized water conservancy and hydropower projects are mostly located in high mountain valleys with complex geological conditions, well-developed fault structures, and significant differences in the integrity of rock masses in different regions. Accurate and objective judgment of geological conditions and rock mass integrity is an important prerequisite for the design and construction of water conservancy and hydropower projects.
[0003] Due to the complexity and high risk of field exploration conditions and the interference of many environmental factors, it is inconvenient to conduct core measurement in the field. The entire measurement process has problems such as strong subjectivity, long cycle, and high degree of danger. In addition, due to the subjective differences in color recognition among different people, color records may be inaccurate, affecting the subsequent exploration geological analysis work. Summary of the invention
[0004] In view of this, the present invention provides a core measurement method and device based on a bidirectional cascade pixel difference network to solve the problem that the accuracy of core measurement results in the prior art is low, which affects the subsequent exploration geological analysis work.
[0005] In a first aspect, the present invention provides a core measurement method based on a bidirectional cascade pixel difference network, comprising:
[0006] Acquire multiple core images, train the edge detection model based on the multiple core images, and generate a bidirectional cascade pixel difference network model;
[0007] Obtain the main body image of the core box, input the main body image of the core box into the bidirectional cascade pixel difference network model, and generate an initial edge prediction map;
[0008] Processing the initial edge prediction map to generate a core rectangular frame;
[0009] Core measurements are performed on the core box main body diagram based on the core rectangular frame to generate core features.
[0010] This embodiment provides a core measurement method based on a bidirectional cascade pixel difference network, a bidirectional cascade pixel difference network model, and processes the initial edge prediction map to generate a core rectangular frame, and then performs core measurement on the core box main body map based on the core rectangular frame, thereby improving the accuracy of the core measurement results, simplifying the exploration process, and improving the efficiency of exploration work.
[0011] In an optional implementation, an edge detection model is trained based on multiple core images to generate a bidirectional cascade pixel difference network model, including:
[0012] Obtain an edge detection data set, train an edge detection model based on the edge detection data set, and determine an optimal network structure; wherein the optimal network structure is composed of a pixel differential convolutional network and a bidirectional cascade network;
[0013] Perform edge annotation on multiple core images to generate edge type datasets;
[0014] Perform data enhancement on edge type datasets to generate core edge datasets;
[0015] The optimal network structure is trained through transfer learning based on the core edge dataset to generate a bidirectional cascade pixel difference network model.
[0016] In the above optional implementation, compared with the previous semantic segmentation and instance segmentation methods, training the edge detection model based on multiple core images lays the foundation for intelligent core identification and measurement, and improves the accuracy of core measurement results to a certain extent.
[0017] In an optional implementation, the initial edge prediction map is processed to generate a core rectangular frame, including:
[0018] Perform non-maximum suppression processing on the initial edge prediction map to generate a core box main body edge detection map;
[0019] Perform block segmentation processing on the edge detection map of the core box body to generate a block edge detection map;
[0020] Based on the block edge detection map, the core rectangle frame is generated using the core boundary extraction algorithm.
[0021] In the above optional implementation manner, by performing non-maximum suppression processing, block segmentation processing and core boundary extraction algorithm on the initial edge prediction map, the generated core rectangular frame is made more accurate, laying a foundation for subsequent core measurement.
[0022] In an optional embodiment, the core characteristics include:
[0023] Core box section core quality index values, average core length, core color, core category and stratification information.
[0024] In an optional implementation, core measurement is performed on the core box main body diagram based on the core rectangular frame to generate core features, including:
[0025] Determine the pixel length value based on the core rectangular frame, and calculate the core quality index value and the core average length based on the pixel length value;
[0026] Perform color gamut correction on the main image of the core box, and cut the main image of the core box after color gamut correction according to the core rectangular frame to generate rectangular outline information of the core block area;
[0027] Input the rectangular outline information of the core block area into the convolutional neural classification network to generate the core category;
[0028] Based on the core category, the core color is determined through a comparison table database; wherein the comparison table database includes a matching relationship between different core categories and different core colors;
[0029] Layer information is determined based on core category and core color.
[0030] In the above optional implementation, by cutting the corrected core box main body image to obtain the rectangular outline information of the core block area, the information is sent to the trained convolutional neural classification network for classification and recognition according to the block area and exploration order, which can eliminate the influence of other environmental factors on the background, such as trees, weeds, exposed core boxes, etc. At the same time, through color correction, factors such as shooting equipment, weather, sunlight, etc. can also be eliminated to obtain a more accurate recognition effect.
[0031] In an optional implementation, the core quality index value and the core average length are calculated based on the pixel length value, including:
[0032] Obtaining an error coefficient, calculating a core length based on the pixel length value and the error coefficient, and calculating an average core length based on the core length;
[0033] The core quality index value is calculated based on the core length.
[0034] In the above optional implementation manner, the average core length as a measurement indicator can better demonstrate the core quality level when the RQD is approximate.
[0035] In an optional embodiment, based on the core category, the core color is determined by a comparison table database, including:
[0036] Determine the pixel points of the core block based on the rectangular outline information of the core block area, compare the pixel points of the core block with the standard color library, and generate a predicted color;
[0037] Based on the core category, the core color is determined through the comparison table database;
[0038] Compare the predicted color with the core color, and when the predicted color is the same as the core color, output the core color.
[0039] In the above optional implementation, according to the core category detection result, an abnormal recognition processing algorithm is used, that is, the predicted color is compared with the core color and the core color is output, so that the core category can be predicted more accurately and the core stratification information can be obtained.
[0040] In a second aspect, the present invention provides a core measurement device based on a bidirectional cascade pixel difference network, comprising:
[0041] A training module, used for acquiring multiple core images, training an edge detection model based on the multiple core images, and generating a bidirectional cascade pixel difference network model;
[0042] A generation module is used to obtain a core box main body image, input the core box main body image into a bidirectional cascade pixel difference network model, and generate an initial edge prediction map;
[0043] A processing module is used to process the initial edge prediction map to generate a core rectangular frame;
[0044] The measurement module is used to perform core measurement on the core box main body diagram based on the core rectangular frame to generate core features.
[0045] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to execute a core measurement method based on a bidirectional cascaded pixel differential network according to the first aspect or any corresponding embodiment thereof.
[0046] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute a core measurement method based on a bidirectional cascaded pixel differential network according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] 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.
[0048] Figure 1 is a schematic flow chart of a core measurement method based on a bidirectional cascade pixel difference network according to an embodiment of the present invention;
[0049] Figure 2 is a schematic diagram of a core image of an embodiment of the present invention;
[0050] Figure 3 is a schematic diagram of operator detection according to an embodiment of the present invention;
[0051] Figure 4 is a schematic diagram of using an Anchorbox (anchor frame) to identify the approximate position of a core according to an embodiment of the present invention;
[0052] Figure 5 is a schematic diagram of a central pixel differential convolution structure according to an embodiment of the present invention;
[0053] Figure 6 is a schematic diagram of a neighborhood pixel differential convolution structure according to an embodiment of the present invention;
[0054] Figure 7 is a schematic diagram of a radiation pixel differential convolution structure according to an embodiment of the present invention;
[0055] Figure 8 is a schematic flow chart of another core measurement method based on a bidirectional cascade pixel difference network according to an embodiment of the present invention;
[0056] Fig. 9 is the original image of the core image in the edge detection data set of the embodiment of the present invention;
[0057] Fig.10 is a labeling graph in an edge detection data set according to an embodiment of the present invention;
[0058] Fig.11 is the original image of the core image in the embodiment of the present invention;
[0059] Fig.12 is a core edge map before transfer learning in an embodiment of the present invention;
[0060] Fig.13 is a core edge prediction map after the fifth training iteration of the embodiment of the present invention;
[0061] Fig.14 is a core edge prediction map after the tenth training iteration in an embodiment of the present invention;
[0062] Fig.15 is a flow chart of another core measurement method based on a bidirectional cascade pixel difference network according to an embodiment of the present invention;
[0063] Fig.16 is a schematic diagram of using the large rectangular kernel to perform an opening operation on an image according to an embodiment of the present invention;
[0064] Fig.17 is a schematic diagram of the core boundary extraction effect of an embodiment of the present invention;
[0065] Fig.18is a flow chart of another core measurement method based on a bidirectional cascade pixel difference network according to an embodiment of the present invention;
[0066] Fig.19 is a schematic diagram of an image before core box block segmentation according to an embodiment of the present invention;
[0067] Fig. 20 Schematic diagram of core box block segmentation according to an embodiment of the present invention;
[0068] Fig.21 is a structural block diagram of a core measurement device based on a bidirectional cascade pixel difference network according to an embodiment of the present invention;
[0069] Fig. 22 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are 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 those skilled in the art without creative work are within the scope of protection of the present invention.
[0071] RQD is an important rock quality evaluation indicator and is widely used in water conservancy projects. RQD is defined as the ratio of the length of the core section greater than 10 cm (centimeter) to the footage per round. In geological exploration and analysis, the color difference of the core can reflect different rock characteristics, and the high or low RQD value of the core can directly reflect the geological conditions of the exploration. Due to the complexity and high danger of field exploration conditions and the interference of many environmental factors, it is inconvenient to measure the core in the field. The entire measurement process has problems such as strong subjectivity, long cycle, and high degree of danger. In addition, due to the subjective differences in color recognition among different people, the color record may be inaccurate, which affects the subsequent exploration and geological analysis work.
[0072] In the field of image edge detection, traditional detection operators such as Sobel and Canny use differential gradient information to characterize the mutation and detail features of the image edge context. However, these traditional operator models based on manually setting the filter kernel size are often limited to shallow characterization capabilities. Due to the complex shooting environment of core images and the presence of many fine lines and uneven colors on the core surface, it is difficult to obtain accurate edge detection results in the complex scene of core images using traditional detection operators. Figure 2-3 shown.
[0073] The object detection algorithm based on deep learning can only use the anchor box to identify the approximate location of the core, but cannot accurately detect the length of the core; using semantic segmentation requires a larger data set to achieve better results, and the training and reasoning time is longer. Figure 4 As shown in Figure 1, semantic segmentation is a computer vision technology that aims to segment an image into regions with semantic meaning. It can identify which category each pixel in the image belongs to, but cannot accurately identify the contour edges of objects.
[0074] In the field of deep learning, common edge detection neural networks include HED (Holistically-Nested Edge Detection, an end-to-end edge detection network), RCF (an accurate edge detector using richer convolutional features), etc. The CNN (convolutional neural network) used by them can effectively capture the semantic features of images. However, in the process of random initialization of the convolution kernel, ordinary convolution operations have no restrictions on gradient encoding, making it difficult for ordinary convolutions to focus on image gradient information during training, thereby increasing the difficulty of edge detection training and affecting the accuracy of edge prediction.
[0075] Related technologies disclose a fast RQD analysis method, which uses different image recognition technologies, converts the image into an octal image, and uses image ruler software to extract image information. Digital image processing is used for image recognition and segmentation, which is simple to calculate and highly efficient. It only considers the characteristics of the grayscale value of the pixel itself, and generally does not consider spatial characteristics. The core recognition rate is not high for images with similar background colors.
[0076] Related technology discloses an intelligent method for identifying RQD from borehole core photos. The image is identified based on the Mask-R-CNN (an instance segmentation algorithm) deep learning network, and a single row of cores is trained. The RQD statistics are also statistics for a row of cores. The Mask-Head (the part of the classification network without the classifier or fully connected layer) for prediction is introduced to predict the segmentation mask in a pixel-to-pixel manner, which improves the segmentation accuracy. However, the classification box and the predicted mask share the evaluation function, which sometimes interferes with the segmentation result.
[0077] Related technologies disclose RQD calculation methods based on deep learning models and core images. Image recognition uses Unet (deep learning network) to recognize images, and also single-row cores are recognized and counted. The advantage of Unet deep learning network is that it achieves better segmentation results on a very small training set.
[0078] The related technology discloses a core RQD digital statistical method, equipment and terminal based on image recognition technology, which is mainly a system-level design and does not involve specific edge detection methods.
[0079] Related technology discloses the use of UNet segmentation model to perform semantic segmentation on the borehole core image, obtain the core area and background area, find a single row of borehole core images, and then use the traditional edge detection algorithm to obtain the core contour, make a pixel waveform diagram, and use the curve fitting method to fit the core boundary from the partial boundary. This method is good for the identification of complete cores, but when there are a lot of gravel in the core box and the background area is more complex, it is difficult to identify the accurate contour through curve fitting. At the same time, this method has a slow recognition rate and requires correction of the recognition points and the core box boundary lines. It is only applicable to standard ideal conditions, has high requirements on the shooting angle of the core box image and the recognition effect, and has poor applicability to complex field conditions.
[0080] The accuracy of core measurement results is the core requirement of intelligent core measurement. The above-mentioned related technologies are affected by external factors, resulting in low accuracy of core measurement results, which in turn affects the subsequent exploration and geological analysis work.
[0081] According to an embodiment of the present invention, an embodiment of a core measurement method based on a bidirectional cascade pixel differential network is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0082] In this embodiment, a core measurement method based on a bidirectional cascade pixel difference network is provided, which can be used in the above-mentioned mobile terminals, such as mobile phones, tablet computers, etc. Figure 1 is a flow chart of a core measurement method based on a bidirectional cascade pixel difference network according to an embodiment of the present invention, such as Figure 1 As shown, the process includes the following steps:
[0083] Step S101, obtaining multiple core images, training an edge detection model based on the multiple core images, and generating a bidirectional cascade pixel difference network model.
[0084] Specifically, pixel differential convolution has a rigorous mathematical reasoning proof, and the pixel differential convolution can be converted into an ordinary convolution form through the corresponding calculation formula. The calculation process of pixel differential convolution is to set two convolution kernels for image feature extraction during training, and the differential value of the convolution kernel weights can be converted into an ordinary convolution through calculation during reasoning, and then the convolution operation is performed on the input feature map; this method can not only speed up the training phase, but also reduce the amount of additional calculations required during the reasoning process, that is, this method uses twice the training time to obtain better network effects, but during the reasoning process, it does not increase the parameter complexity of the network model and the time required for image reasoning.
[0085] Furthermore, if Figure 5 As shown in Figure 1, the main implementation method of the central pixel difference convolution (CPDC) is to select the center point of the convolution kernel corresponding to each image during the convolution operation (such as Figure 5 x1, x2, x3, x4, x5, x6, x7, x8 and x9) in the image are used as the reference point, and the neighborhood features of the reference point are centrally differenciated, that is, the values of other pixels in the neighborhood of the reference point (i.e. x5) are subtracted from the reference value (e.g. Figure 5 Then, the pixel value of the reference point is set to 0, and the new feature map obtained by the central pixel difference convolution kernel is convolved, and the result is output (such as Figure 5 w1, w2, w3, w4, w6, w7, w8 and w9); the conversion formula of the central pixel difference convolution CPDC is as follows:
[0086]
[0087] In the above formula, y1 represents the output result of the center pixel differential convolution, w i represents the weight, i represents the number of convolutions, x i Represents the original range pixel value (grayscale), Represents the new weight matrix.
[0088] Furthermore, the Angular Pixel difference convolution (APDC) is similar to the central pixel difference convolution in general, and the convolution kernel size is 33. The difference is that the Angular Pixel difference convolution performs pairwise difference on the neighborhood features of the reference point, that is, the pixels in the neighborhood of the reference point are differentiated in turn in a clockwise direction, and then the pixel value of the reference point is set to 0, and then the new feature map obtained by the Angular Pixel difference convolution kernel is convolved, and finally the result is output. The specific structure diagram of APDC is shown in the figure. Figure 6 As shown, the neighborhood pixel differential convolution can be converted into two ordinary convolutions for difference operation through the above APDC conversion formula. The neighborhood pixel differential convolution APDC conversion formula is as follows:
[0089]
[0090] In the above formula, y2 represents the output result of neighborhood pixel differential convolution.
[0091] Furthermore, the Radial Pixel difference convolution (RPDC) is slightly different from the above two differential convolutions. APDC and CPDC mainly perform differential convolution in a neighborhood of the reference point 33, while the Radial Pixel difference convolution RPDC has a larger receptive field of 55. RPDC mainly differentiates the outer ring and the inner ring of the differential field in the form of a diagonal line. The specific structural diagram is shown in the figure. Figure 7 As shown, the conversion formula of RPDC is as follows:
[0092]
[0093] In the above formula, y3 represents the output result of the radiation pixel differential convolution.
[0094] Furthermore, after the model training is completed, the difference in the ordinary convolution kernel can be calculated first, and then the calculated weights can be convolved with the image pixels to speed up the inference. In the training phase, twice the computing power is used to train the differential convolution kernel, while the speed of the inference phase is the same as that of the ordinary convolutional neural network.
[0095] Furthermore, in the original PiDiNet network, each Stage layer uses the same true value Label map to supervise the network. But in fact, due to the receptive field, the shallow network Stage layer in the PiDiNet network can only extract local low-level semantic information, while the deep network Stage layer can pay attention to large-scale target semantic information. If the same edge Label map is used to supervise each layer of the network, it cannot guide the network learning and training well. Each layer fails to learn the scale information suitable for this layer, and the generalization ability is poor.
[0096] Furthermore, as one of the most commonly used datasets in the field of edge detection, the BSDS500 dataset contains edges between a variety of objects. The edge detection effect on this dataset can well evaluate the performance of the model, and the evaluation results are widely recognized. Therefore, the present invention selects the BSDS500 dataset to perform ablation experimental analysis on the network. The BSDS500 edge detection dataset adds and averages the edge truth maps annotated by different annotators to obtain an edge probability map, ranging from 0 to 1, where 0 represents non-edge and 1 represents that all annotators have annotated this pixel.
[0097] Furthermore, since different images have different scale characteristics, as the parameters and structure of the network model change, the scale information extracted by different network layers in the model is also different, and it is basically not feasible to manually select the scale information that should be extracted by different network layers; in order to solve the above problems, a bidirectional cascade module (Bi-Directional Cascade, BDC) is introduced on the basis of the PiDiNet model (pixel difference network model) to better obtain multi-scale information in the network; the mathematical principle of the bidirectional cascade module is: let Y be the Label map of the edge, the Label map contains not only small-scale edges, but also large-scale edges, so there is a large scale change, in order to make different networks learn the scale extracted by the size of their own receptive field, the edge Label map can be decomposed into a superposition of different scales, expressed as follows:
[0098] Y=∑Y s (4)
[0099] In the above formula, Y s Indicates the label corresponding to a certain network layer of a deep learning neural network.
[0100] Furthermore, let N s Let D be the output feature map probability map of the sth network convolutional layer. s If the binarization operation of edge extraction is used, the supervision method of the sth layer is:
[0101] loss = ∑ | D s (N s )-Y s | (5)
[0102] Among them, loss represents the loss function.
[0103] Furthermore, the edge Label map Y is used to subtract the output confidence map Y of other layers i , where i∈[1, 2, j-1, j+1, ..., s], and then we get Y j The Label graph of , and as the supervision Label of the j-th layer, its calculation formula is as follows:
[0104] Y s ≈∑ i=s P i (6)
[0105] In the above formula, P i Represents the confidence error of the i-th layer.
[0106] Furthermore, due to Y s and P i There is a linear relationship between them. According to the chain rule of derivatives, Ys For any P i The derivative of is 1; for any binarization operation D i , all accept the same gradient, which means that the network supervision method still uses the same Label to supervise each layer in the network, and the middle layer does not automatically learn the scale information suitable for itself; in order to solve this problem, the Label map Y s Decomposed into two complementary supervisions, the specific formula is as follows:
[0107]
[0108]
[0109] In the above formula, Indicates positive supervision. represents the confidence error of the i-th layer in forward supervision, Reverse supervision, Represents the confidence error of the i-th layer in the reverse supervision.
[0110] Furthermore, positive supervision ignores supervision that is smaller than the S-layer network scale, and reverse supervision ignores supervision that is larger than the S-layer network scale. The output of each binarization operation for extracting edges is relative to the parameters of the D layer itself and is supervision of D. Therefore, the network can learn scale information that matches the perception of this network layer based on error back propagation.
[0111] Furthermore, the network model structure details such as the upsampling method of the model are improved. After ablation experiments, common edge indicators such as edge detection ODS (Optimal Dataset Scale, global best, fixed threshold), OIS (Optimal Image Scale, single image best, optimal threshold for each image) and AP (average accuracy) curve are compared. The results are shown in Table 1.
[0112] Table 1:
[0113]
[0114]
[0115] Furthermore, different edge detection problems usually focus on different scales, and the network with a higher average accuracy AP can better adapt to different task requirements during transfer learning training. Combining ODS and OIS, BDC-PiDiNet (bidirectional cascade pixel difference network) is selected as the final transfer learning model data.
[0116] Step S102, obtaining a core box main body image, inputting the core box main body image into a bidirectional cascade pixel difference network model, and generating an initial edge prediction map.
[0117] Step S103, processing the initial edge prediction image to generate a core rectangular frame.
[0118] Step S104, performing core measurement on the core box main body diagram based on the core rectangular frame to generate core features.
[0119] Specifically, core characteristics include: core box section core quality index value, core average length, core color, core category and stratification information.
[0120] The present embodiment provides a core measurement method based on a bidirectional cascade pixel differential network, using a pixel differential convolution network and a bidirectional cascade network, and proposes an improved lightweight edge detection network BDC-PiDiNet. The BDC-PiDiNet network uses sub-pixel convolution instead of the traditional upsampling method. The encoding part uses pixel differential convolution to extract the original gradient information of the image, and the decoding part uses a bidirectional cascade module to enhance the effectiveness of the network's multi-scale information extraction. Different from the traditional operator model, which is often limited to shallow representation capabilities and the problem that ordinary convolution in CNN convolutional neural networks is difficult to focus on image gradient information during training, the differential value of the convolution kernel weight is cleverly converted into an ordinary convolution, and then the input feature map is convolved, using twice the The training time obtained better network effect, but in the inference process, the parameter complexity of the network model and the time required for image inference were not increased; combining the advantages of traditional operator gradient information and deep learning convolution operations, the influence of different network structures on the detection effect was explored through ablation experiments, and the optimal BDC-PiDiNet architecture was selected. Compared with the original PiDiNet network, the ODS, OIS and AP values were improved; and a full-process high-precision core classification and identification and intelligent measurement method was proposed, which is conducive to the intelligent transformation of the exploration industry, and solves the problems of complex and dangerous field exploration conditions, interference from many environmental factors, strong subjectivity, long cycle and high degree of danger, which greatly simplifies the exploration process and improves the efficiency of exploration work.
[0121] In this embodiment, a core measurement method based on a bidirectional cascade pixel difference network is provided, which can be used in the above-mentioned mobile terminals, such as mobile phones, tablet computers, etc. Figure 8 is a flow chart of a core measurement method based on a bidirectional cascade pixel difference network according to an embodiment of the present invention, such as Figure 8 As shown, the process includes the following steps:
[0122] Step S801, obtaining multiple core images, training an edge detection model based on the multiple core images, and generating a bidirectional cascade pixel difference network model.
[0123] Specifically, the above step S801 includes:
[0124] Step S8011, obtaining an edge detection data set, training an edge detection model based on the edge detection data set, and determining an optimal network structure; wherein the optimal network structure is composed of a pixel differential convolutional network and a bidirectional cascade network.
[0125] Specifically, the edge detection dataset adopts the BSDS dataset.
[0126] Step S8012: perform edge annotation on multiple core images to generate an edge type data set.
[0127] Specifically, since the BSDS dataset contains not only large-scale edges but also small-scale edges, it is necessary to construct some core edge datasets about core boxes and cores to fine-tune the network to meet the task requirements.
[0128] Furthermore, the original photos are usually taken on-site by staff. Since the shooting posture and geographical location are not fixed, the shapes of the core box areas in the photos are different. To solve the above problems, a simple image processing tool was written using python (computer programming language) code. The tool requires the user to manually select the four corner points of the core box and transform the irregular core box into a more regular rectangular box shape through perspective transformation.
[0129] Furthermore, after obtaining the core image, it is necessary to annotate the core edge in the core box with linestrip. Use the Labelme tool (an image annotation tool developed by the Computer Science and Artificial Intelligence Laboratory of MIT) to select the core outline by clicking the mouse. Since the edges of the core area are relatively neat and most of them are straight line segments, in order to improve the annotation speed, the edge annotation type is selected as polygon during the annotation process. Compared with the Linestrip type, Polygon can automatically generate closed shapes. Due to the different sizes of core box photos, when using the manually annotated JSON (JavaScript Object Notation, JS object notation, a lightweight data exchange format) file to generate the edge map, there will be situations such as too thick edges. Therefore, by modifying the underlying generation logic of the Labelme2voc.py code, the Polygon field in the JSON file is rewritten as Linestrip, and the edge generation code is modified at the same time. The corresponding edge thickness is selected according to the image pixel size to ensure that the edge thickness of the generated image is adapted to the input image size.
[0130] Step S8013, perform data enhancement on the edge type data set to generate a core edge data set.
[0131] Specifically, Figure 9-10 As shown in the figure, in order to increase the anti-disturbance ability of the model, the open source tool Imguag was used to enhance the data of the labeled edge type dataset. A random combination of scaling, cropping, rotation, flipping, and channel RGB (color system) value changes was used to generate a data set of about 30,000 core edge datasets.
[0132] Step S8014, performing transfer learning training on the optimal network structure based on the core edge data set to generate a bidirectional cascade pixel difference network model.
[0133] Specifically, the relevant parameters of BDC-PiDiNet are set as follows: the training graphics card is V100 16G, the Adam (an extension of the stochastic gradient descent method) optimizer is used, the global learning rate is set to 0.002000, the number of iterations is 10, the weight decay value is 0.000100, and the learning rate is divided by 10 after the 5th and 7th epochs (the number of times the entire training set is traversed).
[0134] Furthermore, if Figure 11-14 As shown in the figure, the effect comparison before and after transfer learning is shown. The original image was not used in the training set. It can be seen that the core edge prediction image generated by the network before transfer learning can extract the core contour well, but it has more noise and obvious surface texture, so it cannot be used directly. From the effect images of epoch5 and epoch10, it can be seen that BDC-PiDiNe after transfer learning can better extract the core contour, while ignoring the core surface texture and other noise, which greatly improves the subsequent core segmentation effect. Therefore, the network weight parameters after EPOCH10 training are selected as the final network parameters for the intelligent detection task.
[0135] In this optional implementation, a data set of about 30,000 core edge photos and a BDC_Pidinet edge detection lightweight model are produced. Different from the previous semantic segmentation and instance segmentation methods, it provides new ideas and directions for intelligent core identification and measurement and lays a foundation.
[0136] Step S802, obtain the core box main body image, input the core box main body image into the bidirectional cascade pixel difference network model, and generate an initial edge prediction map. For details, please refer to Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0137] Step S803: Process the initial edge prediction map to generate a core rectangular frame. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0138] Step S804: perform core measurement on the core box main body diagram based on the core rectangular frame to generate core features. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.
[0139] In this embodiment, a core measurement method based on a bidirectional cascade pixel difference network is provided, which can be used in the above-mentioned mobile terminals, such as mobile phones, tablet computers, etc. Fig.15 is a flow chart of a core measurement method based on a bidirectional cascade pixel difference network according to an embodiment of the present invention, such as Fig.15 As shown, the process includes the following steps:
[0140] Step S1501, obtain multiple core images, train the edge detection model based on the multiple core images, and generate a bidirectional cascade pixel difference network model. For details, please refer to Figure 8 Step S801 of the illustrated embodiment will not be described in detail here.
[0141] Step S1502, obtain the core box main body image, input the core box main body image into the bidirectional cascade pixel difference network model, and generate an initial edge prediction map. For details, please refer to Figure 8 Step S802 of the illustrated embodiment will not be described in detail here.
[0142] Step S1503, processing the initial edge prediction map to generate a core rectangular frame.
[0143] Specifically, the above step S1501 includes:
[0144] Step S15011, performing non-maximum suppression processing on the initial edge prediction map to generate a core box main body edge detection map.
[0145] Specifically, different cores usually have different texture information. In addition to the dramatic gradient changes at the edge of the core and the core box, the core surface gradient also changes greatly. Then, the BDC-PiDiNet network model obtained through transfer learning ignores the core surface gradient during training, and mainly learns the large-scale information of the core edge. The surface texture processing effect of the core image is better, but because the core edge dataset is purely manually labeled, there may be some errors in the labeling process, which makes the edge prediction generated by BDC-PiDiNet still have some areas with more dramatic gradient changes. Directly using the generated edge prediction map for core segmentation will produce large errors, which seriously affects the accuracy of core measurement information. Therefore, the core edge image sharpening processing code is written in Python language, and morphological related operations are used to improve the core edge image. Among them, the core edge image sharpening processing code is:
[0146]
[0147] Furthermore, after the core box image is processed by the BDC_Pidinet network model, an initial edge prediction map img is generated. Since the edge is thick, the prediction map needs to be processed by a non-maximum suppression (NMS) operation to refine the core boundary.
[0148] Furthermore, the larger rectangular convolution kernel is similar to the shape of the core. During the edge detection process, the core boundary is fuzzy. After the OTSU (Otsu method) binarization process, the core edge is no longer closed. The core is intelligently segmented and measured by closed graphic contour detection. The unclosed core edge will have a direct impact on the subsequent intelligent measurement algorithm and seriously reduce the RQD measurement accuracy. Therefore, the large rectangular kernel is used to open the image to make the core boundary continuous, such as Fig.16 As shown, the edge of the core is well closed.
[0149] Step S15012, performing block segmentation processing on the core box main body edge detection map to generate a block edge detection map.
[0150] Specifically, the edge map processed by image morphology not only removes the influence of the internal texture of the core, but also sharpens the edge contour of the core, making the core edge clearer and more continuous, so that good core contour curve information can be obtained, but there are still other background environmental influences that need to be processed.
[0151] Furthermore, since there are obvious separation boundaries between different blocks of the core box, the blocks are segmented according to the segmentation boundaries; due to the angle of the photo, the core box image will produce a longitudinal stretching phenomenon when performing perspective transformation, that is, the heights of different core box blocks are not the same, so the core box segmentation by equal division according to coordinates may have a large error, and the straight line detection fusion algorithm can be used, and its related code is:
[0152]
[0153] Furthermore, assuming that the image size is W×H, the LSD line detection algorithm (Line SegmentDetector, a line segment detection algorithm) is used to filter the detection results by setting the line length, inclination angle, etc.; after detecting the straight lines in the image, it is necessary to use an expansion operation for the line detection, which can connect the shorter white straight line areas to facilitate obtaining the center points of the connected areas and grouping them according to the center point coordinates; the core box block edge detection straight line DetectLines is obtained by performing a straight line fitting on the center point coordinates; since the core edge in the original image is also a straight line, many of the edges obtained by this line detection method are core edges, so they need to be processed based on prior knowledge.
[0154] Furthermore, the core box image is first divided into 5 blocks according to prior knowledge, and the height of each block is H / 5, where H represents the height of the core box image. The equally cut block edge line RealLines is fitted according to the block height, and the DetectLines are traversed by RealLines to calculate the difference between the straight line and the predicted straight line. The difference in height between the two directions is calculated. If there are two DetectLines above and below the RealLine and the distance is close, it means that the RealLine may be located between the two core edges, and the position is correct, then the RealLine remains unchanged; if the two DetectLines are far apart, the nearest DetectLine is selected to replace the RealLine; thus, the number of partitions of the core box can be guaranteed to be 5, and at the same time, the influence of the misdetected core straight line on the core box partitioning can be well considered.
[0155] Step S15013, based on the block edge detection image, a core rectangular frame is generated using a core boundary extraction algorithm.
[0156] Specifically, after obtaining the block edge detection map, the OpenCV (a cross-platform computer vision and machine learning software library) tool can be used to use the core box edge detection map to obtain the outline of a single core in the core box map. The core box partition map can be used to obtain the block area to which a single core belongs, which is convenient for intelligent calculation and display of RQD; the core boundary extraction algorithm code is as follows:
[0157]
[0158] Furthermore, the core edge contour map includes all core contours and some noise contours. There are still some texture edges on the core surface, which affect the detection results. In addition, due to the possible errors in the manual selection of core box corner points, the edges of the junction between the core box external area and the core box will also be detected and segmented. These detected non-core contours need to be filtered. Then, the core box prior knowledge is used to set relevant filtering rules to filter the detected closed edges. The specific filtering rules are as follows: (1) The height-to-width ratio S of the core contour is less than 3. The main detection objects in this paper are cores with a height greater than 10 cm. Usually, the width of the core is greater than the core height; (2) The core height Rock_h is less than the block height Block_H: the core is stored in the core box block, so the height must be less than the block height. The contour height greater than the block height is usually the noise area on the left and right edges of the core box image; (3) The distance between the contour center and the left and right boundaries of the core box image is greater than the set threshold. The core center position is usually in the center of the core box. The area closer to the boundary of the core box image is usually the noise area; (4) When classifying cores by block, filter out the box (block) whose core contour center height is closer to the block boundary. Set it to 1 / 5 of the core height. This is to filter out the contour composed of the core box and the area outside the core; (5) Filter out areas with smaller areas. The contour areas with smaller areas are usually the noise contours on the core surface and some broken rocks. Set the threshold size to 1 / 50 of the image size.
[0159] Furthermore, the final contour segmentation result and the edge detection core boundary are as follows Fig.17 As shown in the figure, the core boundary extraction algorithm can better extract the block boundary information corresponding to the core, including the center coordinates, width, height, rotation angle, etc., and then determine the core rectangular frame based on the block boundary information, which is convenient for subsequent core intelligent measurement.
[0160] In this optional implementation, by setting interval thresholds and improving the line detection fusion algorithm, the problem that the original line detection fusion algorithm has the problem of detecting a straight line less than 4 and a box segment area less than 5 is solved. This can truly realize the automation of core box segmentation measurement, and use prior knowledge and feature engineering to set contour recognition and extraction rules, screen and reduce noise for non-core closed contours, facilitate the subsequent calculation of the RQD of the core segment, and achieve extremely effective results.
[0161] Step S1504: perform core measurement on the core box main body diagram based on the core rectangular frame to generate core features. Figure 8 Step S804 of the illustrated embodiment will not be described in detail here.
[0162] In this embodiment, a core measurement method based on a bidirectional cascade pixel difference network is provided, which can be used in the above-mentioned mobile terminals, such as mobile phones, tablet computers, etc. Fig.18 is a flow chart of a core measurement method based on a bidirectional cascade pixel difference network according to an embodiment of the present invention, such as Fig.18 As shown, the process includes the following steps:
[0163] Step S1801, obtain multiple core images, train the edge detection model based on the multiple core images, and generate a bidirectional cascade pixel difference network model. For details, please refer to Fig.15 Step S1501 of the illustrated embodiment will not be described in detail here.
[0164] Step S1802, obtain the core box main body image, input the core box main body image into the bidirectional cascade pixel difference network model, and generate an initial edge prediction map. For details, please refer to Fig.15 Step S1502 of the illustrated embodiment will not be described in detail here.
[0165] Step S1803, process the initial edge prediction map to generate a core rectangular frame. Fig.15 Step S1502 of the illustrated embodiment will not be described in detail here.
[0166] Step S1804, performing core measurement on the core box main body diagram based on the core rectangular frame to generate core features.
[0167] Specifically, the above step S1804 includes:
[0168] Step S18041, determining the pixel length value based on the core rectangular frame, and calculating the core quality index value and the core average length based on the pixel length value.
[0169] In some optional implementations, the above step S18041 includes:
[0170] Step a1, obtaining an error coefficient, calculating the core length based on the pixel length value and the error coefficient, and calculating the average core length based on the core length.
[0171] Specifically, after obtaining the rectangular frame of the core boundary (i.e., the core rectangular frame), we can calculate the core length and measure the RQD by measuring the pixel length value of the rectangular frame; since the length of the core box is usually 1 meter, and the length of the core box cut out from the original image is about 1 meter, the pixel value of the core rectangular outline can be used to calculate the core box length in proportion to the core box length. The formula is as follows:
[0172]
[0173] In the above formula, rock_l represents the core length, Pixel box_l is the length of the core rectangle, Pixel blocx_l is the length of the core box block area, and θ represents the error coefficient.
[0174] Furthermore, through multiple measurements, it is known that the pixel width of the cropped core box image is about 1.01 times the actual width, so 1.01 is usually taken to convert the final measurement result into cm (centimeter) units for easy display.
[0175] Furthermore, since a single RQD value cannot well reflect the quality of the core, for example, the RQD calculated values of 9 cores with a length of 10 cm and 1 core with a length of 90 cm are the same, both of which are 90%, but the degree of crushing of the single core with a length of 90 cm is obviously better, the following calculation formula is used to calculate the average length of the core:
[0176]
[0177] In the above formula, avg_L is used to represent the average length of core blocks greater than 10 cm. When RQD is equal, the larger the avg_L is, the better the core crushing degree is. When RQD is equal, the larger the avg_L is, the better the core crushing degree is.
[0178] Step a2, calculating the core quality index value based on the core length.
[0179] Specifically, the calculation formula of RQD (core quality index value) is as follows:
[0180]
[0181] Among them, ∑rock_l( L>10cm ) is the sum of the lengths of the cores in each block that are greater than 10 cm, that is, the sum of the lengths of the core boxes, usually 1 meter.
[0182] In this optional implementation, the average core length is proposed as a measurement indicator, which can better show the quality of the core under the condition of RQD approximation.
[0183] Step S18042, color gamut correction is performed on the core box main body image, and the color gamut corrected core box main body image is cut according to the core rectangular frame to generate rectangular outline information of the core block area.
[0184] Step S18043, inputting the rectangular outline information of the core block area into the convolutional neural classification network to generate the core category.
[0185] Specifically, Figure 19-20 As shown in the figure, the color-corrected core block image obtained by cutting the identified core contour is eliminated according to the block area and exploration order, such as trees, weeds, exposed core box, etc., and then the core block contour image and the core box section image are sent to the trained convolutional neural classification network VGG16 for classification and recognition in a sliding window, so as to obtain a better lithology recognition effect. At the same time, through color correction, factors such as shooting equipment, weather, and sunlight can also be eliminated to obtain a better core recognition effect.
[0186] Furthermore, according to the core category detection results, an abnormal identification processing algorithm is used to automatically identify abnormal lithology classification sections; core block identification will only give one lithology result, and cannot well learn and obtain the connection between different core blocks, and it is necessary to identify the core box section in a sliding window mode; usually, in the sliding window mode lithology identification results, there is a problem of inconsistent interception of lithology classification due to different window sizes in the same rock layer section, and lithology mutation occurs. For this situation, the erroneous results of lithology identification need to be processed; an identification anomaly processing algorithm is proposed to automatically identify abnormal lithology classification sections, with the midpoint of the sliding window as the center, and windows of 8cm, 12cm, and 16cm are taken respectively, with a step size of 4cm, and sent to the lithology classification VGG16 network for identification, and the lithology type with the most results is taken as the final result. At the same time, the results are summarized to give the core category change information at different heights.
[0187] Step S18044, based on the core category, determine the core color through the comparison table database; wherein the comparison table database includes the matching relationship between different core categories and different core colors.
[0188] In some optional implementations, the above step S18044 includes:
[0189] Step b1, determining the pixel points of the core block based on the rectangular outline information of the core block area, comparing the pixel points of the core block with the standard color library, and generating a predicted color.
[0190] Specifically, the shooting angle, weather, lighting and other factors of the core image will affect the recognition of the core color. Then, by identifying the three primary colors of red, green and blue of the standard colorimetric card in the exploration situation board of the core field shooting image, the colorimetric card is intelligently identified and then restored to the standard RGB pixel value to calibrate the overall color of the image.
[0191] Furthermore, the core box main body image after color gamut correction is cut according to the core rectangular frame to generate the rectangular outline information of the core block area. Then, according to the rectangular outline information of the core block area, each pixel point of the core block is traversed, and its RGB pixel value is compared with the internationally used standard color library. The standard color with the smallest mean square error is selected as the final predicted color. Based on the above principle, the core outline needs to be affine transformed to facilitate the traversal of all image pixels. The algorithm flow is as follows:
[0192]
[0193] Step b2, based on the core category, determine the core color through the comparison table database.
[0194] Step b3, compare the predicted color with the core color, and when the predicted color is the same as the core color, output the core color.
[0195] Specifically, through the sliding window mode lithology identification method, a lithology distribution result (i.e., core classification result) can be obtained, and then the lithology at different stages and the corresponding color relationship can be determined, and possible inaccuracies can be determined for further verification; the lithology identification results are compared with the data in the core color comparison table database to see if there are any inconsistencies or unreasonable places, and the corresponding cross-validation core classification results are generated. For example, if a core block is identified as sandstone, but its color is very different from the color of sandstone in the database, then it may be an abnormal identification situation; cross-validation of core classification results refers to correcting or reclassifying abnormal identification situations based on the data in the core color comparison table database to obtain more reliable core categories and stratification information; for example, if a core block is identified as sandstone, but its color is very different from the color of sandstone in the database, then it is reclassified as other types of cores, or its classification probability is adjusted.
[0196] For example, core block 5 is identified as light yellow sandy shale, but its color is inconsistent with the color of sandy shale in the database, so it may be an abnormal identification. According to the color information of other types of cores in the database, it can be reclassified into other types with higher probability, such as light yellow carbonate or light yellow clay, and the corresponding classification probability is given; the cross-validation result may be light yellow carbonate (0.6), light yellow clay (0.3), light yellow sandy shale (0.1), etc.
[0197] In this optional implementation, an edge detection core contour recognition algorithm is proposed, which can accurately identify the core contour and improve the accuracy of automatic core measurement.
[0198] Step S18045, determining the layering information based on the core type and core color.
[0199] Specifically, by comparing the lithology types and colors of different core blocks, it is determined whether there is an interface of lithology change. If so, the interface is used as the boundary of the layer (i.e., layer information); for example, if the lithology type and color of core block 1 and core block 2 are both gray-white mud shale, and the lithology type and color of core block 3 is reddish-brown sandy shale, then it can be considered that there is a layer boundary between core block 2 and core block 3. In this way, the entire core box section can be divided into several different layers, and the thickness, position, lithology type and other information of each layer can be given.
[0200] Furthermore, the system will output a detailed exploration report, which includes detailed results of core classification and RQD measurement, providing valuable reference and guidance for exploration workers.
[0201] In this optional implementation, based on the core category detection results, an anomaly recognition and processing algorithm is used to automatically identify abnormal lithology classification sections, and the core color information and position information are combined to fuse multidimensional data and cross-validate the core classification results, so that the core category can be predicted more accurately and the core stratification information can be obtained.
[0202] The following is a specific example to illustrate the steps of core measurement based on a bidirectional cascade pixel difference network.
[0203] Embodiment 1:
[0204] The edge detection network model is constructed by using a bidirectional cascade network combined with pixel differential convolution, and trained using a commonly used edge detection effect evaluation dataset. The network model is modified and evaluated to select the optimal network structure.
[0205] Through the segmented core box main image, the original data is edge-labeled, the core edge image dataset is established, and data augmentation is performed;
[0206] Through the core image data set, transfer learning training is performed on the optimal network structure, and the optimal iterative network model is set and selected;
[0207] By performing morphological processing on the main image of the incoming core box and applying the non-maximum suppression algorithm, the edge contour of the core contour is ensured to be clear and closed;
[0208] Through the core box block segmentation algorithm, the core box main body edge detection map is intelligently segmented into blocks to obtain block location coordinate information;
[0209] Through the core intelligent measurement algorithm, the RQD value of the core box section and the average length of the core are calculated according to the block information to achieve RQD intelligent measurement;
[0210] Through the core intelligent measurement algorithm, the RQD value of the core box section and the average length of the core are calculated according to the block information to achieve RQD intelligent measurement;
[0211] The color gamut of the core box main image is calibrated through the color calibration algorithm, the image is cut according to the core contour, and the core color is preliminarily estimated through the core color measurement algorithm;
[0212] By using the image classification deep learning network model, fusing multi-dimensional data, combining the core color and core contour map, the core category and stratification information are obtained, and an exploration report is given.
[0213] In the above embodiment, the rock is segmented and measured based on the core edge prediction map, so that the core features can be obtained quickly and accurately, and the core measurement automation under field conditions can be realized. It has a wide applicability and better meets the task requirements of intelligent core measurement. It is superior to traditional manual detection methods in simplifying the measurement process and improving exploration efficiency, and is superior to related technologies in RQD calculation accuracy; and it solves the problem of other environmental factors on the background, such as trees, weeds, and exposed core boxes. At the same time, due to the different core image shooting equipment and different imaging, weather, sunlight and other factors also affect the recognition accuracy of the core color, it is necessary to perform color correction on the image, and the color-corrected core block image obtained by cutting the recognized core contour is sent to the convolutional neural classification network, which can remove the influence of the shooting background environment and obtain better and more accurate recognition and measurement effects.
[0214] In this embodiment, a core measurement device based on a bidirectional cascade pixel differential network is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0215] This embodiment provides a core measurement device based on a bidirectional cascade pixel difference network, such as Fig.21 As shown, including:
[0216] A training module 211 is used to obtain multiple core images, train an edge detection model based on the multiple core images, and generate a bidirectional cascade pixel difference network model;
[0217] A generation module 212 is used to obtain a core box main body image, input the core box main body image into a bidirectional cascade pixel difference network model, and generate an initial edge prediction map;
[0218] The processing module 213 is used to process the initial edge prediction map to generate a core rectangular frame;
[0219] The measurement module 214 is used to perform core measurement on the core box main body diagram based on the core rectangular frame to generate core features.
[0220] In some optional implementations, the training module 211 includes:
[0221] The training unit is used to obtain an edge detection data set, train an edge detection model based on the edge detection data set, and determine the optimal network structure; wherein the optimal network structure is composed of a pixel difference convolutional network and a bidirectional cascade network; the annotation unit is used to perform edge annotation on multiple core images to generate an edge type data set; the data enhancement unit is used to perform data enhancement on the edge type data set to generate a core edge data set; the training unit is used to perform transfer learning training on the optimal network structure based on the core edge data set to generate a bidirectional cascade pixel difference network model.
[0222] In some optional embodiments, the processing module 213 includes: a non-maximum suppression processing unit, which is used to perform non-maximum suppression processing on the initial edge prediction image to generate a core box body edge detection image; a block segmentation processing unit, which is used to perform block segmentation processing on the core box body edge detection image to generate a block edge detection image; a core boundary extraction unit, which is used to generate a core rectangular frame based on the block edge detection image using a core boundary extraction algorithm.
[0223] In some optional embodiments, the measurement module 214 includes: a calculation unit, which is used to determine the pixel length value based on the core rectangular frame, and calculate the core quality index value and the average core length based on the pixel length value; a correction unit, which is used to perform color gamut correction on the core box main body image, and cut the core box main body image after color gamut correction according to the core rectangular frame to generate rectangular contour information of the core block area; a generation unit, which is used to input the rectangular contour information of the core block area into the convolutional neural classification network to generate the core category; a comparison unit, which is used to determine the core color based on the core category through a comparison table database; wherein the comparison table database includes matching relationships between different core categories and different core colors; a determination unit, which is used to determine the stratification information based on the core category and the core color.
[0224] In some optional embodiments, the calculation unit includes: a first calculation subunit, used to obtain an error coefficient, calculate the core length based on the pixel length value and the error coefficient, and calculate the core average length based on the core length; and a second calculation subunit, used to calculate the core quality index value based on the core length.
[0225] In some optional embodiments, the control unit includes: a comparison subunit, which is used to determine the pixel points of the core block based on the rectangular contour information of the core block area, compare the pixel points of the core block with the standard color library, and generate a predicted color; a determination subunit, which is used to determine the core color based on the core category through a reference table database; a comparison subunit, which is used to compare the predicted color with the core color, and when the predicted color is the same as the core color, output the core color.
[0226] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0227] In this embodiment, a core measurement device based on a bidirectional cascade pixel differential network is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0228] The embodiment of the present invention also provides a computer device having the above Fig.21 A core measurement device based on a bidirectional cascade pixel difference network is shown.
[0229] See also Fig. 22 , Fig. 22 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig. 22 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig. 22 A processor 10 is taken as an example.
[0230] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0231] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0232] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device 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.
[0233] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0234] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure X The example of connecting through bus is taken in the following.
[0235] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0236] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0237] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A core measurement method based on a bidirectional cascade pixel difference network, characterized in that: The method comprises: Acquire multiple core images, train an edge detection model based on the multiple core images, and generate a bidirectional cascade pixel difference network model; Acquire a core box main body image, input the core box main body image into the bidirectional cascade pixel difference network model, and generate an initial edge prediction map; Processing the initial edge prediction image to generate a core rectangular frame; Perform core measurement on the core box main body diagram based on the core rectangular frame to generate core features; The edge detection model is trained based on the multiple core images to generate a bidirectional cascade pixel difference network model, including: Acquire an edge detection data set, train an edge detection model based on the edge detection data set, and determine an optimal network structure; wherein the optimal network structure is composed of a pixel differential convolutional network and a bidirectional cascade network; Annotating edges of the plurality of core images to generate an edge type data set; Perform data enhancement on edge type datasets to generate core edge datasets; Based on the core edge data set, transfer learning training is performed on the optimal network structure to generate the bidirectional cascade pixel difference network model.
2. The method according to claim 1, characterized in that The processing of the initial edge prediction map to generate a core rectangular frame includes: Performing non-maximum suppression processing on the initial edge prediction map to generate a core box main body edge detection map; Performing block segmentation processing on the core box main body edge detection map to generate a block edge detection map; Based on the block edge detection image, the core rectangular frame is generated using a core boundary extraction algorithm.
3. The method according to claim 1, characterized in that The core characteristics include: Core box section core quality index values, average core length, core color, core category and stratification information.
4. The method according to claim 3, characterized in that The core measurement is performed on the core box main body diagram based on the core rectangular frame to generate core features, including: Determine a pixel length value based on the core rectangular frame, and calculate the core quality index value and the core average length based on the pixel length value; Performing color gamut correction on the core box main body image, and cutting the core box main body image after color gamut correction according to the core rectangular frame to generate rectangular outline information of the core block area; Inputting the rectangular outline information of the core block area into a convolutional neural classification network to generate the core category; Based on the core category, the core color is determined through a comparison table database; wherein the comparison table database includes a matching relationship between different core categories and different core colors; The layering information is determined based on the core category and the core color.
5. The method according to claim 4, characterized in that The calculating the core quality index value and the core average length respectively based on the pixel length value comprises: Obtaining an error coefficient, calculating a core length based on the pixel length value and the error coefficient, and calculating an average core length based on the core length; The core quality index value is calculated based on the core length.
6. The method according to claim 4, characterized in that The determining the core color based on the core category through a comparison table database includes: Determine the pixel points of the core block based on the rectangular outline information of the core block area, compare the pixel points of the core block with a standard color library, and generate a predicted color; Based on the core category, determining the core color through a comparison table database; The predicted color is compared with the core color, and when the predicted color is the same as the core color, the core color is output.
7. A core measurement device based on a bidirectional cascade pixel difference network, characterized in that: The device comprises: A training module, used for acquiring a plurality of core images, training an edge detection model based on the plurality of core images, and generating a bidirectional cascade pixel difference network model; A generation module, used for obtaining a core box main body image, inputting the core box main body image into the bidirectional cascade pixel difference network model, and generating an initial edge prediction map; A processing module, used for processing the initial edge prediction map to generate a core rectangular frame; A measurement module, used for performing core measurement on the core box main body diagram based on the core rectangular frame to generate core features; The training module includes: a first training unit, which is used to obtain an edge detection data set, train an edge detection model based on the edge detection data set, and determine an optimal network structure; wherein the optimal network structure is composed of a pixel difference convolutional network and a bidirectional cascade network; a labeling unit, which is used to label edges of multiple core images and generate an edge type data set; a data enhancement unit, which is used to enhance the edge type data set and generate a core edge data set; a second training unit, which is used to perform transfer learning training on the optimal network structure based on the core edge data set and generate a bidirectional cascade pixel difference network model.
8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the core measurement method based on a bidirectional cascade pixel differential network as described in any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute a core measurement method based on a bidirectional cascade pixel differential network as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Rock core fracture extraction method and system
CN108364278A
Edge detection method, device and equipment based on bidirectional cascade network
CN112581486A