Micro-resistivity imaging logging image processing method, device, equipment and medium
Patent Information
- Application Number
- CN202511902224.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-16
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2045-12-16
AI Technical Summary
[0004]但现有技术中,微电阻成像测井图像受地质环境等因素影响,图像缺失情况复杂,同时由于实际测井过程中的采样误差,无法获取多个同一井段的完整与残缺成像配对数据
[0063]本申请实施例提供的微电阻成像测井图像的处理方法、装置、设备及介质,通过获取待补全测井图像和对应的掩码图像,将其输入图像补全模型得到初步补全图像;接着对掩码图像进行腐蚀处理,并用初步补全图像中腐蚀区域内的像素值填充原图的缺失位置,形成新的待补全测井图像;随后将此新图像和腐蚀掩码图像作为新一轮输入,重复“模型补全—局部填充”的过程,直至所有缺失位置均被填充,输出补全后的测井图像。这种渐进式补全的技术效果在于,它将复杂的全局修复分解为更易求解的局部任务,有效避免了单次预测易产生的模糊或失真,通过迭代细化显著提升了补全结果的清晰度与准确性。从而为高分辨率的测井数据提供了一种鲁棒的图像修复手段,能最大限度挽救因仪器或传输问题造成的数据损失,确保后续地层评价与储层建模等关键解释工作的连续性,对提升油气勘探开发的决策质量有直接推动作用。
Smart Images

