Abstract
Borehole electrical imaging logs provide important sensor-derived information for identifying fractures, bedding structures, and reservoir heterogeneity. However, strip-like missing regions commonly arise from uneven tool pad distribution, incomplete borehole coverage, and acquisition limitations, which can distort geological structures and reduce interpretation reliability. Because the true values inside real missing regions are unobservable, complete ground-truth labels are generally unavailable. This study therefore proposes a real missing-region-constrained self-supervised inpainting framework for borehole electrical imaging logs. The key idea is to use real missing masks to define safe intact regions and to generate artificial strip-like training masks only within those reliable regions, thereby avoiding supervision contamination from originally missing or adjacent unstable areas. A UNet-based inpainting model is developed, and two attention-enhanced variants, UNet-SE and UNet-CBAM, are evaluated together with Telea and Navier–Stokes baselines. In addition to the main comparison, mask-level ablation, model-level ablation, repeated-seed robustness analysis, and lightweight expert-assisted geological assessment are used to examine the reliability of the proposed strategy. The results show that learning-based methods consistently outperform conventional approaches for structurally complex strip-like gaps. UNet-CBAM achieves the best overall performance, with mask-MAE, mask-PSNR, and mask-SSIM values of 14.8, 21.2 dB, and 0.8, respectively. The safe-region-constrained strategy further reduces supervision contamination and improves reconstruction quality compared with random or less restrictive mask-generation strategies. These findings indicate that the proposed framework offers a practical self-supervised solution for improving the quality and interpretability of sensor-captured borehole imaging logs when complete labels are unavailable.
1. Introduction
Electrical imaging logging is characterized by high resolution, strong visual interpretability, and high sensitivity to geological features, making it widely applicable to fracture identification, bedding characterization, borehole wall structure interpretation, reservoir heterogeneity analysis, and hydrocarbon-bearing interval evaluation [1,2,3,4]. Compared with conventional logging curves, borehole electrical images provide a more intuitive representation of the microstructural features adjacent to the borehole wall and therefore constitute an important data source for the detailed characterization of complex reservoirs [5,6]. However, owing to limitations associated with tool pad distribution, borehole wall contact conditions, and incomplete wellbore coverage, borehole electrical images commonly contain blank strips or missing zones of varying widths [7,8]. In the cropped real missing-region masks used in this study, missing pixels occupy approximately 14.72% of the cropped image area, and the row-wise missing-strip width ranges from 1 to 43 pixels, with a median width of 16 pixels, an interquartile range of 14–22 pixels, and a 95th percentile of 28 pixels. These missing regions may distort fracture morphology, interrupt bedding continuity, and obscure stratigraphic contact relationships, thereby reducing the reliability of reservoir parameter estimation and geological interpretation. Consequently, the effective reconstruction of strip-like missing regions in borehole electrical images is of considerable importance for improving the interpretability and practical value of borehole imaging data. Research on the reconstruction of blank strips in electrical imaging logs has gradually evolved from traditional image inpainting approaches to deep learning-based methods. Early studies mainly relied on interpolation, diffusion, and smoothness priors, including inverse distance weighting, bilinear/bicubic interpolation [9,10,11,12], total variation models, and the Criminisi texture propagation algorithm [13,14]. In addition, several studies have attempted to improve the continuity of strip-like missing regions by incorporating multiple-point geostatistics, full-borehole image reconstruction, and fracture morphology information into the inpainting process [15,16,17].
These methods can achieve acceptable results when the missing regions are relatively narrow. In this study, a narrow strip-like missing region is defined as a row-wise missing gap not exceeding 30 pixels, which is slightly above the 95th percentile (28 pixels) of the observed missing-strip width distribution in the cropped real missing-region masks. This threshold covers the vast majority of real missing strips in the dataset, whereas gaps wider than 30 pixels are regarded as wider and more challenging missing regions. However, when applied to the structurally complex scenarios commonly encountered in borehole electrical images, such as wider strip-like missing regions, fracture intersections, and continuous bedding features, they often fail to preserve both global structural consistency and local texture fidelity simultaneously. As a result, the reconstructed images frequently exhibit blurred boundaries, structural distortion, and over-smoothed details [18].
In recent years, deep learning-based approaches have opened new possibilities for the reconstruction of missing regions in borehole electrical images [19,20,21,22,23]. Existing studies have shown that generative adversarial network (GAN)-based inpainting models can exploit broader contextual information to recover missing areas and generally outperform traditional methods in reconstructing complex fracture geometries and sedimentary textures [24]. The incorporation of attention constraints, dynamic feature enhancement, and context aggregation mechanisms has further improved the ability of these models to focus on structurally important regions, leading to better continuity and visual naturalness in the reconstruction of high-angle fractures, fracture networks, and complex bedding textures [25,26,27,28]. Nevertheless, most existing deep learning methods implicitly rely on the availability of relatively reliable paired samples of complete and corrupted images. In practical electrical imaging applications, however, strip-like missing regions are intrinsically unobservable, making it difficult to obtain strictly accurate ground-truth labels. Directly using images containing real missing regions to construct training samples may introduce corrupted structures into the supervision signals, thereby reducing the generalization capability and reconstruction reliability of the model.
To address the above issues, this study proposes a self-supervised electrical image inpainting framework constrained by real missing regions. Inspired by masked image modeling in visual representation learning [29], the framework first converts the observed real missing-region mask into a safe intact region and then generates artificial missing samples only inside that reliable area [30]. This design separates the unobservable real missing content from the supervised training target and reduces the risk that corrupted structures are learned as normal texture. A UNet-based reconstruction framework [31] is then established, with Squeeze-and-Excitation (SE) and Convolutional Block Attention Module (CBAM) mechanisms incorporated to form UNet, UNet-SE [32], and UNet-CBAM [33]. The study evaluates the method against Telea [34] and Navier–Stokes [35] baselines using both masked-region and whole-image metrics. The main contributions are: (1) a real missing-region-constrained safe sample construction strategy for self-supervised borehole electrical image inpainting; (2) a controlled UNet-series evaluation framework for assessing the effect of channel and spatial attention under identical data and training settings; and (3) a mask-region-oriented validation protocol that combines quantitative metrics, ablation experiments, repeated-seed analysis, and expert-assisted geological assessment.
The novelty of this study should therefore be understood primarily at the level of task-specific sample construction and validation design, rather than as the invention of a new neural-network block. UNet, SE, CBAM, and the L1-based loss are established components; in this work, they are deliberately used as controlled reconstruction backbones so that the effect of the real-missing-region-constrained training strategy can be isolated. By integrating real missing-region constraints, safe intact-region selection, artificial strip-mask generation, and masked-region-oriented evaluation, the proposed workflow provides a reproducible route for strip-like missing-region completion in borehole electrical imaging data where complete labels are not available.
2. Methods
2.1. Basic UNet Network
To achieve effective reconstruction of missing regions in borehole electrical images, UNet is adopted as the baseline inpainting network [31]. UNet employs a typical encoder–decoder architecture, which enables the joint modeling of global contextual information and local detail features through multi-scale feature extraction and skip connections [36]. Owing to this capability, it is well suited for the restoration of strip-like missing regions in electrical imaging data. For clarity in the subsequent formulation of the network structure and loss functions, the original image and the artificially generated missing mask are first defined as follows:
where represents the original image, with H and W denoting the height and width of the image respectively; stands for the artificially constructed missing mask. When = 1, it corresponds to the artificially constructed damaged region; when = 0, it corresponds to the known region. This explicit mask formulation forces the convolutional layers to condition their responses strictly on valid pixels [37].
Because the original image is represented in a three-channel format, the single-channel mask is replicated along the channel dimension to match the image dimensionality, yielding a three-channel mask, denoted as:
where denotes the three-channel mask obtained by replicating the single-channel mask M, which is used for element-wise operations with three-channel images.
During training, the corrupted input image is constructed from the complete image, the mask, and a predefined fill value for the missing region, and is formulated as:
where denotes the defective input image to the network; ⊙ represents element-wise multiplication; is the filling value for the defective region. In this paper, the artificially missing regions are assigned a value of 255 during the sample preservation stage, and the images are linearly normalized to [−1, 1] before being fed into the network. Therefore, c = 1 is adopted during the training phase.
To explicitly provide the missing positional information to the network, this paper concatenates the damaged image and the artificial mask along the channel dimension to construct the input tensor for the network [26]:
where denotes the input tensor of the network; represents the concatenation operation along the channel dimension; is the three-channel damaged image, and is the single-channel artificial mask. Thus, the network input is a four-channel tensor, where the first three channels correspond to the damaged image, and the fourth channel corresponds to the mask information.
On this basis, the network completes the mapping of the input tensor and outputs the restoration result, which can be expressed as:
where represents the three-channel inpainting image output by the network; denotes the completion network mapping function determined by parameter ; X is the four-channel tensor input to the network.
This paper adopts a four-layer encoder-decoder architecture. During the encoding phase, multi-scale semantic features are progressively extracted through successive convolutions and downsampling. The decoding phase gradually restores spatial resolution through upsampling and skip connections, while fusing corresponding shallow-level detail information. The network output employs a Tanh activation function to ensure the predicted results maintain consistent numerical ranges with the input images.
2.2. UNet-CBAM Network Architecture
Although the conventional UNet performs well in multi-scale feature fusion, its convolution operations generally assign fixed weights to different channels and spatial locations, making it difficult to adaptively emphasize structurally important information for missing-region reconstruction according to the input content. In image inpainting tasks, this limitation may result in blurred boundaries, over-smoothed textures, and incomplete recovery of local structures.
To further enhance the network’s ability to represent key features, the Convolutional Block Attention Module (CBAM) is incorporated into the baseline UNet framework, yielding the proposed UNet-CBAM inpainting network [33]. The overall architecture of UNet-CBAM is illustrated in Figure 1. The proposed network takes the corrupted image and its corresponding artificial missing mask as inputs. During the encoding stage, CBAM modules are embedded to progressively refine intermediate features at multiple scales, thereby enhancing the network’s ability to capture stripe boundaries, bedding continuity, and local texture details. During the decoding stage, the spatial resolution is gradually recovered through upsampling and skip connections, while shallow structural details are fused with deep semantic features to generate the final restoration result. Specifically, the network uses a four-channel input tensor formed by concatenating the three-channel masked image and the one-channel missing mask. Five CBAM modules are embedded after the downsampling layers in the encoding path to strengthen multi-scale channel and spatial feature representations, and the decoder progressively restores the spatial resolution through upsampling and skip connections before generating the reconstructed image through a final 1 × 1 convolution layer.
Figure 1.
Overall architecture of the proposed UNet-CBAM inpainting network. The blue arrows indicate the sequential feature-flow paths between adjacent modules, including downsampling and upsampling, whereas the yellow arrows denote skip connections between the encoder and the corresponding decoder stages.
CBAM is a lightweight attention module that adaptively recalibrates input features by sequentially combining channel attention and spatial attention, thereby enhancing the network’s perception of key channel responses and crucial spatial locations. The input feature map is:
where denotes the input feature map; C represents the number of channels in the feature map; H and W indicate the height and width of the feature map, respectively. First, channel attention is applied to the input features, and its computation process can be expressed as:
where denotes the channel attention map generated from the input feature F, which is used to adaptively weight the importance of each channel; represents element-wise multiplication; indicates the feature map after channel attention weighting. Building upon the channel attention mechanism, spatial attention is further applied, and its computation process can be expressed as:
where denotes the spatial attention map generated from the feature map F′, which is used to adaptively weight the importance of spatial locations; F″ represents the output feature map that has been weighted by both channel attention and spatial attention. The structure of the CBAM module is illustrated in Figure 2.
Figure 2.
Schematic diagram of CBAM module structure.
In this implementation, the CBAM module is embedded after the initial convolutional block output and each of the four downsampling module outputs, operating on intermediate features at five different scales in the encoder stage to maintain structural focus while minimizing computational overhead. This design enables layer-wise enhancement of encoded features across various scales without significantly increasing model complexity, thereby improving the network’s capability to model contextual information in defective regions, edge contours, and local texture details.
- (1)
- Channel Attention Mechanism
The channel attention mechanism is employed to characterize the importance of different channel features. Since different channels in convolutional feature maps typically correspond to semantic responses at various levels, adaptively allocating channel weights helps to highlight effective information relevant to image inpainting while suppressing interference from irrelevant or redundant features. For the input feature map F, global average pooling and global max pooling are first performed along the spatial dimensions respectively, yielding two sets of channel descriptor vectors:
where represents the input feature map; denotes the global average pooling operation along the spatial dimension; denotes the global max pooling operation along the spatial dimension; and represent the channel descriptor vectors obtained through average pooling and max pooling, respectively.
Subsequently, the two sets of channel descriptor vectors are fed into a shared-parameter multilayer perceptron (MLP), and the channel attention map is generated through element-wise summation and the Sigmoid activation function:
where denotes the channel attention map; represents the shared-parameter multilayer perceptron; indicates the Sigmoid activation function; and ‘+’ signifies the element-wise addition fusion after the and pooling branches are mapped through the shared multilayer perceptron, rather than feature concatenation.
After obtaining the channel attention map, it is broadcast along the spatial dimension and multiplied element-wise with the input feature map to obtain the channel-enhanced features:
where represents the feature map weighted by channel attention; ⊙ denotes element-wise multiplication. Through this process, the network can focus more on the critical channel information related to defect region restoration, edge continuity preservation, and texture reconstruction.
- (2)
- Spatial Attention Mechanism
Building upon channel attention selection, the spatial attention mechanism is further employed to localize key regions in feature maps. Channel attention emphasizes “which features are more important,” while spatial attention focuses on “which locations are more critical,” demonstrating clear complementarity between the two. For the channel-enhanced feature map F′, average pooling and max pooling are first performed along the channel dimension respectively, yielding two 2D spatial descriptor maps:
where F′ represents the feature map after channel attention weighting; denotes the average pooling operation along the channel dimension; denotes the max pooling operation along the channel dimension; and represent the two-dimensional spatial descriptor maps obtained through average pooling and max pooling, respectively.
Subsequently, the two spatial description maps are concatenated along the channel dimension and fed into a convolutional layer to generate the spatial attention map, whose expression is:
where denotes the spatial attention map; [.;.] represents feature concatenation along the channel dimension, indicates a convolution operation with a 7 × 7 kernel size; and denotes the Sigmoid activation function.
Finally, the spatial attention map is element-wise multiplied with the input features to obtain the final enhanced features:
where represents the output feature map after further weighting by spatial attention. Through this dual-attention process, CBAM adaptively highlights the critical structural information of the defective regions and their neighborhoods. This significantly enhances the model’s ability to characterize stripe boundaries, bedding continuity, and local texture details, ultimately improving the structural integrity and morphological fidelity of the restoration results.
2.3. Loss Function Design
Image inpainting requires a model not only to reconstruct the missing regions faithfully, but also to preserve maximal consistency between the known regions and the original image. If a uniform error constraint is imposed over the entire image, the optimization process is likely to be dominated by the large proportion of known pixels, thereby reducing the model’s sensitivity to the missing regions. To address this issue, a region-weighted L1 loss, which has been proven to be more effective than L2 loss in preserving high-frequency edge details [38], is adopted in this study, with separate constraints imposed on the missing and known regions [24]. This design encourages the network to focus on recovering missing content while suppressing unnecessary modifications in the intact regions.
To ensure dimensional consistency in loss calculation, this paper replicates the single-channel artificial missing mask M along the channel dimension to obtain a three-channel mask .
- (1)
- Loss in the defect region
The inpainting region loss is used to measure the difference between the predicted image and the ground truth image within the masked region, defined as:
where denotes the loss in the defective region; represents the inpainted image predicted by the network; Igt stands for the original image; indicates the three-channel mask; ⊙ signifies element-wise multiplication; denotes the L1 norm; ε is a small constant introduced to prevent division by zero. This loss function operates exclusively on the region to be inpainted, thereby more directly constraining the model to enhance the reconstruction accuracy of the defective area.
- (2)
- Known area loss
To prevent the network from generating additional artifacts or structural biases in known regions, this paper further introduces a known region loss that imposes consistency constraints on non-defective regions, expressed as:
where denotes the known region loss; represents the mask corresponding to the known region; indicates the inpainting image predicted by the network; stands for the original image; ⊙ signifies element-wise multiplication; denotes the L1 norm; ε is a negligible constant introduced to prevent division by zero. This loss function constrains the model to preserve the structural and textural information of the original image in the known regions as much as possible, thereby making the inpainting results more natural and stable overall.
- (3)
- Total Loss Function
By combining the loss of the defective region with the loss of the known region, this paper defines the total loss function as:
where denotes the total loss function; represents the loss in the missing region; indicates the loss in the known region; and are the weight coefficients for the missing region loss and known region loss respectively, with the specific values provided in Section 3.3.
Overall, the proposed loss formulation prioritizes the reconstruction of missing regions while effectively preserving the original structural and textural information in the known regions. This provides a stable optimization objective for improving both the fidelity and structural continuity of the inpainting results.
3. Experimental Design
To evaluate the effectiveness of the proposed method for borehole electrical image inpainting, experiments were designed from four aspects: data sources and sample construction, comparative methods and experimental settings, training parameters and implementation details, and evaluation metrics. Unlike Section 2, which focuses on methodological principles, this section emphasizes the practical implementation and experimental validation of the proposed framework under specific conditions. In particular, it addresses two key issues: (1) how to construct training samples with reliable supervision in the absence of complete ground-truth labels, and (2) how to fairly compare the performance of different methods under a unified experimental setting. The overall experimental workflow is shown in Figure 3. The workflow consists of three main stages. First, raw borehole electrical images and real missing-region masks are preprocessed and segmented into 256 × 256 patches, and self-supervised samples are constructed by applying artificial binary masks within safe intact regions. Second, the constructed samples are used to train the UNet-series inpainting models with the region-weighted loss function. Third, the trained model is applied to images with real missing regions, and the reconstructed patches are concatenated and evaluated quantitatively and visually.
Figure 3.
Overall workflow of the borehole electrical image inpainting experiment. Blue arrows indicate the overall experimental flow. In the CBAM-UNet schematic, gray arrows denote feature propagation, yellow arrows denote skip connections, and the two colored input arrows distinguish the masked-image and binary-mask streams.
3.1. Data Sources and Sample Construction
The experimental data used in this study consist of borehole electrical images and their corresponding real missing-region masks. The original images and missing masks are strictly aligned in spatial dimensions to ensure accurate correspondence between image content and missing locations during subsequent sample construction. The dataset contains 470 cropped image patches and 470 corresponding cropped real missing-region masks, all with a size of 256 × 256 pixels. In these cropped real missing masks, missing regions occupy approximately 14.72% of the total cropped image area. The row-wise missing-strip widths range from 1 to 43 pixels, with Q1 = 14 pixels, median = 16 pixels, Q3 = 22 pixels, the 90th percentile = 25 pixels, and the 95th percentile = 28 pixels. Considering the strong local texture continuity and directional characteristics of borehole electrical images, a sliding-window strategy is employed to partition each image into patches. The patch size is set to 256 × 256 pixels, with a sliding stride of 128 pixels. This configuration preserves local structural information while effectively enlarging the dataset through overlapping sampling, thereby providing sufficient data support for subsequent model training [16].
Additional mask statistics were calculated to further characterize the missing-region and training-mask distributions. All 470 cropped real missing-region masks are non-empty. After applying the 14-pixel safety boundary, the safe intact regions occupy approximately 58.78% of the cropped patch area on average, whereas the expanded hazardous regions occupy approximately 41.22%. A total of 2666 artificial training masks were generated within the safe intact regions. These artificial masks occupy 6.54% of the patch area on average, with a median of 6.47% and a range of 2.18–11.99%. Their row-wise mask widths range from 2 to 47 pixels, with a median width of 17 pixels and a 95th percentile of 26 pixels. These statistics indicate that the generated masks preserve the narrow strip-like characteristics of the real missing regions while avoiding true missing areas and their adjacent unstable zones.
Unlike general image inpainting tasks, the real strip-shaped missing regions themselves cannot directly serve as supervision targets during training. If they are directly used for sample construction, the model may easily mistake the actual damaged structures for normal textures, leading to distorted supervision signals. To mitigate this impact, this paper first establishes a safety boundary around the real missing mask Mreal and accordingly constructs a hazardous region mask and a safe intact region mask, which are defined as:
where represents the danger zone mask, denotes the real missing area mask, and indicates the morphological dilation operation; represents the width of the safety boundary, used to control the expansion range around the real missing area. Based on this, the safe intact area mask is defined as:
where represents the safety integrity zone mask, and denotes the remaining area excluding the hazardous zone, which is the relatively reliable region available for artificial sample construction.
Based on the parameter settings for sample construction, this paper adopts r = 14 pixels. The purpose of this processing is to exclude the actual missing bands and their adjacent unstable regions, retaining only the reliable texture areas far from the actual missing zones for artificial sample construction.
Inspired by the success of masked image modeling in self-supervised representation learning [39], this paper constructs artificial missing masks M only within the safe and complete region mask Msafe. Considering that missing areas in borehole electrical images typically exhibit strip-shaped, crack-like, and irregular edge characteristics, the artificial masks are designed morphologically to closely resemble actual missing patterns, thereby enhancing the consistency between training samples and real-world scenarios, as shown in Figure 4.
Figure 4.
Schematic diagram of constructing artificial missing samples under safety integrity zone constraints. The left panel shows the original patch and its real missing-region mask; the middle panels illustrate boundary dilation and artificial-mask generation within the safe intact region; and the right panel shows the target image and artificial mask used for training. Blue arrows indicate the processing sequence. In the central mask maps, black denotes the original missing region, gray denotes the dilated hazardous region, white denotes the safe intact region, and red denotes the artificial missing mask.
To further isolate the role of the safe sample construction strategy, both mask-level and model-level ablation analyses were conducted. At the mask level, all compared mask-generation strategies were designed to maintain the same average mask area ratio as the proposed safe masks (approximately 6.54%), so that the effect of mask placement could be examined independently of mask size. The proposed safe-region-constrained masks had no overlap with real missing regions or the expanded hazardous zones, yielding direct missing-region overlap and hazardous-zone overlap ratios of 0.00%. By contrast, the standard random strip masks produced a direct missing-region overlap ratio of approximately 14.33% and a hazardous-zone overlap ratio of approximately 41.62%. The missing-avoidance-only masks avoided direct missing regions but still overlapped the hazardous zone by approximately 6.46%, whereas the near-missing-risk masks overlapped the hazardous zone by approximately 12.51%. These mask-level results indicate that the proposed safe sample construction strategy directly reduces supervision contamination caused by placing artificial labels on truly missing or adjacent unstable regions.
Subsequently, corrupted input images are generated according to the input formulation defined in Section 2, while the corresponding original complete images are used as supervision targets, thereby forming constraint-guided self-supervised training samples. This sample construction strategy is not merely a form of artificial masking; rather, it constitutes an approximate simulation of real missing scenarios under the prerequisite of maintaining reliable supervision signals.
3.2. Comparison Methods and Experimental Setup
To systematically assess the effectiveness of the proposed method, five comparative approaches were considered in the experiments: Telea [34], Navier–Stokes [35], UNet [31], UNet-SE (UNet with Squeeze-and-Excitation attention) [32], and UNet-CBAM (UNet with the Convolutional Block Attention Module) [33]. Among them, Telea and Navier–Stokes represent conventional image inpainting methods and are used to characterize the classical reconstruction capability based on diffusion and boundary propagation mechanisms. UNet is adopted as the deep learning baseline to reflect the inpainting performance of a standard encoder–decoder architecture in this task. In contrast, UNet-SE and UNet-CBAM, which incorporate different attention mechanisms into the baseline UNet, are employed to compare the effects of alternative feature enhancement strategies on missing-region restoration.
The above comparative methods establish a two-level experimental framework. First, by comparing conventional methods with deep learning-based approaches, the experiments assess whether learning-based inpainting strategies are more suitable for handling the structurally complex strip-like missing regions commonly observed in borehole electrical images. Second, through internal comparisons within the UNet family, the study further examines the influence of different attention mechanisms on missing-region reconstruction accuracy, structural continuity, and texture preservation. As the design rationale of UNet-CBAM has already been described in detail in Section 2, the present section focuses primarily on its actual performance under the specific experimental setting.
The present comparison is intentionally limited to conventional inpainting methods and UNet-series models under the same self-supervised sample-construction and evaluation protocol. This controlled design was adopted to answer two focused questions: whether learning-based reconstruction is more suitable than classical diffusion or propagation methods for borehole strip gaps, and whether adding channel-spatial attention provides a consistent incremental benefit within the same UNet backbone. Modern inpainting models such as MAT, RePaint, transformer-based methods, and diffusion-based methods are important references for broader image inpainting; however, directly incorporating them would require domain-specific adaptation, additional training protocols, and careful tuning on the private borehole electrical image dataset, which is beyond the scope of the present revision. Therefore, the reported results should not be interpreted as evidence that UNet-CBAM outperforms those state-of-the-art natural-image inpainting frameworks. Instead, the comparisons are used to evaluate the feasibility and reliability of the proposed real-missing-region-constrained safe sample construction strategy. Adapted transformer- and diffusion-based baselines under a unified experimental setting will be considered in future work.
To prevent different sample variants derived from the same original image patch from being simultaneously included in both the training and validation sets, the dataset was split using a grouping strategy based on original patch identifiers. The validation ratio was set to 20%, and the random seed for data partitioning was fixed at 2024. This strategy effectively avoids homologous-sample leakage, thereby improving the reliability and interpretability of the experimental results.
3.3. Training Parameters and Implementation Details
The experiments were implemented using PyTorch 2.0 [40], with both training and evaluation conducted on an NVIDIA GeForce RTX 4090 GPU with 24 GB of memory (NVIDIA Corporation, Santa Clara, CA, USA). The implementation also used NumPy 1.23, Pillow 9.0, OpenCV-Python 4.5, scikit-image 0.19, torchvision 0.15, and tqdm 4.64. To ensure a fair comparison among different deep learning models, all models were trained under identical parameter settings. The input image size was fixed at 256 × 256, and the dataset comprised 4368 training samples and 1092 validation samples. The batch size was set to 8, and the models were trained for 80 epochs. The AdamW optimizer [41] was employed, with an initial learning rate of 1 × 10−4 and a weight decay coefficient of 1 × 10−5. To ensure reproducibility, the random seed for data splitting was fixed at 2024, and consistent random states were set in Python 3.10, NumPy 1.23, and PyTorch 2.0. In addition to the original single-seed comparison, the UNet-series models were independently trained three times using random seeds 2021, 2022, and 2023 while keeping the data split and evaluation protocol unchanged, so that the stability of the CBAM-related performance gain could be assessed using mean and standard deviation across repeated runs.
Regarding the training strategy, no additional model-specific hyperparameter tuning was performed. Instead, all comparative experiments were conducted under a unified configuration to minimize the influence of training-strategy differences on the final results. During training, only a simple data augmentation strategy, namely horizontal flipping with a probability of 0.5, was applied, whereas no random augmentation was introduced during validation, so as to ensure the stability and comparability of the evaluation results.
The loss function adopted in the experiments follows the region-weighted formulation defined in Section 2; therefore, its mathematical derivation is not repeated here, and only the weighting strategy used in the experiments is described. Specifically, a larger weight is assigned to the loss term in the missing regions so that the model focuses more strongly on the reconstruction quality of the target inpainting areas during training. At the same time, a consistency constraint is imposed on the known regions to suppress unnecessary modifications to intact image content. According to the adopted training configuration, the loss weight for the missing regions is set to 8.0, whereas that for the known regions is set to 1.0. This setting reflects the fundamental principle of the present experiments, namely that the primary optimization objective of image inpainting should be the accurate restoration of missing regions rather than the average error over the entire image.
3.4. Evaluation Metrics
To comprehensively assess the performance of different methods for borehole electrical image inpainting, quantitative evaluation was conducted from two perspectives: the whole-image level and the masked-region level. Given that the primary objective of image inpainting is the accurate reconstruction of missing content, masked-region metrics were adopted as the principal evaluation criteria, whereas whole-image metrics were used as complementary references. This evaluation strategy enables a more complete characterization of inpainting performance in terms of both local reconstruction quality and global consistency.
During the model inference phase, to prevent interference from known region errors on the overall evaluation results, this paper uses the known regions of the original image as the benchmark, replacing only the manually masked areas with model predictions to construct the final inpainted image. The expression is formulated as:
where Icomp represents the final restoration result, Igt denotes the original image, Ipred is the network’s predicted output, and M(3) refers to the three-channel artificial missing mask; ⊙ indicates element-wise multiplication; (1 − M(3)) corresponds to the known region mask. In the final result construction process, known regions directly retain the original pixel values from the reference image, while only the artificially missing regions are filled using the network’s predicted results. Therefore, the evaluation target in this paper is not the directly output image from the network, but rather the final completion result Icomp that better aligns with practical application scenarios.
In terms of evaluation metrics, this study employs Mean Absolute Error (MAE), Peak Signal-to-Noise Ratio (PSNR), and Structural Similarity (SSIM) [42] to quantitatively assess reconstruction performance. Among these metrics, mask-MAE, mask-PSNR, and mask-SSIM primarily characterize reconstruction performance within the missing regions and serve as the principal indicators in the subsequent analyses, whereas full-MAE, full-PSNR, and full-SSIM provide complementary measures of the overall consistency and visual naturalness of the completed images.
In the model-level ablation and repeated-seed analyses, an additional metric, termed mask-bounding-box SSIM, was calculated over the minimum rectangular region enclosing the artificial missing mask. Because this bounding box may also contain intact pixels surrounding the masked region, this metric differs from the mask-SSIM reported in the main comparison and should not be directly compared with it.
It should be noted that MAE, PSNR, and SSIM are generic image-quality metrics and cannot fully capture the structural and geological interpretability required for borehole electrical images. Therefore, a lightweight expert-assisted qualitative assessment was included as supplementary evidence rather than as a large-scale independent validation study. Three experts with experience in geological interpretation or borehole-image analysis reviewed 20 representative validation samples. The assessment focused on four criteria: fracture continuity, lamination-like texture continuity, preservation of local heterogeneity, and overall reliability for geological interpretation. For each sample, the experts examined the reconstructed region in relation to its surrounding image context and determined whether it met the minimum acceptability criterion for visual geological interpretation. This assessment was used only to complement the quantitative metrics and enlarged visual comparisons, and the approximate expert acceptance ranges are reported in Section 4.2. Given the limited number of experts and samples, the results should be interpreted as preliminary qualitative evidence rather than as statistically conclusive geological validation.
4. Results Analysis
The validation results are presented and discussed below from quantitative and visual perspectives.
4.1. Overall Analysis of Quantitative Results
The quantitative results on the validation set reveal a clear performance hierarchy among the five comparative methods. Overall, the evaluated UNet-series learning-based approaches consistently outperform the two conventional methods across all evaluation metrics, indicating that learning-driven inpainting strategies are promising for handling the structurally complex strip-like missing regions in borehole electrical images. By contrast, although conventional methods can accomplish basic pixel completion, they remain inadequate in terms of complex texture reconstruction and structural continuity preservation. The overall quantitative results are summarized in Table 1, while the bar-chart statistics for the masked-region and whole-image metrics are presented in Figure 5 and Figure 6, respectively.
Table 1.
Quantitative evaluation results of different methods on the validation set.
Figure 5.
Histogram of quantitative indicators for mask regions. Note: (a) Mask_MAE; (b) Mask_PSNR; (c) Mask_SSIM. Among the five methods, UNet-CBAM achieved the best performance on all three mask region metrics, demonstrating its superior capability in restoring strip-shaped missing regions.
Figure 6.
Histogram of Overall Quantitative Indicators. Note: (a) Full_MAE; (b) Full_PSNR; (c) Full_SSIM. Telea and Navier–Stokes are traditional methods, while UNet, UNet-SE, and UNet-CBAM are deep learning approaches. The results demonstrate that deep learning methods generally outperform traditional methods in full-image metrics, with UNet-CBAM achieving the best overall performance.
In terms of masked-region metrics, UNet-CBAM achieved the best performance among all compared methods, with a mask-MAE of 14.8077, a mask-PSNR of 21.1729 dB, and a mask-SSIM of 0.8025. By comparison, the baseline UNet yielded corresponding values of 15.0949, 20.9927 dB, and 0.7964, whereas UNet-SE achieved 15.1746, 20.9367 dB, and 0.7930, respectively. These results indicate that the baseline UNet already provides satisfactory reconstruction performance for missing regions, while the incorporation of CBAM further enhances the model in terms of error control, reconstruction quality, and structural preservation. In contrast, introducing only the SE module did not show clear numerical gains under the current experimental setting.
From the perspective of whole-image metrics, the performance trends of the different methods are generally consistent with those observed for the masked-region metrics. UNet-CBAM achieved a full-MAE of 0.9799, which is lower than that of UNet (0.9992) and UNet-SE (1.0041). Its full-PSNR reached 33.1838 dB, and its full-SSIM was 0.9824, both of which were higher than those of the other two deep learning models. Although whole-image metrics are influenced to some extent by the large proportion of known regions, which reduces their discriminative power relative to masked-region metrics, they still provide useful information regarding the overall consistency and visual naturalness of the reconstructed images. Overall, UNet-CBAM exhibited the best comprehensive performance among the five compared methods.
Overall, deep learning-based methods consistently outperform conventional approaches, with UNet-CBAM exhibiting the best overall performance among the five methods evaluated.
4.2. Comparison Between Traditional Methods and Deep Learning Methods
The overall comparison between conventional and deep learning-based methods reveals a substantial difference in their ability to reconstruct missing regions. Telea and Navier–Stokes mainly rely on local diffusion, boundary propagation, and continuity assumptions to fill missing areas, and therefore show some effectiveness for small gaps with relatively smooth textures [43]. However, the missing regions investigated in this study typically appear as elongated strip-like patterns that exhibit strong spatial coupling with surrounding textures, bedding features, and edge structures. Under such conditions, conventional methods struggle to preserve both texture continuity and structural integrity simultaneously when dealing with complex missing regions.
As shown in Table 1, the evaluated UNet-series approaches significantly outperform the two conventional approaches in terms of masked-region metrics. Taking UNet-CBAM as an example, compared with Telea, its mask-MAE decreases from 28.3552 to 14.8077, corresponding to a reduction of approximately 47.78%; meanwhile, mask-PSNR increases from 16.4001 dB to 21.1729 dB, and mask-SSIM rises from 0.5214 to 0.8025. Relative to Navier–Stokes, UNet-CBAM achieves an approximately 46.84% reduction in mask-MAE, a 4.6831 dB increase in mask-PSNR, and a 0.2706 improvement in mask-SSIM. These results indicate that the evaluated UNet-series methods offer substantial advantages over the two traditional approaches in terms of error control within missing regions, reconstruction fidelity, and structural similarity.
From the perspective of whole-image metrics, the two conventional methods also perform worse than the evaluated UNet-series approaches. The full-PSNR values of Telea and Navier–Stokes are 28.4110 dB and 28.5007 dB, respectively, both of which are substantially lower than those achieved by the evaluated UNet-series models (UNet, UNet-SE, and UNet-CBAM). Their corresponding full-SSIM values, 0.9571 and 0.9581, are likewise inferior to those of the evaluated UNet-series models. Although whole-image metrics are inevitably influenced by the large proportion of known regions, they still provide meaningful evidence of inter-method differences in terms of overall consistency and perceptual naturalness. These results further indicate that the two conventional methods are unable to achieve restoration quality comparable to the evaluated UNet-series approaches in the presence of complex strip-like missing regions.
To provide a more intuitive comparison of the error distributions within missing regions for different methods, absolute error maps of representative samples are presented in Figure 7. It can be observed that conventional methods generally produce larger high-error regions within the strip-like missing regions, whereas deep learning-based approaches exhibit more concentrated error distributions with lower overall magnitudes. In particular, UNet-CBAM yields smaller absolute errors across most missing areas, indicating its superior stability in reconstructing internal textures and restoring structural features within strip-like gaps.
Figure 7.
Comparison of residual heat maps by different methods. Note: The top-left shows the defective sample and its mask, while the rest display absolute error heatmaps from different methods. Brighter colors indicate larger errors, while darker colors represent smaller errors. Compared to traditional methods, deep learning approaches significantly reduce high-error ranges in the missing regions, with UNet-CBAM exhibiting the lowest error distribution, demonstrating its superior restoration performance.
In addition to the quantitative results, visual comparisons of representative samples further support the above findings, as shown in Figure 8. For relatively narrow strip-like gaps, conventional methods can achieve basic completion; however, the transition between the reconstructed and original regions remains relatively abrupt, and noticeable texture smoothing is often observed locally. As the width of the missing strips increases, these deficiencies become more pronounced. In particular, conventional methods frequently fail to recover continuous bedding textures and fine structural details within wider gaps, often resulting in blurred boundaries, structural stretching, and local distortions. In regions with well-developed fractures or bedding, conventional approaches also tend to extend key structural trends inaccurately, leading to discontinuities or offsets in local details. By contrast, deep learning-based methods can exploit broader contextual information to reconstruct missing regions, thereby exhibiting superior restoration stability and structural recovery capability across different scenarios.
Figure 8.
Representative full-image comparison of reconstruction results for typical missing-region samples. Panels (a–d) represent four different samples. Within each panel, the images from top-left to bottom-right show the defective image, the reconstruction result obtained using Telea, the reconstruction result obtained using Navier–Stokes, and the reconstruction result obtained using UNet-CBAM, respectively. The comparison illustrates global texture continuity, boundary transitions, and the overall visual consistency of the reconstructed strip-like regions.
Among the compared methods, UNet-CBAM not only reconstructs the internal textures of missing regions more accurately, but also preserves structural features that are more consistent with the original image, particularly at stripe boundaries, bedding continuity zones, and texture-complex areas. This indicates its stronger capability in context modeling and texture reconstruction. To further examine the differences among methods in terms of local texture details and boundary transitions, locally enlarged views of representative regions are provided in Figure 9. As can be observed in the regions marked by the red and green boxes, UNet-CBAM outperforms the conventional methods in terms of local texture continuity, natural edge transitions, and fine-detail preservation, while also exhibiting better structural consistency than the baseline model without attention mechanisms.
Figure 9.
Enlarged local comparison of representative reconstruction regions. Note: The upper row shows, from left to right, the damaged image and the inpainting results of Telea, UNet, and UNet-CBAM; the lower row displays the corresponding enlarged views of the red- and green-box regions. The red-box enlargement emphasizes local boundary transition and fracture-like discontinuity restoration, whereas the green-box enlargement emphasizes bedding-like texture continuity and local heterogeneity preservation.
To improve the representativeness of the visual presentation, the global comparison in Figure 8 and the enlarged local comparison in Figure 9 are now interpreted together. Figure 8 shows the overall reconstruction appearance across typical missing-region samples, while Figure 9 provides zoomed views of two complementary local structures. These enlarged comparisons allow differences among Telea, UNet, and UNet-CBAM to be inspected at a finer scale, especially in terms of boundary smoothness, fracture-like edge continuity, bedding-like texture recovery, and the preservation of local heterogeneous details.
From the perspective of geological interpretation, the enlarged views indicate that UNet-CBAM better preserves fracture-like edges, thin lamination-like bands, local discontinuities, and heterogeneous texture transitions than the conventional inpainting methods. In particular, the reconstructed regions show fewer abrupt boundary artifacts and better continuity with the surrounding bedding-like structures. Nevertheless, because the present workflow uses L1-based supervision and an encoder–decoder reconstruction network, slight attenuation of very high-frequency local heterogeneity may still occur in some reconstructed regions. Therefore, the current results and the expert-assisted assessment should be interpreted as evidence of improved visual and structural continuity under the present validation setting, rather than as a complete geological-interpretation validation across all possible well conditions. Broader expert-assisted geological assessment and task-specific structural metrics remain important directions for future work.
A lightweight expert-assisted geological assessment was further introduced to examine whether the reconstructed images preserved visually interpretable geological structures. Three experts evaluated 20 representative validation samples with respect to fracture continuity, lamination-like texture continuity, local heterogeneity preservation, and interpretation reliability. Approximate expert acceptance ranges for the evaluated methods are reported in Table 2. As shown in Table 2, the two conventional methods received relatively low expert acceptance levels. The approximate expert acceptance ranges were 30–40% for Telea and 35–45% for Navier–Stokes. In contrast, UNet and UNet-CBAM achieved higher ranges of 75–80% and 80–85%, respectively. These results provide supplementary expert-assisted evidence that learning-based reconstruction better preserves visually interpretable geological structures under the current evaluation setting.
Table 2.
Lightweight expert-assisted geological acceptance assessment of reconstruction quality. Note: FC, fracture continuity; LC, lamination-like texture continuity; LHP, local heterogeneity preservation; VIR, visual reliability for geological interpretation. The approximate expert acceptance range summarizes the proportion of judgments that met the minimum acceptability criterion for visual geological interpretation. Because the assessment involved only three experts and 20 representative samples, the ranges are reported as supplementary expert-assisted evidence rather than statistically conclusive geological validation.
Nevertheless, this expert-assisted assessment remains limited in scale. Only three experts and 20 representative samples were included, and the evaluation was mainly based on visual acceptability judgments rather than a comprehensive geological interpretation workflow. Therefore, the reported approximate expert acceptance ranges should be interpreted as supplementary evidence of improved visual geological plausibility under the current validation setting, rather than as proof that all geological information is fully preserved after reconstruction. Future work should include larger sample sets, more independent interpreters, blind evaluation, more detailed scoring criteria, and inter-rater agreement analysis to provide more rigorous geological validation.
Overall, the quantitative metrics, visual comparisons, and lightweight expert-assisted assessment indicate that learning-based methods are more suitable than conventional approaches for structurally complex strip-like gaps. Within the evaluated UNet-series models, UNet-CBAM achieved the best performance; however, this improvement should be interpreted as an incremental architectural enhancement within the proposed real-missing-region-constrained self-supervised framework.
4.3. Comparative Analysis and Performance Gains of UNet Series Models
In the internal comparison of deep learning models, the basic UNet has demonstrated superior capability in missing region restoration, indicating that the encoder–decoder architecture combined with skip connections can effectively integrate global semantic information with local detailed features. Building upon this foundation, the introduction of different attention mechanisms has resulted in certain performance variations among the models, though the overall performance gains remain relatively limited.
Quantitatively, UNet-CBAM outperforms the baseline UNet across all three mask region metrics. The mask-MAE decreased from 15.0949 to 14.8077, mask-PSNR improved from 20.9927 dB to 21.1729 dB, and mask-SSIM increased from 0.7964 to 0.8025. Meanwhile, the full-image metrics (full-MAE, full-PSNR, and full-SSIM) also slightly surpassed those of the baseline UNet. The relative improvements of UNet-CBAM over the baseline UNet were 1.90%, 0.86%, and 0.76% for MAE, PSNR, and SSIM, respectively; the MAE improvement was relatively more pronounced, whereas the enhancements in PSNR and SSIM were comparatively smaller.
A model-level ablation experiment was further performed using UNet-CBAM to evaluate whether the safe sample construction strategy improves reconstruction performance. The network architecture, data split, training hyperparameters, random seed, and evaluation protocol were kept unchanged, and only the training-mask generation strategy was varied. As shown in Table 3, the proposed safe-region-constrained strategy achieved the best performance among all compared strategies, with a mask MAE of 14.6120, a mask PSNR of 21.3141 dB, and a mask-bounding-box SSIM of 0.9237. Compared with the standard random strip-mask strategy, it reduced mask MAE by approximately 20.44%, increased mask PSNR by 1.85 dB, and improved mask-bounding-box SSIM by 0.0402. Compared with the missing-avoidance-only strategy, it reduced mask MAE by approximately 13.32%, increased mask PSNR by 1.16 dB, and improved mask-bounding-box SSIM by 0.0244. These results demonstrate that simply avoiding direct overlap with real missing regions is insufficient; excluding adjacent hazardous regions through safe-region constraints provides more reliable supervision and improves reconstruction quality under the same experimental setting.
Table 3.
Model-level ablation results of different training-mask generation strategies using UNet-CBAM. Note: All strategies used the same model architecture, data split, hyperparameters, random seed 2021, and evaluation masks; only the training-mask generation strategy was changed. Mask-bounding-box SSIM denotes the SSIM calculated within the minimum rectangular region enclosing the artificial missing mask and differs from the mask-SSIM reported in Table 1.
Because the numerical improvements of UNet-CBAM over the baseline UNet are relatively small, an additional repeated-seed robustness analysis was conducted for the UNet-series models. UNet, UNet-SE, and UNet-CBAM were independently trained using random seeds 2021, 2022, and 2023, while the data split, training epochs, hyperparameters, and evaluation masks were kept unchanged. The results are reported as mean ± standard deviation in Table 4. UNet-CBAM achieved the best average performance among the three deep-learning models, with a mask MAE of 14.7414 ± 0.1309, a mask PSNR of 21.2343 ± 0.0822 dB, and a mask-bounding-box SSIM of 0.9227 ± 0.0009. Compared with the baseline UNet, this corresponds to an approximately 1.56% reduction in mask MAE, a 0.1713 dB increase in mask PSNR, and a 0.0031 improvement in mask-bounding-box SSIM. These results indicate that the CBAM-related gain is modest but consistent across repeated runs under the current experimental setting. Because only three runs were conducted, the result is interpreted as descriptive robustness evidence rather than a formal statistical-significance claim.
Table 4.
Repeated-seed robustness analysis of the UNet-series models on the validation set. Note: Each UNet-series model was trained three times using random seeds 2021, 2022, and 2023. The data split was fixed using split seed 2024. Values are reported as mean ± standard deviation across the three runs. Mask-bounding-box SSIM denotes the SSIM calculated within the minimum rectangular region enclosing the artificial missing mask.
In comparison, UNet-SE did not demonstrate stable advantages. Among its mask-region metrics, the mask-MAE was higher than that of the baseline UNet, while mask-PSNR and mask-SSIM were lower under the original comparative setting. This indicates that, in the current task, the SE module relying solely on channel-wise feature recalibration does not consistently enhance the model’s capability for missing-region restoration, whereas spatial attention is important for dense prediction tasks such as inpainting [44]. Further comparison between the two attention-enhanced models shows that UNet-CBAM provides better overall performance than UNet-SE. In terms of masked-region metrics, UNet-CBAM achieves lower mask-MAE and higher mask-PSNR and mask-SSIM relative to UNet-SE, indicating better comprehensive performance in error control, reconstruction quality, and structural preservation within defective regions. The repeated-seed results in Table 4 further support that the CBAM-related gains are modest but consistent under the current experimental setting.
In summary, compared with UNet and UNet-SE, UNet-CBAM achieves better average performance across key metrics, including masked-region error, peak signal-to-noise ratio, and structural similarity. This suggests that the joint modeling of channel-wise and spatial information is more effective for restoring strip-like missing regions in borehole electrical images. Although the overall performance gain remains limited, the repeated-seed results provide descriptive robustness evidence for the usefulness of CBAM in this task. Further improvements are still needed in terms of sample construction, loss function design, and contextual modeling capability to achieve more robust inpainting performance.
5. Conclusions
To address the problem of strip-like missing regions in borehole electrical images caused by tool electrode distribution and incomplete wellbore coverage, this study systematically investigates borehole electrical image completion from the perspectives of sample construction, model design, and performance evaluation. The results show that, in the absence of complete ground-truth labels, the proposed safe sample construction strategy constrained by real missing regions can effectively prevent true missing structures and their adjacent unstable zones from contaminating the supervision signals, thereby providing reliable training data for self-supervised electrical image inpainting. The additional mask-level and model-level ablation results further confirm that safe-region constraints improve reconstruction quality compared with standard random masking and less restrictive mask-generation strategies. This finding highlights that, for geoscience imaging tasks involving real missing data and limited ground truth, high-quality sample construction is a critical factor governing model performance.
The experimental results further demonstrate that deep learning-based methods consistently outperform conventional image restoration approaches, indicating that they are better suited for reconstructing strip-like missing regions in borehole electrical images, where directionality and structural continuity are particularly important. Among the compared models, the baseline UNet already exhibits strong inpainting capability, suggesting that the encoder–decoder architecture can effectively integrate contextual information with local details. UNet-CBAM achieved the best average values across the repeated-seed evaluation of the UNet-series models, suggesting that the joint exploitation of channel-wise and spatial attention contributes positively to missing-region reconstruction. Nevertheless, the magnitude of improvement remains modest, implying that under the current dataset scale, model structure, and loss-function setting, CBAM should be regarded as a useful but incremental enhancement rather than a source of large performance gains.
The significance of this study lies primarily in demonstrating that the framework of real missing-region constraints, safe sample construction, and masked-region-oriented evaluation can provide a practical self-supervised solution for borehole electrical image inpainting, rather than in proposing a new network component. The added ablation experiments, repeated-seed analysis, and lightweight expert-assisted qualitative assessment further support the reliability of this framework from complementary perspectives. Future work should focus on larger multi-well validation, task-specific structural metrics, improved loss-function design, and adapted transformer- or diffusion-based baselines to enhance reconstruction accuracy and engineering applicability under more complex missing-data conditions.
The lightweight expert-assisted assessment further supports the visual comparison results by indicating that learning-based methods, particularly UNet-CBAM, better preserve visually interpretable geological structures than traditional inpainting methods under the current limited assessment setting. However, broader expert validation with larger sample sets, more independent interpreters, and inter-rater agreement analysis will be required in future work.
Author Contributions
Conceptualization, C.L. and T.L.; methodology, C.L. and T.L.; software, C.L.; validation, C.L., T.L. and M.W.; formal analysis, C.L. and M.W.; investigation, C.L., T.L. and M.W.; resources, C.X.; data curation, C.L. and T.L.; writing—original draft preparation, C.L., T.L., Q.Y. and M.W.; writing—review and editing, C.L., T.L., Q.Y., M.W. and C.X.; visualization, C.L., Q.Y. and M.W.; supervision, C.X. and T.L.; funding acquisition, C.X. All authors have read and agreed to the published version of the manuscript.
Funding
This research was funded by the National Natural Science Foundation of China, grant number 42572200.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
The data supporting the findings of this study are available from the corresponding author upon reasonable request. The source code, data preprocessing scripts, training scripts, prediction scripts, evaluation scripts, configuration files, and documentation supporting workflow-level reproducibility are available at https://github.com/chuanhao28/electrical-imaging-inpainting (accessed on 14 July 2026). Due to data confidentiality and ownership restrictions, the released code does not include the original experimental data, samples generated from the original data, model weights, prediction images, or visualization results derived from the private dataset.
Acknowledgments
The authors would like to thank the administrative and technical staff of the College of Geosciences, Northeast Petroleum University, for their support during sample preparation and laboratory testing.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Yuan, R.; Zhang, C.; Tang, Y.; Qu, J.; Guo, X.; Sun, Y.; Zhu, R.; Zhou, Y. Utilizing borehole electrical images to interpret lithofacies of fan-delta: A case study of Lower Triassic Baikouquan Formation in Mahu Depression, Junggar Basin, China. Open Geosci. 2017, 9, 539–553. [Google Scholar] [CrossRef] [Scilit]
- Xie, F.; Xiao, C.; Liu, R.; Zhang, L. Multi-threshold de-noising of electrical imaging logging data based on the wavelet packet transform. J. Geophys. Eng. 2017, 14, 900–908. [Google Scholar] [CrossRef] [Scilit]
- Zhu, B.; Pan, R.; Zhang, C.; Zhang, Z.; Shi, W. Application of hydrothermal altered reservoir identification method in metamorphic rock buried hill of Bozhong Sag, Bohai Bay Basin, China. Front. Earth Sci. 2022, 10, 807659. [Google Scholar] [CrossRef] [Scilit]
- Lai, J.; Wang, G.; Wang, S.; Cao, J.; Li, M.; Pang, X.; Han, C.; Fan, X.; Yang, L.; He, Z.; et al. A review on the applications of image logs in structural analysis and sedimentary characterization. Mar. Pet. Geol. 2018, 95, 139–166. [Google Scholar] [CrossRef] [Scilit]
- Zhao, J.; Fan, Y.; Ge, X.; Wang, W.; Zhu, Z.; Wang, M.; Zhao, D. An intelligent identification method of interlayers in deep clastic rock—An example of Donghe Sandstone in Hade Oilfield, Tarim Basin. Mar. Pet. Geol. 2023, 156, 106419. [Google Scholar] [CrossRef] [Scilit]
- Lai, J.; Wang, G.; Fan, Z.; Chen, J.; Qin, Z.; Xiao, C. Fracture detection in deep tight gas reservoirs using borehole electrical images. AAPG Bull. 2017, 101, 519–541. [Google Scholar]
- Sun, Q.; Su, N.; Gong, F.; Du, Q. Blank strip filling for logging electrical imaging based on multiscale generative adversarial network. Processes 2023, 11, 1709. [Google Scholar] [CrossRef] [Scilit]
- Lei, Q.; Latham, J.P.; Tsang, C.F. The use of discrete fracture networks for modelling coupled geomechanical and hydrological behaviour of fractured rocks. Comput. Geotech. 2017, 85, 151–176. [Google Scholar] [CrossRef] [Scilit]
- Al-Ali, S.; Al-Khafaji, S.J. Spatial distribution and reserve estimation of sand and gravel deposits using geostatistical methods in west Basrah, southern Iraq. Kuwait J. Sci. 2023, 50, 127–137. [Google Scholar] [CrossRef] [Scilit]
- Dalca, A.V.; Bouman, K.L.; Freeman, W.T.; Rost, N.S.; Sabuncu, M.R.; Golland, P. Medical image imputation from image collections. IEEE Trans. Med. Imaging 2018, 38, 504–514. [Google Scholar]
- Dou, L.; Qian, Z.; Qin, C.; Feng, G.; Zhang, X. Anti-forensics of diffusion-based image inpainting. J. Electron. Imaging 2020, 29, 043026. [Google Scholar] [CrossRef] [Scilit]
- Lin, X.; Zhang, P.; Meng, F.; Liu, C. A coal seam thickness prediction model based on CPSAC and WOA–LS-SVM: A case study on the ZJ Mine in the Huainan Coalfield. Energies 2022, 15, 7324. [Google Scholar] [CrossRef] [Scilit]
- Criminisi, A.; Pérez, P.; Toyama, K. Region filling and object removal by exemplar-based image inpainting. IEEE Trans. Image Process. 2004, 13, 1200–1212. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Shen, J.; Chan, T.F. Mathematical models for local nontexture inpaintings. SIAM J. Appl. Math. 2002, 62, 1019–1043. [Google Scholar] [CrossRef] [Scilit]
- Ji, H.; Li, X.-S.; Chen, Z.; You, C.; Peng, H.; Feng, Y. Multiple-point geostatistics simulation of the natural gas hydrate distribution at the pore scale. Energy Fuels 2023, 37, 9080–9088. [Google Scholar] [CrossRef] [Scilit]
- Boisvert, J.; Leuangthong, O.; Ortíz, J.M.; Deutsch, C.V. A methodology to construct training images for vein-type deposits. Comput. Geosci. 2007, 34, 491–502. [Google Scholar]
- Allard, D.; Fabbri, P.; Gaetan, C. Modeling and simulating depositional sequences using latent Gaussian random fields. Math. Geosci. 2020, 53, 469–497. [Google Scholar] [CrossRef] [Scilit]
- Guillemot, C.; Le Meur, O. Image inpainting: Overview and recent advances. IEEE Signal Process. Mag. 2013, 31, 127–144. [Google Scholar] [CrossRef] [Scilit]
- Campana, J.L.F.; Decker, L.G.L.; Souza, M.R.; Maia, H.A.; Pedrini, H. Variable-hyperparameter visual transformer for efficient image inpainting. Comput. Graph. 2023, 113, 57–68. [Google Scholar] [CrossRef] [Scilit]
- Han, Q.; Liu, J.; Jung, C. Lightweight generative network for image inpainting using feature contrast enhancement. IEEE Access 2022, 10, 86458–86469. [Google Scholar] [CrossRef] [Scilit]
- Noh, K.; Pardo, D.; Torres-Verdín, C. 2.5-D deep learning inversion of LWD and deep-sensing EM measurements across formations with dipping faults. IEEE Geosci. Remote Sens. Lett. 2021, 19, 8023805. [Google Scholar] [CrossRef] [Scilit]
- Suvorov, R.; Logacheva, E.; Mashikhin, A.; Remizova, A.; Ashukha, A.; Silvestrov, A.; Kong, N.; Goka, H.; Park, K.; Lempitsky, V. Resolution-robust large mask inpainting with Fourier convolutions. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision; IEEE: Piscataway, NJ, USA, 2022; pp. 2149–2159. [Google Scholar]
- Li, W.; Lin, Z.; Zhou, K.; Qi, L.; Wang, Y.; Jia, J. MAT: Mask-aware transformer for large hole image inpainting. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition; IEEE: Piscataway, NJ, USA, 2022; pp. 10758–10768. [Google Scholar]
- Pathak, D.; Krähenbühl, P.; Donahue, J.; Darrell, T.; Efros, A.A. Context encoders: Feature learning by inpainting. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition; IEEE: Piscataway, NJ, USA, 2016; pp. 2536–2544. [Google Scholar]
- Hedjazi, M.A.; Genç, Y. Efficient texture-aware multi-GAN for image inpainting. Knowl.-Based Syst. 2021, 217, 106789. [Google Scholar] [CrossRef] [Scilit]
- Yu, J.; Lin, Z.; Yang, J.; Shen, X.; Lu, X.; Huang, T.S. Generative image inpainting with contextual attention. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition; IEEE: Piscataway, NJ, USA, 2018; pp. 5505–5514. [Google Scholar]
- Lugmayr, A.; Danelljan, M.; Romero, A.; Yu, F.; Timofte, R.; Van Gool, L. RePaint: Inpainting using denoising diffusion probabilistic models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition; IEEE: Piscataway, NJ, USA, 2022; pp. 11461–11471. [Google Scholar]
- Liang, J.; Cao, J.; Sun, G.; Zhang, K.; Van Gool, L.; Timofte, R. SwinIR: Image restoration using Swin Transformer. In Proceedings of the IEEE/CVF International Conference on Computer Vision; IEEE: Piscataway, NJ, USA, 2021; pp. 1833–1844. [Google Scholar]
- He, K.; Chen, X.; Xie, S.; Li, Y.; Dollar, P.; Girshick, R. Masked autoencoders are scalable vision learners. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition; IEEE: Piscataway, NJ, USA, 2022; pp. 16000–16009. [Google Scholar]
- Wang, Y.; Wang, Q.; Lu, W.; Ge, H. Self-supervised learning for seismic data interpolation. Geophysics 2022, 87, V339–V352. [Google Scholar]
- Ronneberger, O.; Fischer, P.; Brox, T. U-Net: Convolutional networks for biomedical image segmentation. In Medical Image Computing and Computer-Assisted Intervention; Springer: Cham, Switzerland, 2015; Volume 9351, pp. 234–241. [Google Scholar]
- Hu, J.; Shen, L.; Sun, G. Squeeze-and-excitation networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition; IEEE: Piscataway, NJ, USA, 2018; pp. 7132–7141. [Google Scholar]
- Woo, S.; Park, J.; Lee, J.Y.; Kweon, I.S. CBAM: Convolutional block attention module. In Proceedings of the European Conference on Computer Vision; IEEE: Piscataway, NJ, USA, 2018; pp. 3–19. [Google Scholar]
- Telea, A. An image inpainting technique based on the fast marching method. J. Graph. Tools 2004, 9, 23–34. [Google Scholar] [CrossRef] [Scilit]
- Bertalmio, M.; Bertozzi, A.L.; Sapiro, G. Navier–Stokes, fluid dynamics, and image and video inpainting. In Proceedings of the 2001 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR 2001), Kauai, HI, USA, 8–14 December 2001; IEEE: Piscataway, NJ, USA, 2001; Volume 1, pp. I-355–I-362. [Google Scholar]
- Deng, Y.; Hou, Y.; Yan, J.; Zeng, D. ELU-Net: An efficient and lightweight U-Net for medical image segmentation. IEEE Access 2022, 10, 35932–35941. [Google Scholar] [CrossRef] [Scilit]
- Liu, G.; Reda, F.A.; Shih, K.J.; Wang, T.C.; Boucher, A.; Feldman, J. Image inpainting for irregular holes using partial convolutions. In Proceedings of the European Conference on Computer Vision; IEEE: Piscataway, NJ, USA, 2018; pp. 85–100. [Google Scholar]
- Zhao, H.; Gallo, O.; Frosio, I.; Kautz, J. Loss functions for image restoration with neural networks. IEEE Trans. Comput. Imaging 2016, 3, 47–57. [Google Scholar] [CrossRef] [Scilit]
- Xie, Z.; Zhang, Z.; Cao, Y.; Lin, Y.; Bao, J.; Yao, Z.; Dai, Q.; Hu, H. SimMIM: A simple framework for masked image modeling. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition; IEEE: Piscataway, NJ, USA, 2022; pp. 9653–9663. [Google Scholar]
- Paszke, A.; Gross, S.; Massa, F.; Lerer, A.; Bradbury, J.; Chanan, G.; Killeen, T.; Lin, Z.; Gimelshein, N.; Antiga, L.; et al. PyTorch: An imperative style, high-performance deep learning library. Adv. Neural Inf. Process. Syst. 2019, 32, 8026–8037. [Google Scholar]
- Loshchilov, I.; Hutter, F. Decoupled weight decay regularization. arXiv 2017, arXiv:1711.05101. [Google Scholar]
- Wang, Z.; Bovik, A.C.; Sheikh, H.R.; Simoncelli, E.P. Image quality assessment: From error visibility to structural similarity. IEEE Trans. Image Process. 2004, 13, 600–612. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Zhang, X.; Zhai, D.; Li, T.; Zhou, Y.; Lin, Y. Image inpainting based on deep learning: A review. Inf. Fusion 2023, 90, 74–94. [Google Scholar] [CrossRef] [Scilit]
- Guo, M.-H.; Xu, T.-X.; Liu, J.-J.; Liu, Z.-N.; Jiang, P.-T.; Mu, T.-J.; Zhang, S.-H.; Martin, R.R.; Cheng, M.-M.; Hu, S.-M. Attention mechanisms in computer vision: A survey. Comput. Vis. Media 2022, 8, 331–368. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.