Figure CN122023137B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing, and in particular to a method, apparatus, device and medium for processing micro-resistivity imaging logging images. Background Technology
[0002] In oil and gas exploration and development, formation microresistivity imaging logging is a key technology for obtaining high-resolution resistivity images of the formation around the wellbore. This technology measures the resistivity distribution of the formation around the wellbore using multiple electrode arrays on the logging instrument, generating a two-dimensional image along the well depth direction to identify complex geological features such as fractures, bedding, pore structures, and heterogeneous interfaces. However, due to the fixed electrode spacing and physical limitations of the logging instrument, the instrument's coverage of the wellbore circumference is usually not 100%, resulting in continuous vertical blank bands in the image along the well depth direction. The geological information corresponding to these blank bands is lost during the acquisition stage, severely compromising the integrity and continuity of the image.
[0003] In existing technologies, methods for completing microresistivity imaging logging images mainly employ traditional interpolation, multi-point geostatistical simulation, and deep learning. Traditional interpolation relies on local pixel neighborhood relationships or statistical models for filling, making it suitable for images with small missing areas and simple structures. Multi-point geostatistical simulation uses a pre-set geological model library for image completion. Deep learning methods use convolutional neural networks and generative adversarial networks to complete the images.
[0004] However, in existing technologies, microresistivity imaging logging images are affected by geological environment and other factors, resulting in complex image loss. Furthermore, due to sampling errors during actual logging operations, it is impossible to obtain complete and incomplete image pairing data for multiple sections of the same well. Therefore, existing technologies suffer from low accuracy in completing microresistivity imaging logging images. Summary of the Invention
[0005] This application provides a method, apparatus, equipment, and medium for processing microresistivity imaging logging images, in order to improve the accuracy of supplementing microresistivity imaging logging images.
[0006] In a first aspect, embodiments of this application provide a method for processing micro-resistivity imaging logging images, including:
[0007] Obtain the logging image to be completed and the corresponding mask image; the logging image to be completed includes multiple missing pixel locations;
[0008] Input the well logging image to be completed and the mask image into the image completion model to obtain the preliminary completed image;
[0009] The mask image is subjected to erosion processing to obtain an eroded mask image with eroded areas;
[0010] The pixel values corresponding to the eroded areas in the preliminary completed image are filled into the corresponding missing pixel positions in the well logging image to be completed, resulting in a new well logging image to be completed.
[0011] The new logging image to be completed is used as the logging image to be completed, and the erosion mask image is used as the mask image. The process of inputting the logging image to be completed and the mask image into the image completion model is repeated until all missing pixel positions in the logging image to be completed are filled with pixel values. The completed logging image is then output.
[0012] In one possible implementation, after filling the pixel values corresponding to the eroded areas in the preliminary completed image to the corresponding missing pixel positions in the logging image to be completed, resulting in a new logging image to be completed, the method further includes:
[0013] Determine whether all missing pixel locations have been filled with pixel values.
[0014] If so, the new logging image to be completed will be used as the completed logging image;
[0015] If not, perform the process of using the new logging image to be completed as the logging image to be completed and the erosion mask image as the mask image.
[0016] In one possible implementation, the training process of the image completion model includes:
[0017] Multiple training samples are acquired, each training sample including a sample logging image and a sample mask image corresponding to the sample logging image;
[0018] The sample logging image and the sample mask image are input into the image completion model to obtain the first completed image corresponding to the sample logging image;
[0019] Dilation is applied to the sample mask image to obtain a dilated mask image with a larger missing region;
[0020] The second completed image corresponding to the sample well logging image is obtained by inputting the sample well logging image and the expansion mask image into the image completion model.
[0021] Based on the second completed image and the preset total loss function, the image completion model is trained to obtain the trained image completion model.
[0022] In one possible implementation, an image completion model is input based on the sample well logging image and the dilatation mask image to obtain a second completed image corresponding to the sample well logging image, including:
[0023] Set the pixel values of the regions corresponding to larger missing regions in the sample well logging images to 0 to obtain the missing image;
[0024] The missing image and the dilated mask image are input into the image completion model to obtain the second completed image.
[0025] In one possible implementation, after obtaining the first completed image corresponding to the sample logging image, the method further includes:
[0026] Based on the reconstruction loss function, the reconstruction loss between the effective data area of the sample mask image and the first completed image is calculated.
[0027] In one possible implementation, the image completion model is trained based on the second completed image and a preset total loss function to obtain a trained image completion model, including:
[0028] For the second completed image, the perceptual loss, style loss, and self-masking loss of the missing region are calculated respectively.
[0029] The total loss value is calculated based on the preset total loss function; where the total loss value is the weighted sum of reconstruction loss, perception loss, style loss and self-masking loss;
[0030] The image completion model is trained based on the total loss value until the total loss value converges, resulting in a well-trained image completion model.
[0031] In one possible implementation, the image completion model includes an encoder, a decoder, and a prediction head; wherein the encoder is used to extract image features based on a multi-level downsampling structure; the decoder is used to restore the image size based on a multi-level upsampling structure transposed convolution; and the prediction head is used to generate a complete completed image.
[0032] Secondly, embodiments of this application provide a processing apparatus for micro-resistivity imaging logging images, comprising:
[0033] The acquisition module is used to acquire the well logging image to be completed and the corresponding mask image; the well logging image to be completed includes multiple missing pixel locations;
[0034] The processing module is used to input the well logging image to be completed and the mask image into the image completion model to obtain the preliminary completed image;
[0035] The processing module is also used to perform erosion processing on the mask image to obtain an eroded mask image with eroded areas;
[0036] The processing module is also used to fill the pixel values corresponding to the corrosion area in the preliminary completed image into the corresponding missing pixel positions in the logging image to be completed, so as to obtain a new logging image to be completed;
[0037] The processing module is also used to take the new logging image to be completed as the logging image to be completed and the corrosion mask image as the mask image, and repeatedly perform the processing of inputting the logging image to be completed and the mask image into the image completion model until all the missing pixel positions of the logging image to be completed are filled with pixel values, and output the completed logging image.
[0038] In one possible implementation, the processing module is further configured to:
[0039] Determine whether all missing pixel locations have been filled with pixel values.
[0040] If so, the new logging image to be completed will be used as the completed logging image;
[0041] If not, perform the process of using the new logging image to be completed as the logging image to be completed and the erosion mask image as the mask image.
[0042] In one possible implementation, the processing module is further configured to:
[0043] Multiple training samples are acquired, each training sample including a sample logging image and a sample mask image corresponding to the sample logging image;
[0044] The sample logging image and the sample mask image are input into the image completion model to obtain the first completed image corresponding to the sample logging image;
[0045] Dilation is applied to the sample mask image to obtain a dilated mask image with a larger missing region;
[0046] The second completed image corresponding to the sample well logging image is obtained by inputting the sample well logging image and the expansion mask image into the image completion model.
[0047] Based on the second completed image and the preset total loss function, the image completion model is trained to obtain the trained image completion model.
[0048] In one possible implementation, the processing module is further configured to:
[0049] Set the pixel values of the regions corresponding to larger missing regions in the sample well logging images to 0 to obtain the missing image;
[0050] The missing image and the dilated mask image are input into the image completion model to obtain the second completed image.
[0051] In one possible implementation, after obtaining the first completed image corresponding to the sample logging image, the method further includes:
[0052] Based on the reconstruction loss function, the reconstruction loss between the effective data area of the sample mask image and the first completed image is calculated.
[0053] In one possible implementation, the processing module is further configured to:
[0054] For the second completed image, the perceptual loss, style loss, and self-masking loss of the missing region are calculated respectively.
[0055] The total loss value is calculated based on the preset total loss function; where the total loss value is the weighted sum of reconstruction loss, perception loss, style loss and self-masking loss;
[0056] The image completion model is trained based on the total loss value until the total loss value converges, resulting in a well-trained image completion model.
[0057] In one possible implementation, the image completion model includes an encoder, a decoder, and a prediction head; wherein the encoder is used to extract image features based on a multi-level downsampling structure; the decoder is used to restore the image size based on a multi-level upsampling structure transposed convolution; and the prediction head is used to generate a complete completed image.
[0058] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0059] The memory stores computer-executed instructions;
[0060] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0061] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.
[0062] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0063] The micro-resistivity imaging logging image processing method, apparatus, equipment, and medium provided in this application acquire a logging image to be completed and a corresponding mask image, inputting them into an image completion model to obtain a preliminary completed image. Next, the mask image is eroded, and the pixel values within the eroded areas of the preliminary completed image are used to fill the missing positions in the original image, forming a new logging image to be completed. This new image and the eroded mask image are then used as input for a new round of "model completion—local filling" process, repeating until all missing positions are filled, and the completed logging image is output. The advantage of this progressive completion technique is that it decomposes complex global repair into more easily solvable local tasks, effectively avoiding the ambiguity or distortion that can easily occur with single predictions. Iterative refinement significantly improves the clarity and accuracy of the completion results. This provides a robust image restoration method for high-resolution logging data, maximizing the recovery of data lost due to instrument or transmission problems, ensuring the continuity of subsequent key interpretation work such as formation evaluation and reservoir modeling, and directly promoting the improvement of decision-making quality in oil and gas exploration and development. Attached Figure Description
[0064] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0065] Figure 1 A flowchart illustrating the microresistivity imaging logging image processing method provided in this application. Figure 1 ;
[0066] Figure 2 A schematic diagram of the microresistivity imaging logging image and the corresponding mask image provided in this application;
[0067] Figure 3 A comparative diagram of the logging images to be supplemented and the logging images after supplementation provided in this application;
[0068] Figure 4 A flowchart illustrating the microresistivity imaging logging image processing method provided in this application. Figure 2 ;
[0069] Figure 5 A schematic diagram of the image completion model for the microresistivity imaging logging image provided in this application;
[0070] Figure 6 A schematic diagram of the features used as input to the image completion model for the micro-resistivity imaging logging image provided in this application;
[0071] Figure 7 A schematic diagram of the deformable convolution structure of the image completion model for the micro-resistivity imaging logging image provided in this application;
[0072] Figure 8 A schematic diagram of the mask dilation operation for the image completion model of the microresistivity imaging logging image provided in this application;
[0073] Figure 9 A flowchart illustrating the microresistivity imaging logging image processing method provided in this application. Figure 3 ;
[0074] Figure 10 A schematic diagram of the structure of the micro-resistivity imaging logging image processing device provided in this application;
[0075] Figure 11 This is a hardware schematic diagram of the microresistivity imaging logging image processing device provided in this application.
[0076] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0077] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of methods and approaches consistent with some aspects of this application as detailed in the appended claims.
[0078] Formation microresistivity imaging logging is an important logging technique in modern formation evaluation. Because electrical resistivity imaging images contain multiple continuously distributed vertical "blank bands" or missing zones along the well depth direction, the geological information corresponding to these areas is irreversibly lost during the acquisition stage. This severely damages the integrity and continuity of the image, interfering with fracture connectivity analysis, pore structure identification, and quantitative inversion of reservoir parameters, significantly reducing the accuracy and reliability of logging interpretation. Therefore, it is necessary to fill in the missing areas of microresistivity imaging logging images.
[0079] To address this issue, traditional image completion methods mainly include interpolation methods (such as inverse distance weighted interpolation and singular spectrum analysis interpolation) and multi-point geostatistical simulation methods (such as Filtersim). These methods typically rely on the neighborhood relationships of local pixels or a pre-defined geological model library for filling, and are effective to some extent when the missing area is small and the structure is relatively simple. However, when faced with large-scale missing zones or areas containing complex geological textures such as dense fractures and cross-bedding, traditional methods cannot effectively capture and express the deep semantics and global structural constraints of the image. The completion results often exhibit problems such as texture blurring, structural distortion, or discontinuity, making it difficult to meet the needs of high-precision geological interpretation.
[0080] In recent years, deep learning techniques, particularly convolutional neural networks (CNNs) and generative adversarial networks (GANs), have been introduced into the field of image inpainting. GANs, through adversarial training between the discriminator and generator, can generate highly realistic texture details, showing great potential in electrical imaging completion. However, GAN-based methods typically rely on paired "complete-incomplete" image datasets for supervised training, while in actual well logging, it is almost impossible to obtain paired complete and incomplete imaging data of the same well section. Some studies have attempted to construct training sets through numerical simulations or synthetic data, but this further increases the difficulty and cost of data preparation. Furthermore, the GAN training process is unstable, prone to mode collapse or convergence difficulties.
[0081] Another type of image completion is based on non-GAN networks. This method learns statistical patterns in the image by applying L1 or L2 reconstruction loss to the non-missing regions, learning through numerous iterations how to reconstruct an image that conforms to the existing data distribution. However, because the loss form tends to generate "average" solutions, the completion result is prone to blurring or over-smoothing at high-frequency textures and fine structures (such as crack boundaries and grain textures), failing to achieve the perceptual realism achievable with GAN-based methods. Furthermore, due to the lack of guidance, the model relies heavily on iterative training, and it tends to cheat by fitting known data to the original data to improve loss performance, thus neglecting inference capabilities and resulting in significant differences between the completed region and the real image.
[0082] Therefore, existing technologies still have significant shortcomings in terms of data dependence, completion accuracy, texture realism, and training stability. There is an urgent need for an electro-imaging white-track completion method that does not require complete image samples, has low training costs, and can restore complex geological structures with high fidelity.
[0083] To address the aforementioned technical issues, this application provides a method, apparatus, device, and medium for processing micro-resistivity imaging logging images. This involves acquiring a logging image to be completed containing multiple missing pixel locations and its corresponding mask image, inputting both into an image completion model to generate a preliminary completed image with broad coverage but potentially inaccurate local details. The mask image is then further eroded to obtain a reduced-range eroded mask image. Pixel values from the preliminary completed image located only within this eroded area are filled back into the corresponding missing locations in the logging image to be completed, thus forming a new logging image to be completed that retains the model's prediction results but does not completely cover all missing points. This new image is then used as the input for the next round, and the eroded mask image is used as the new mask. This iterative process of "model completion—local filling—updating input" is repeatedly executed. Each iteration is constrained by the high-quality prediction results of the previous iteration, gradually eroding the remaining missing areas until all missing pixel locations are filled, ultimately outputting a complete and coherent completed logging image.
[0084] The technical advantage of this progressive image restoration strategy lies in its ability to decompose a complex global image restoration problem into a series of easier-to-solve local restoration sub-problems. This effectively avoids the risks of fuzziness, distortion, or structural inconsistencies that can easily arise from single large-scale predictions. Through iterative refinement, it significantly improves the clarity, edge sharpness, and consistency with the original geological structure of the final restoration result. Its significance lies in providing a robust and accurate image restoration method for high-resolution, high-value data such as micro-resistivity imaging logging. This method can maximize the recovery of valuable data lost due to instrument malfunctions or transmission interference, ensuring the continuity and accuracy of subsequent critical interpretation work such as formation evaluation, fracture identification, and reservoir modeling. This directly promotes the improvement of decision-making quality and economic benefits in oil and gas exploration and development.
[0085] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0086] Figure 1 A flowchart illustrating the microresistivity imaging logging image processing method provided in this application. Figure 1 ,like Figure 1 As shown, the method includes:
[0087] S101. Obtain the logging image to be completed and the mask image corresponding to the logging image to be completed.
[0088] In this embodiment, as Figure 2As shown, due to the inherent limitations of the physical structure of logging instruments, there is a fixed spacing between the measuring electrodes. Furthermore, the wellbore morphology and wellwall conditions do not perfectly match the instrument, preventing the instrument from completely covering the circumference of the wellwall. Therefore, multiple pixel-deficient locations, i.e., white band regions, exist in the logging image to be completed. By using a threshold segmentation method, the blank areas in the logging image to be completed are represented by the maximum pixel value. Areas above the threshold (i.e., white bands) are marked as 1, and the remaining areas as 0, generating a corresponding binary mask image (right side). Since the mask only needs to represent two different types of regions, it can be directly saved as a simple binary image. The mask image clearly indicates the target areas that need repair. This step transforms the ambiguous problem of "image corruption" into a formalized task that can be accurately identified and processed by a computer, providing clear guidance and a data foundation for subsequent intelligent model repair. This is the primary prerequisite for ensuring the entire process is targeted and effective.
[0089] S102. Input the well logging image to be completed and the mask image into the image completion model to obtain the preliminary completed image.
[0090] In this embodiment, the image completion model can learn the texture, structure and context information of the well logging image, and make reasonable inferences and fills in the missing areas according to the guidance of the mask, thereby generating a preliminary completed image.
[0091] S103. Perform erosion processing on the mask image to obtain an eroded mask image with eroded areas.
[0092] In this embodiment, erosion processing of the mask image means shrinking the white area of the originally marked missing region inward, generating a smaller eroded mask image with an inward-shifted boundary. The defined "eroded region" is the sub-target to be repaired in this iteration. The significance of this step lies in its clever decomposition of a large and complex global repair task into a series of continuous, more manageable, and high-quality local repair tasks. By successively reducing the target area, the area the model needs to "guess" each time becomes smaller, forcing the model to predict within a more defined context. This effectively reduces the prediction difficulty and prevents the blurring and distortion problems that are easily caused by a single large-area repair.
[0093] S104. Fill the pixel values corresponding to the eroded areas in the preliminary completed image into the corresponding missing pixel positions in the logging image to be completed, and obtain a new logging image to be completed.
[0094] In this embodiment, this step precisely extracts pixel values located within the erosion areas defined in step S103 from the preliminary completed image obtained in step S102. These values are then used to fill the corresponding missing pixel locations in the logging image to be completed in S101, thereby generating a new logging image to be completed. A portion of the missing areas in this new logging image to be completed has been filled with relatively reliable pixels, while the remaining unfilled missing areas constitute the target for the next iteration. This step achieves a closed loop in the iterative process, transforming noisy global predictions into deterministic, local repair results. By updating the input data, it creates conditions for a more accurate prediction in the next iteration, ensuring that the repair process progresses steadily and gradually.
[0095] In one possible implementation, after obtaining a new logging image to be completed, it is necessary to determine whether all missing pixel locations have been filled with pixel values. If so, the new logging image to be completed is used as the completed logging image. If not, the process of using the new logging image to be completed as the logging image to be completed and using the erosion mask image as the mask image is executed.
[0096] S105. Take the new logging image to be completed as the logging image to be completed, and take the erosion mask image as the mask image. Repeat the process of inputting the logging image to be completed and the mask image into the image completion model until all missing pixel positions in the logging image to be completed are filled with pixel values. Output the completed logging image.
[0097] In this embodiment, the new logging image to be completed is used as the input for the next iteration, and the erosion mask image is used as the new mask. Then, processes S102 to S104 are repeated. With each iteration, the missing area in the logging image to be completed is reduced by one region, and the overall image quality improves. This step continuously monitors the process until all missing markers in the mask image are filled. At this point, the iteration terminates, and a complete and coherent completed logging image is finally output. This achieves the accumulation from local optima to global optima, resulting in a high-precision and highly robust repaired logging image.
[0098] Figure 3 This is a completed logging image obtained from a microresistivity imaging logging image based on an image completion model, such as... Figure 3 As shown, the original image on the left is the logging image to be completed, and the iterative repair result on the right is the completed logging image. It can be seen from the figure that, based on the above method, the missing white channel area of the micro-resistivity imaging logging image to be completed is filled in, and a high-accuracy completed logging image can be obtained.
[0099] The microresistivity imaging logging image processing method provided in this application involves acquiring a logging image to be completed containing missing pixels and a mask image, inputting them into an image completion model to obtain a preliminary completed image; then, eroding the mask image, using the pixel values of the eroded areas in the preliminary completed image to fill the missing areas of the original image, generating a new logging image to be completed; and repeating the above process with the new image and the eroded mask image as input until all missing positions are filled, outputting the completed logging image. This method decomposes global repair into multiple local repairs, reducing the difficulty of single prediction, avoiding blurring or structural errors, and improving the clarity of the completed image and its consistency with the geological structure, thereby achieving the technical effect of improving the accuracy of completed microresistivity imaging logging images.
[0100] Figure 4 A flowchart illustrating the microresistivity imaging logging image processing method provided in this application. Figure 2 ,like Figure 4 As shown, in this embodiment... Figure 1 Based on the examples, the training of the image completion model in the microresistivity imaging logging image processing method is described in detail. This method includes:
[0101] S401. Obtain multiple training samples, input the sample logging images and sample mask images into the image completion model, and obtain the first completed image corresponding to the sample logging images.
[0102] In this embodiment, the logging images need to be preprocessed. Each logging image is equidistantly cropped into several sample logging images of the same size along the depth direction. Further, a sample mask image corresponding to each sample logging image is obtained according to the method in step S101. Each training sample includes the sample logging image and the corresponding sample mask image. This method does not require complete electrical imaging images as training samples; instead, it uses only incomplete images with white lines as sample logging images for training. Therefore, multiple sample logging images can be cropped from the original image, effectively increasing the number of training samples and thus increasing the number of training iterations for the image completion model, thereby improving the prediction accuracy of the image completion model.
[0103] In one possible implementation, the image completion model includes an encoder, a decoder, and a prediction head; wherein the encoder is used to extract image features based on a multi-level downsampling structure; the decoder is used to restore the image size based on a multi-level upsampling structure transposed convolution; and the prediction head is used to generate a complete completed image.
[0104] Figure 5 A schematic diagram of an image completion model for microresistivity imaging logging images, as shown below. Figure 5As shown, the sample logging image and the sample mask image are stacked and stitched on the channel, and the Resize method of the transforms module of the torchvision library is used to set the image to a fixed size to scale the image.
[0105] Taking an image scale of (256×256) as an example, the encoder first encodes the input image channels through a deformable convolutional block, quickly mapping them to a 64-dimensional high-dimensional representation. Then, using a fixed combination of modules, max pooling plus batch normalization deformable convolutional blocks repeatedly encode the feature map mapped to 64 dimensions. Max pooling is used to compress the scale of the feature map layer by layer, compressing the feature map scale from H×W to 1 / 2H×1 / 2W each time. Batch normalization deformable convolution is used to capture the statistical feature distribution of the image and expand the number of feature channels layer by layer, expanding the number of channels from C to 2C each time. In the design, after the first layer of max pooling and batch normalization deformable convolutional blocks, the feature shape changes to 128×128×128. The subsequent three layers change to 64×64×256, 32×32×512, and 16×16×1024 respectively.
[0106] The decoder needs to perform the opposite operation to the encoder to reconstruct the complete image from the encoder's compressed feature representation. Similarly, a combination of transposed convolutions and warped convolution blocks is used to recover the image layer by layer. The kernel size of each transposed convolution is set to 2×2, and the stride is set to 2, to upsample the input feature size from H×W to 2H×2W, while reducing the number of input feature channels from 2C to C. Before inputting the warped convolution block, the upsampled result needs to be compared with... Figure 2 In the encoder, the results of the corresponding layer are stacked and stitched together. These two features have the same feature scale and number of channels. At this time, the number of channels is restored to 2C. Then, deformable convolutional blocks are used to reduce the number of channels to C. After the first round of operation, the feature shape changes to 32×32×512. The subsequent three layers change to 64×64×256, 128×128×128, and 256×256×64 respectively.
[0107] Finally, a 1×1 convolution is used in the prediction head to restore the image channels to the original number of electrical imaging channels, maintaining the shape consistent with the sample, and a sigmoid activation function is used to control the range of values.
[0108] like Figure 5 As shown, the deformed convolutional block first passes through a regular 3×3 convolutional block as a bias convolution, then performs a 3×3 deformed convolution operation on the bias convolution and the original input, then passes through the ReLU activation function, then passes through a standard 3×3 convolution for smooth fusion, and finally passes through another ReLU activation to output the module result.
[0109] Figure 6A schematic diagram of the feature map input to the image completion model for microresistivity imaging logging images, as shown below. Figure 6 As shown, the input feature map has two channels. A 3×3 max-pooling layer is used within each kernel. Max-pooling is performed in the kernel of the first channel, resulting in a 1×1 matrix with the value max(5,1,3,4,9,8,,4,6,2)=9. Max-pooling is performed in the kernel of the second channel, resulting in a 1×1 matrix with the value max(1,1,2,8,6,7,3,3,5)=8. The encoder uses a 2×2 max-pooling kernel, outputting only the maximum value among four values each time. The 2×2 kernel is output as a 1×1 result, which is the final result from the encoder. The length and width of the feature are reduced to half of their original values.
[0110] Figure 7 A schematic diagram of the deformable convolution structure in the image completion model for microresistivity imaging well logging images. Deformable convolution can effectively adapt to different geometric features and capture the anisotropy in microresistivity imaging. For example... Figure 7 The input first undergoes a bias convolution to obtain a bias result. The size of this bias result is equal to that of the input. The number of channels in the bias result is 2N. The value of N is calculated based on the kernel size (KernelSize) of the deformable convolution. In this embodiment, the kernel size is 3 and the stride is 1, so the size of N is 3×3=9. The number of channels in the bias result is 2×9=18. The 18 channel values at each position of the feature map represent the offset values of the 9 positions contained in the 3×3 convolution kernel at the center of each kernel. The offset value at each position needs to be represented by two coordinates, x and y, so 18 channel values are needed to store the offset. Then, the original feature map and offsets are used as input to perform deformable convolution. For each convolution kernel scanned on the original feature map, 18 offsets corresponding to the offset feature map position at the center of the convolution kernel are assigned to each position within the convolution kernel. Each position calculates a new sampling point based on the offset (x, y). The offset is usually a decimal, and bilinear interpolation is used to obtain an integer during the calculation process to map it to the valid pixel grid. The deformable convolution will calculate the 9 newly sampled values according to the regular convolution operation. Finally, after scanning the original feature map, the output of the deformable convolution is obtained.
[0111] S402. Calculate the reconstruction loss between the effective data area of the sample mask image and the first completed image according to the reconstruction loss function.
[0112] In this embodiment, the L1 reconstruction loss is calculated based on the sample well logging image and the first completed image. By compressing features and reconstructing the original image, the model learns the overall statistical distribution pattern. To achieve the desired reconstruction effect, the sample mask image is also used as input for loss calculation. The influence of blank area values is excluded; this part of the loss calculation is invalid. Only the reconstruction effect of the regions where values originally exist is calculated. The resulting loss is denoted as... .
[0113] S403. Dilate the sample mask image to obtain a dilated mask image with a larger missing region; set the pixel values of the regions corresponding to the larger missing regions in the sample well logging image to 0 to obtain the missing image; input the missing image and the dilated mask image into the image completion model to obtain the second completed image.
[0114] In this embodiment, the sample mask image is dilated to create an "artificial missing region" that is larger than the original missing region. Then, the pixel values in the sample logging image corresponding to this larger region are set to 0 to obtain a missing image. This missing image is then input into the model along with the new dilated mask image to obtain the second complete image. Figure 8 This diagram illustrates the mask dilation operation for an image completion model of microresistivity imaging logging images. The dilation operation is based on max pooling. It's important to clarify that in the mask, 0 represents a valid location and 1 represents a blank location. Figure 8 The single kernel example illustrates a case where KernelSize is 3. For any scanned location, i.e., the center region of the kernel, if there exists a point with a value of 1 within a 3×3 area centered at that point, then according to the max-pooling operation, the mapping result of this scanned kernel should be 1. More details can be found in... Figure 8 The document provides a more complete result demonstrating how mask inflation is performed. Figure 8 The image shows a 6×6 feature map. The column with 1 in the middle represents the white channel region in microresistive imaging. Here, we still show the case where KernelSize is 3, the step size is 1, and the outer padding width is 1 to keep the output size unchanged. After the complete feature map operation, the regions on both sides of the white channel in the original feature map are also transformed into the white channel region.
[0115] Based on the above process, the expansion range of the mask white path can be controlled by an ExpandPixel parameter. The pooling kernel will be set to 2×KernelSize+1, the padding width should be set to KernelSize, and the stride remains 1 for pixel-by-pixel scanning. The size of the ExpandPixel parameter will affect the calculation effect to a certain extent. When the value is too small, the actual inference range during model training is small, resulting in insufficient training. When the value is too large, the mask will be over-expanded. Although the inference range increases and more supervision labels are available, this operation will also erode the effective area, reducing the effective values available during model calculation and increasing the difficulty of model completion. In this embodiment, the ExpandPixel parameter value is set to 8. This is a reference value and does not represent the best parameter. The actual missing ratio and training sample resolution need to be considered.
[0116] In conventional training, models only need to repair known missing regions. These regions often have a large number of known pixels surrounding them as strong contextual references, making it easy for the model to complete the task through simple interpolation or duplication. However, this application artificially expands the missing range by dilating the sample mask image, creating a "new blank area" that was originally valid data in the original image. At this point, when predicting this new region, the model cannot rely on any direct pixel information and must rely entirely on the known regions further away for semantic understanding and structural reasoning, thus achieving a leap from "repairing" to "creating something from nothing."
[0117] This method enhances the contextual reasoning ability of image completion models, forcing them to generate reasonable fill content based on the overall structure and texture rules even when local information is lacking. It also simulates more complex real-world defect scenarios, allowing the image completion model to encounter and learn to handle large-scale defects during the training phase, thus improving its generalization and robustness. Therefore, this step involves dilating the sample mask image. Training based on the dilated mask enables the image completion model to generate high-quality completion results with coherent structure and natural texture when faced with various irregularities and large-area defects in real well logging images, rather than simply performing a localized smooth fill.
[0118] S404. For the second completed image, calculate the perceptual loss, style loss, and self-masking loss of the missing region respectively.
[0119] In this embodiment, to enhance the ability to infer blank regions based on known regions, L1 loss is calculated between the second completed image and the sample logging image. However, only the newly expanded region from the mask dilation operation is calculated. This is entirely generated by the image completion model based on the known regions in the blank regions. The original value of that region is used as a supervision signal for loss calculation. The result is the self-masking loss of the missing region, denoted as... .
[0120] In step S402, the reconstruction loss and self-masking loss of the missing region are calculated at the pixel level based on the original scale. Optimizing the overall values might lead to a smoother result, resulting in visual blurring. Therefore, a VGG16-based extractor is built during the training of the image completion model, using officially pre-trained weights. This extractor returns the outputs at four positions (relu1_2, relu2_2, relu3_3, and relu4_3) in the VGG16 model, with all parameters frozen and not used in training.
[0121] The second completed image calculated after dilation masking and the sample well logging image are used to extract deep features using the VGG16 extractor. Semantic-level dilation masking L1 loss is calculated on the deep features at four different levels, and the sum of the four-layer feature losses is returned. The result is the perceptual loss, denoted as . .
[0122] To maintain stylistic consistency in the overall layer texture of the completed image, the second completed image calculated after dilation masking and the sample well logging image are compared using the VGG16 extractor to extract deep features and calculate style loss. Specifically, the deep features extracted by VGG are traversed, and the masked Gram matrix of each deep feature is calculated. The Gram matrix is obtained by flattening a C×H×W feature in spatial dimensions to obtain F. flat The shape is C×(H×W), and F is... flat transpose to get The shape is (H×W)×C, and the Gram matrix is... The shape is C×C. The Gram matrix reflects the correlation between feature channels. Only the dilated mask region is retained for the calculated features. The style loss is obtained by calculating the L1 loss of the Gram matrix of each deep feature of the second completed image and the sample well logging image, denoted as . .
[0123] S405. Calculate the total loss value according to the preset total loss function, and train the image completion model based on the total loss value until the total loss value converges to obtain the trained image completion model.
[0124] In this embodiment, the total loss value is the weighted sum of reconstruction loss, perception loss, style loss, and self-masking loss, and can be calculated using the following formula:
[0125]
[0126] Among them, L total λ1 is the total loss value; λ2 is the weighting coefficient of the reconstruction loss; λ3 is the weighting coefficient of the self-masking loss; λ4 is the weighting coefficient of the perceptual loss; λ5 is the weighting coefficient of the style loss. For reconstruction losses; For self-masking loss; To perceive loss; This is a loss of style.
[0127] Figure 9 A flowchart illustrating the microresistivity imaging logging image processing method provided in this application. Figure 3 ,like Figure 9 As shown, an image completion model is constructed through a training process: After acquiring sample logging images and corresponding masks, they are input into the model to generate the first completed image; the sample mask is dilated to obtain a larger missing region, and the corresponding region of the sample logging image is set to zero and input into the model together with the dilated mask to generate the second completed image. The total loss is calculated by combining reconstruction loss, perceptual loss, style loss, and self-masking loss, and the model parameters are optimized through multiple iterations. In the application stage, after the logging image to be completed and the initial mask are input into the model to obtain the preliminary completion result, the pixels corresponding to the eroded regions of the erosion mask are backfilled into the original image. This process is repeated until all missing pixel positions are filled, and finally, a complete logging image is output. The method provided in this application introduces dilation masking and self-masking mechanisms during the training phase. By constructing more complex missing scenarios and constraining the model to learn the intrinsic relationships of missing regions, it significantly improves the robustness of the model in completing irregular missing data. At the same time, a dynamic erosion-backfilling loop strategy is adopted in the inference phase, which combines iterative step-by-step repair with validity verification. This not only ensures the accurate reconstruction of local details but also achieves the self-consistency optimization of the global structure, breaking through the technical bottleneck of traditional single-stage completion methods that cannot balance edge accuracy and overall connectivity.
[0128] Figure 10 This is a schematic diagram of the structure of the microresistivity imaging logging image processing device provided in this application, as shown below. Figure 10 As shown, the microresistivity imaging logging image processing device 100 provided in this embodiment includes:
[0129] The acquisition module 1001 is used to acquire the well logging image to be completed and the mask image corresponding to the well logging image to be completed; the well logging image to be completed includes multiple missing pixel locations;
[0130] Processing module 1002 is used to input the well logging image to be completed and the mask image into the image completion model to obtain a preliminary completed image;
[0131] The processing module 1002 is also used to perform erosion processing on the mask image to obtain an eroded mask image with eroded areas;
[0132] The processing module 1002 is also used to fill the pixel values corresponding to the corrosion area in the preliminary completed image into the corresponding missing pixel positions in the logging image to be completed, so as to obtain a new logging image to be completed;
[0133] The processing module 1002 is also used to take the new logging image to be completed as the logging image to be completed, and the corrosion mask image as the mask image, and repeatedly perform the processing of inputting the logging image to be completed and the mask image into the image completion model until all the missing pixel positions of the logging image to be completed are filled with pixel values, and output the completed logging image.
[0134] In one possible implementation, the processing module 1002 is further configured to:
[0135] Determine whether all missing pixel locations have been filled with pixel values.
[0136] If so, the new logging image to be completed will be used as the completed logging image;
[0137] If not, perform the process of using the new logging image to be completed as the logging image to be completed and the erosion mask image as the mask image.
[0138] In one possible implementation, the processing module 1002 is further configured to:
[0139] Multiple training samples are acquired, each training sample including a sample logging image and a sample mask image corresponding to the sample logging image;
[0140] The sample logging image and the sample mask image are input into the image completion model to obtain the first completed image corresponding to the sample logging image;
[0141] Dilation is applied to the sample mask image to obtain a dilated mask image with a larger missing region;
[0142] The second completed image corresponding to the sample well logging image is obtained by inputting the sample well logging image and the expansion mask image into the image completion model.
[0143] Based on the second completed image and the preset total loss function, the image completion model is trained to obtain the trained image completion model.
[0144] In one possible implementation, the processing module 1002 is further configured to:
[0145] Set the pixel values of the regions corresponding to larger missing regions in the sample well logging images to 0 to obtain the missing image;
[0146] The missing image and the dilated mask image are input into the image completion model to obtain the second completed image.
[0147] In one possible implementation, after obtaining the first completed image corresponding to the sample logging image, the method further includes:
[0148] Based on the reconstruction loss function, the reconstruction loss between the effective data area of the sample mask image and the first completed image is calculated.
[0149] In one possible implementation, the processing module 1002 is further configured to:
[0150] For the second completed image, the perceptual loss, style loss, and self-masking loss of the missing region are calculated respectively.
[0151] The total loss value is calculated based on the preset total loss function; where the total loss value is the weighted sum of reconstruction loss, perception loss, style loss and self-masking loss;
[0152] The image completion model is trained based on the total loss value until the total loss value converges, resulting in a well-trained image completion model.
[0153] In one possible implementation, the image completion model in the processing module 1002 includes an encoder, a decoder, and a prediction head; wherein the encoder is used to extract image features based on a multi-level downsampling structure; the decoder is used to restore the image size based on a multi-level upsampling structure transposed convolution; and the prediction head is used to generate a complete completed image.
[0154] The micro-resistivity imaging logging image processing device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0155] Figure 11 This is a hardware schematic diagram of the microresistivity imaging logging image processing device provided in this application. Figure 11 As shown, the electronic device 110 provided in this embodiment includes at least one processor 1101 and a memory 1102. Optionally, the device 110 further includes a communication component 1103. The processor 1101, the memory 1102, and the communication component 1103 are connected via a bus 1104.
[0156] In a specific implementation, at least one processor 1101 executes computer execution instructions stored in memory 1102, causing at least one processor 1101 to perform the above-described method.
[0157] The specific implementation process of processor 1101 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0158] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0159] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0160] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0161] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0162] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0163] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0164] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0165] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, methods, or units, and may be electrical, mechanical, or other forms.
[0166] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0167] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0168] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0169] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0170] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A method of processing a micro-resistivity imaging well log image, characterized in that, The method comprises: obtaining a plurality of training samples, each of the training samples comprising a sample well logging image and a sample mask image corresponding to the sample well logging image; inputting the sample well logging image and the sample mask image into an image completion model to obtain a first completed image corresponding to the sample well logging image; calculating a reconstruction loss between an effective data area of the sample mask image and the first completed image according to a reconstruction loss function; performing inflation processing on the sample mask image to obtain an inflation mask image having a larger missing area; inputting the sample well logging image and the inflation mask image into the image completion model to obtain a second completed image corresponding to the sample well logging image; calculating a perceptual loss, a style loss, and a self-mask loss of the missing area for the second completed image; calculating a total loss value according to a preset total loss function; wherein the total loss value is a weighted sum of the reconstruction loss, the perceptual loss, the style loss, and the self-mask loss; training the image completion model based on the total loss value until the total loss value converges, to obtain a trained image completion model; obtaining a to-be-completed well logging image and a mask image corresponding to the to-be-completed well logging image; the to-be-completed well logging image comprises a plurality of pixel missing positions; inputting the to-be-completed well logging image and the mask image into the image completion model to obtain a preliminary completed image; performing erosion processing on the mask image to obtain an erosion mask image having an erosion area; filling pixel values corresponding to the erosion area in the preliminary completed image into corresponding pixel missing positions in the to-be-completed well logging image to obtain a new to-be-completed well logging image; repeating the process of inputting the to-be-completed well logging image and the mask image into the image completion model until all pixel missing positions of the to-be-completed well logging image are filled with pixel values, and outputting a completed well logging image.
2. The method of claim 1, wherein, After the process of filling pixel values corresponding to the erosion area in the preliminary completed image into corresponding pixel missing positions in the to-be-completed well logging image to obtain a new to-be-completed well logging image, the method further comprises: determining whether all pixel missing positions are filled with pixel values; if yes, taking the new to-be-completed well logging image as the completed well logging image; if no, performing the process of taking the new to-be-completed well logging image as the to-be-completed well logging image and taking the erosion mask image as the mask image.
3. The method of claim 1, wherein, The process of inputting the sample well logging image and the inflation mask image into the image completion model to obtain a first completed image corresponding to the sample well logging image comprises: setting pixel values of a region corresponding to the larger missing area in the sample well logging image to 0 to obtain a missing image; inputting the missing image and the inflation mask image into the image completion model to obtain the second completed image.
4. The method according to any one of claims 1 to 3, characterized in that, The image completion model comprises an encoder, a decoder and a prediction head; wherein the encoder is used to extract image features based on a multi-level down-sampling structure; the decoder is used to recover the image size based on a multi-level up-sampling structure transposed convolution; and the prediction head is used to generate a complete completed image.
5. A processing device of a micro-resistivity imaging well log image, characterized in that, Comprise: An acquisition module is configured to acquire a plurality of training samples, each of the training samples comprising a sample well logging image and a sample mask image corresponding to the sample well logging image; A processing module is configured to input the sample well logging image and the sample mask image into an image completion model to obtain a first completed image corresponding to the sample well logging image; The processing module is further configured to calculate a reconstruction loss between an effective data area of the sample mask image and the first completed image according to a reconstruction loss function; The processing module is further configured to perform inflation processing on the sample mask image to obtain an inflation mask image having a larger missing area; The processing module is further configured to input the sample well logging image and the inflation mask image into the image completion model to obtain a second completed image corresponding to the sample well logging image; The processing module is further configured to calculate a perceptual loss, a style loss and a self-mask loss of the missing area for the second completed image, respectively; The processing module is further configured to calculate a total loss value according to a preset total loss function; wherein the total loss value is a weighted sum of the reconstruction loss, the perceptual loss, the style loss and the self-mask loss; The processing module is further configured to train the image completion model based on the total loss value until the total loss value converges, thereby obtaining a trained image completion model; The acquisition module is further configured to acquire a to-be-completed well logging image and a mask image corresponding to the to-be-completed well logging image; the to-be-completed well logging image comprises a plurality of pixel missing positions; The processing module is further configured to input the to-be-completed well logging image and the mask image into the image completion model to obtain a preliminary completed image; The processing module is further configured to perform erosion processing on the mask image to obtain an erosion mask image having an erosion area; The processing module is further configured to fill pixel values corresponding to the erosion area in the preliminary completed image into corresponding pixel missing positions in the to-be-completed well logging image to obtain a new to-be-completed well logging image; The processing module is further configured to repeatedly perform the processing of inputting the to-be-completed well logging image and the mask image into the image completion model until all pixel missing positions of the to-be-completed well logging image are filled with pixel values, thereby outputting a completed well logging image.
6. An electronic device, comprising: Comprise: A memory and a processor; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory, so that the processor executes the method of any one of claims 1-4.
7. A computer readable storage medium characterized in that, The computer readable storage medium stores computer execution instructions, and the computer execution instructions are executed by the processor to implement the method of any one of claims 1-4.
Citation Information
Patent Citations
Method and device for training image restoration model and method and device for image restoration
CN108921220A
Image restoration method and apparatus, and computer device, program product and storage medium
WO2024159888A1