Abstract
Quantifying porosity is essential for reservoir characterization, yet no single image analysis workflow has gained universal adoption. We evaluated three image-based approaches against helium porosimetry: jPOR color thresholding in ImageJ, operator-adjusted minimum-channel thresholding in QuPath, and a U-Net trained on QuPath output. All analyses used 26 thin sections of Cambrian sandstone from the Vilkyčiai-22 well, Baltic Paleobasin. Helium and point-count porosity were taken from the internal drilling report. Helium served as the reference and point-count, measured on different thin sections, as an independent optical estimate. All three image-based methods gave similar mean absolute errors (2.12–2.25 percentage points, pp) and were equivalent within a ±1 pp margin in an exploratory test. None had a mean bias distinguishable from zero. Point-count porosity followed helium values more closely (R2 = 0.45) but overestimated them by 1.63 pp. The image-based methods tracked helium porosity poorly: R2 was only 0.16–0.26, and the 95% limits of agreement were about ±6 pp. The U-Net reproduced the QuPath masks closely (Dice = 0.92), but these masks depend on one operator’s threshold, and a ±10-unit shift changed the reference porosity by about 2 pp. The three methods agree closely with each other, but none should be relied on alone to estimate plug-scale porosity.
1. Introduction
Cambrian sandstone reservoirs of the Baltic Paleobasin represent an important part of the sedimentary succession in western Lithuania. Although the Cambrian oil fields are largely depleted, they have been considered as potential reservoirs for geothermal energy production and CO2 geological storage. Several recent studies have demonstrated the geothermal potential of these reservoirs: Makauskas et al. [1] screened existing Cambrian hydrocarbon fields and identified the top candidate sites for geothermal development using mechanistic numerical models. Memon et al. [2,3] confirmed that repurposing depleted Cambrian fields, including the Vilkyčiai field, for geothermal heat extraction is technically feasible. In parallel, the Cambrian Deimena Group saline aquifer has been assessed for CO2 geological storage, with estimated storage capacities of 56.7 Mt at the Syderiai uplift and 31.3 Mt at the Gargždai elevation [4,5]. Accurate characterization of pore space geometry and reservoir quality in these sandstones is therefore relevant not only to petroleum geology but also to their evaluation as targets for renewable energy and carbon-capture applications. Image-based methods can complement bulk porosity measurements by providing spatial information on pore distribution and pore morphology.
The quantity of fluids trapped in the void space of reservoir rocks, their capacity to transmit fluids, and other associated characteristics are determined by the rock type as well as depositional environment and diagenesis, which together control the development of porosity and permeability [6]. Porosity is the fundamental measure of void space, and effective (interconnected) porosity in particular determines the economically relevant storage and flow capacity of a reservoir. Before questioning fluid types, flow rates, and recovery predictions, it is one of the essential characteristics to understand [6]. In laboratory practice, helium porosimetry based on Boyle’s law is the standard method for determining open porosity of core plug samples by the gas expansion method [7]. However, this standard laboratory method does not provide information on pore geometry, spatial distribution, or pore types; it only provides porosity values. Thin-section examination enables visual representation of samples, helping to visualize pore characteristics; however, extracting quantitative pore values from thin sections remains challenging. The relationship between two-dimensional sections and three-dimensional structures inherently limits the quantitative estimation of porosity from thin sections. As described by Underwood [8], measurements on a sectioning plane do not directly correspond to the true three-dimensional microstructure, and representative sampling may require multiple sections to obtain reliable average values. Traditional thin-section porosity estimation relies on manual point counting, which is time-consuming and leaves much of the available spatial information unexamined [9]. Several digital image analysis methods were developed over the years to bridge these gaps, visualize thin sections, and quantify pore percentages.
In plane-polarized light, a widely used digital image-analysis approach is intensity-based segmentation of thin sections impregnated with blue-dyed epoxy resin, which fills pore gaps and produces a strong color contrast against mineral grains [10]. This blue-resin impregnation technique has underpinned pore-scale image analysis since its early applications in optical petrography [11] and has since been extended to carbonates with complex pore systems [12] as well as to semi-automated workflows using freely available software such as ImageJ (version 1.54g) [13]. ImageJ is one of the most widely used open-source image-processing platforms [14]. Grayscale thresholding, for example with Otsu’s method [15], is common but treats blue epoxy as a mid-tone, so color-based approaches such as the jPOR macro [13] are better suited to blue-stained sections. QuPath, although originally developed for digital pathology, can also be adapted for geological whole-slide image analysis [16]. It offers more flexibility by giving the user the opportunity to modify threshold values individually for each sample. In general, systematic evaluations comparing multiple image analysis methods against laboratory porosity measurements on the same set of geological samples remain scarce.
In recent years, deep learning methods based on convolutional neural networks have been increasingly applied to image analysis tasks in the geosciences [17]. U-Net architecture, which uses an encoder–decoder structure with skip connections to combine high-level context with fine spatial detail, was originally developed for biomedical image segmentation [18] but has since found applications in geological image analysis. Saxena et al. [9] used CNN-based semantic segmentation on sandstone thin sections for binary pore detection and multi-class mineral classification, showing that the model’s effectiveness is highly influenced by the availability of labeled training data. Nande & Patwardhan [19] used U-Net for the automatic segmentation of pores in thin sections of carbonate reservoirs, achieving high overall accuracy but highlighting challenges in distinguishing pore edges from the background and sometimes misclassifying non-pore objects with pixel intensities similar to those of pores. While these studies demonstrate the potential of deep learning for petrographic image analysis, most report pixel-wise segmentation metrics alone [9,19], without direct comparison against independent laboratory porosity measurements or alongside conventional threshold-based methods on the same sample set, making it difficult to assess the practical advantages of one approach over another. This study compares three image-based porosity estimation methods—color-based thresholding (jPOR in ImageJ), operator-adjusted minimum-channel thresholding (QuPath), and U-Net deep learning—applied to Cambrian sandstone thin sections from the Vilkyčiai-22 well in western Lithuania. All three methods are benchmarked against porosity determined by laboratory helium porosimetry for 26 core plug samples. All porosity differences and errors are expressed in percentage points (pp).
2. Geological Setting
The Baltic Sedimentary Paleobasin developed within the large SW–NE-trending structural unit known as the Baltic Depression and constituted a fragment of an extensive epicontinental marine basin along the western and southwestern marginal zones of the East European Craton (EEC) (Figure 1). Following the breakup of the Precambrian supercontinent Rodinia and the cessation of rifting processes in the late Ediacaran, the passive margin of the Baltica paleocontinent evolved into a post-rift thermally subsiding basin [20,21]. The thickness of the sedimentary succession increases from the northeastern margin of the basin toward its southwestern part, near the Teisseyre–Tornquist Zone (TTZ), where it reaches 4–5 km in thickness [20].
Figure 1.
Location of the Baltic Paleobasin at the western margin of the East European Craton (A) (modified after Poprawa et al. [20]). A dashed line marks the erosional edge of the basin. CDF—Caledonian Deformation Front; TTZ—Tornquist–Teisseyre Zone. (B). The close-up of the study area with the location of cross-section A-B in Figure 1C, and the studied borehole Vilkyciai-22. (C). Generalized structural cross-section through Western Lithuania (modified after Zdanavičiūtė et al., [22]). Crosses (+) indicate the crystalline basement.
In Lithuania, the sedimentary cover ranges from Ediacaran, which occurs locally in eastern Lithuania, to the Quaternary, all resting unconformably on the Precambrian crystalline basement (Figure 1B). Cambrian strata represent the basal part of the sedimentary succession. Cambrian deposits (traditionally assigned to the Lower and Middle Cambrian according to the former stratigraphic subdivision; Figure 2A) are widespread across Lithuania, with present burial depths increasing from approximately 300–500 m in the east to ~2300 m in the southwest (Figure 1B). The Cambrian succession consists of clastic deposits, mainly fine-grained sandstones interbedded with siltstones and claystones, deposited in relatively shallow-marine environments [23].
The predominantly sandy Deimena Group reaches a thickness of up to ~80 m in western Lithuania (Figure 2B) and is the principal oil-bearing complex, with numerous oil fields discovered in traps associated with the major fault systems of the Telšiai and Gargždai arches [24]. In several cases, the Cambrian reservoir interval is accompanied by the unconformably overlying Lower Ordovician Obolus sandstone [25], which, despite its limited thickness (up to ~2 m), locally forms an important reservoir rock.
Figure 2.
The Cambrian stratigraphy (A) of Western Lithuania after Jankauskas [23] and Meidla [26] and generalized lithostratigraphic column (B) (modified after Jankauskas [23]).
The sandstone reservoirs have been charged with hydrocarbons generated from Cambrian, Silurian, and Ordovician source rocks [27,28]. Hydrocarbon generation in the basin commenced in the western part during the late Silurian and progressed eastward during the Devonian [29]. The maturation of the source rocks related to intense basin subsidence during the Silurian and continuing into the Devonian, reflecting a transition in the geodynamic regime of the Baltica margin from a passive to a convergent continental-margin setting [20,30]).
The Deimena reservoir comprises sheet- and lens-like sandstone bodies with interbedded siltstone and claystone layers. The Deimena sandstones are compositionally mature and consist predominantly of detrital quartz (up to 99%) in framework grains, with only negligible amounts of feldspars and minor constituents such as glauconite and accessory heavy minerals; accordingly, these rocks are classified as quartz arenites [31,32]. In Western Lithuania, the porosity of sandstone reservoir rocks generally ranges from a few percent up to ~12%, but fracture porosity also constitutes an important component of the overall reservoir quality [22,31]. Reservoir properties of the Deimena sandstones are highly heterogeneous, primarily attributed to variations in diagenetic quartz cementation. The sandstone reservoir properties were controlled by diagenesis directly related to burial depth and paleotemperature, but a close relationship with depositional facies and sandstone architecture was also suggested [32]. Western Lithuania lies within a geothermal anomaly within which the present-day Cambrian reservoir temperature exceeds 80 °C [33].
3. Materials and Methods
3.1. Sample Material
A total of 26 rock samples were collected along the Lower Ordovician–Cambrian core interval from the directional Vilkyčiai-22 borehole in western Lithuania (Figure 1B) for thin-section analysis. The recovered core comprises ~110 m of Cambrian sandstone interval and only a 1 m long Ordovician sandstone section. Due to borehole deviation, the total drilled interval corresponds to a true vertical thickness of ~71 m. The Ordovician–Cambrian boundary is at a true vertical depth of 1940 m. The core is stored in the Vievis core facility of the Lithuanian Geological Survey.
The petrographic characterization of sandstones is based on microscopic observations of 26 thin sections conducted in this study, together with results of modal and grain-size analyses (point count method on 25 samples) obtained from the internal drilling report for the Vilkyčiai-22 well [34], archived at the Lithuanian Geological Survey. Rock petrophysical properties, especially porosity, were determined for a total of 31 samples, 26 of which have matching depths with our thin-section samples, were also compiled from this report. The laboratory porosity was determined by helium porosimetry, which is based on the gas expansion method according to Boyle’s law. Helium porosimetry is a standard core analysis method for determining the porosity of reservoir rocks [6]. These laboratory-derived porosity values were used as reference for comparison to image-based porosity estimates. Point-count porosity extracted from the same internal report is available for 25 of the 26 studied samples. No point-count value is reported for sample 17 (2206.5 m). Pairwise comparisons involving point-count therefore use N = 25, whereas all comparisons among the three image-based methods use N = 26.
3.2. Thin-Section Preparation and Imaging
Thin sections were prepared from core samples by a MiĘKiNiA Lab. (Kraków, Poland). Sections were cut, mounted on glass slides, ground to standard petrographic thickness (~30 µm), and polished according to routine laboratory procedures. Before imaging, samples were impregnated with blue epoxy resin under vacuum to highlight pore spaces and microfractures. The blue epoxy provides a strong color contrast against mineral grains in plane-polarized light [10].
Digital images were taken with a Nikon DS-Fi3 camera (Nikon Corporation, Tokyo, Japan) attached to a Nikon Eclipse LV100N POL polarizing microscope (Nikon Corporation, Tokyo, Japan) at the State Scientific Research Institute Nature Research Centre in Vilnius. Sample images were taken at 10× magnification using Microvisioneer manual WSI software (version 2021). Exported images measured approximately 60,000 × 90,000 pixels at the native resolution of 0.3914 µm/pixel and were saved as uncompressed TIFF files to preserve maximum detail for subsequent segmentation analysis. Representative thin-section photomicrographs illustrating the contrast between low-porosity and high-porosity samples are shown in Figure 3.
Figure 3.
Representative thin-section photomicrographs in plane-polarized light. (a) Sample 003, QuPath porosity 2.84%. (b) Sample 002, QuPath porosity 10.07%. Blue areas represent epoxy-filled pore space.
3.3. Digital Image Analysis
All three methods operated on the same 10×-downsampled image grid (3.914 µm/px; approximately 6000 to 9000 px per side), exported once from the native TIFF files in QuPath. jPOR and U-Net were applied to these same exported images. No resampling occurred between methods, between QuPath masks and U-Net input or output, or at evaluation. QuPath GeoJSON annotations were rasterized to binary masks on this grid. For every method, porosity is pore pixels divided by all image pixels, and the pixel dimensions of each image were verified to be identical across the three pipelines. The methods differ in color handling and filtering by design: QuPath thresholds the minimum channel after Gaussian smoothing (σ = 1), jPOR classifies by hue using an 8-bit palette without additional smoothing, and U-Net uses full RGB patches. These differences are part of each method, so the comparison is between complete workflows, not isolated algorithms. At the downsampled pixel size of 3.914 µm/px, pores spanning fewer than two pixels (approximately 8 µm) may not be reliably resolved.
3.3.1. Operator-Adjusted Minimum-Channel Thresholding (QuPath)
The threshold-based pore detection method in QuPath used the built-in pixel classifier tools [16]. Thin-section images were processed at 10×-downsampled resolution (3.914 μm/px), i.e., the same image grid used for both jPOR and U-Net, so that all three methods are compared at matched resolution.
Before thresholding, a Gaussian pre-filter (sigma = 1) was applied to reduce noise and enhance contrast between pore space and mineral phases. Thresholding was performed on the minimum channel (Min Channel), which captures the lowest intensity value across all color channels per pixel and effectively highlights dark pore spaces against brighter mineral phases. The segmentation threshold was determined individually for each sample through visual inspection, by identifying the intensity value that best separated visually identifiable pore space from solid grains. Threshold values ranged from 145 to 180 across samples (individual per-sample values are reported in Supplementary Table S1). No helium values were used to tune or accept thresholds.
Pixels falling below the chosen threshold were classified as pore space, while all pixels at or above the threshold were classified as non-pore (solid grains and minerals). The resulting binary masks and pore pixel fractions were exported for quantitative comparison with the U-Net segmentation output and jPOR results.
3.3.2. Color-Based jPOR Thresholding (ImageJ)
Color-based pore segmentation was performed in ImageJ [14] using the jPOR macro of Grove and Jerram [13], which implements a custom palette and thresholding scheme designed specifically for blue-epoxy-impregnated thin sections. Images were processed at the same 10×-downsampled resolution (3.914 µm/px) used for QuPath and U-Net. Each image was converted to 8-bit palette format using the JPOR_60 palette with no dithering and saved as BMP. This conversion separates blue epoxy from mineral phases by hue rather than by grayscale intensity, which is the principal advantage of the color-based approach over grayscale thresholding.
Default jPOR threshold values were used for all samples, no per-sample manual adjustment was applied. Porosity was computed as total pore area divided by total image area, using the same total-pixel denominator as QuPath and U-Net.
3.3.3. U-Net Convolutional Neural Network
A convolutional neural network model based on the U-Net architecture was used to detect and segment pore spaces in geological thin-section images [18]. Thin-section images with varying dimensions across samples (approximately 6000–9000 pixels per side) were used at their downsampled PNG resolution, exported from QuPath after a 10× downsample from TIFF images. Pore space was outlined in QuPath [16] using the matched-resolution (10× downsampled, 3.914 µm/px) threshold-based segmentation scheme described in Section 3.3.1. The resulting masks were visually checked and exported as GeoJSON files to create binary reference masks for model training. Ground truth pore values for each sample were calculated directly from these masks before any processing steps.
To preserve details, 256 × 256-pixel patches were extracted from PNG images at downsampled resolution. All images are approximately 6000 × 9000 pixels, yielding ~805 non-overlapping patches per image. A selective sampling strategy was applied to address the class imbalance. All patches containing at least 10 pore pixels were classified as pore-bearing and all others as negative; no class-ratio correction was applied. From this combined pool, a uniform random subsample of up to 300 patches per image was retained for training, so that the pore/background ratio in the training set reflected the natural class prior of the images rather than an artificially imposed ratio.
Due to the limited number of samples, data augmentation was applied to both images and their corresponding masks, including random horizontal and vertical flipping, rotations by 90°/180°/270°, random brightness changes (factor 0.8–1.2), contrast perturbation, and Gaussian noise injection [35].
The U-Net algorithm consisted of three levels of encoding and decoding with skip connections through feature map concatenation. The encoder consisted of 32, 64, and 128 filters for the first three stacked layers, with a bottleneck having 256 filters. Each convolutional block contained two convolutional layers, each followed by Batch Normalization [36]. Dropout [37] (rate = 0.3) was applied after each encoding stage and at the bottleneck. The model takes 256 × 256 RGB patches as input and produces binary segmentation masks as output.
The model was trained on TensorFlow [38] with a combined loss function defined as the unweighted sum of binary cross-entropy (BCE) and Dice loss, a symmetric formulation chosen to avoid the pore-fraction bias that can arise when Focal [39] and Tversky [40] losses are tuned for class imbalance. The Adam optimizer [41] was employed with an initial learning rate of 0.0005, which was then reduced by a factor of 0.5 when the validation Dice coefficient plateaued for five epochs, with a floor at 1 × 10−7. Training ran for up to 50 epochs with a batch size of 4 and early stopping (patience of 15 epochs). Within each training fold, 4 images (20% of the training pool) were held out as an image-level validation set, used for early stopping, learning-rate reduction, checkpoint selection, and selection of the probability threshold.
To confirm that predictions for all samples were obtained from models never exposed to the corresponding sample during training, 5-fold cross-validation [42] was used. All 26 sample images were assigned to five folds (6, 5, 5, 5, and 5 images), stratified by quartiles of QuPath-derived porosity (random seed = 42). One fold was held out for testing and the other four were used for training, repeated until every image had been evaluated once. For each fold, the probability threshold was selected from 0.20 to 0.80 in steps of 0.05 by minimizing the mean absolute porosity error against the QuPath masks on the four validation images drawn from the training folds, before any prediction on the held-out fold; helium porosity was not used. The selected thresholds were 0.80, 0.80, 0.75, 0.20, and 0.80 for folds 1 to 5 (per-sample fold assignments, thresholds, and predictions in Table S2). Four of the five folds therefore selected a value at a boundary of the search range (0.80 in folds 1, 2, and 5; 0.20 in fold 4), indicating that threshold calibration is unstable when based on four validation images. Across folds, mean Dice was 0.92 ± 0.01 and mean porosity MAE against QuPath 1.16 ± 0.24 pp (mean ± SD of the five fold means; Table S3). At inference, each test image was tiled into overlapping 256 × 256 patches with a stride of 128 pixels (50% overlap), predicted individually, and the overlapping predictions were averaged before being stitched back together to produce a segmentation map of the whole image on the same 3.914 µm/px grid. The U-Net architecture is illustrated in Figure 4.
Figure 4.
U-Net architecture used for pore space segmentation. The encoder (blue) reduces spatial dimensions through max pooling, while the decoder (green) reconstructs the output through transposed convolutions. Dashed lines represent skip connections. Input: 256 × 256 × 3 RGB patches; output: 256 × 256 × 1 probability map.
Training annotations were extracted from QuPath segmentation rather than independent manual annotation. Pixel-level manual delineation of pore boundaries across high-resolution thin-section images was considered prohibitively time-consuming for this study. This approach means that the U-Net model learns to approximate the QuPath segmentation, and its performance metrics against QuPath (Section 4.2) reflect how well it reproduces that specific labeling scheme rather than an independent measure of segmentation accuracy. The comparison of results from all three methods against helium porosimetry-derived porosity (Section 4.3) provides a more independent assessment of each method’s accuracy.
3.4. Point-Count Porosity
Point-count porosity was extracted from the internal drilling report for the Vilkyčiai-22 well [34], from the same point-count table that provided the modal and grain-size data used in this study.
Point-count porosity is a two-dimensional optical measurement performed at standard petrographic magnification on blue-epoxy-impregnated thin sections. Unlike the three image-based methods compared in this study, it is not derived from digital segmentation of downsampled images and is therefore independent of both the image-analysis pipeline and the laboratory helium measurements. This independence makes it a reference available for assessing how much of the total pore space is visible in thin sections, and how much remains below the optical or digital resolution of the image-based methods.
Point-count porosity was available for 25 of the 26 studied samples; no point-count value is reported for sample 17 (report sample 34, 2206.5 m) in the internal report. Pairwise comparisons involving point-count therefore use N = 25, whereas all comparisons among the three image-based methods use N = 26.
3.5. Evaluation Metrics
To assess how well the U-Net model reproduced the QuPath reference masks, several pixel-wise metrics were calculated for each of the 26 samples. These included the Dice coefficient [43], which measures the degree of overlap between predicted and reference masks, and intersection over union (IoU), also known as the Jaccard index [44]. Precision and recall were used to evaluate the balance between false-positive and false-negative predictions, and pixel accuracy and specificity were also recorded. These metrics measure agreement with the QuPath labeling scheme and are used exclusively for the pixel-level comparison.
Porosity estimates from the three image-based methods (QuPath minimum-channel thresholding, jPOR color thresholding, and U-Net) and from point-count were compared with laboratory-derived open porosity using the mean absolute error (MAE) and root mean square error (RMSE). Systematic bias was calculated as the mean signed difference between each method and helium porosity, and all errors are reported in percentage points (pp). Agreement was further examined using Bland–Altman analysis [45], which plots the difference between two measurements against their mean and defines 95% limits of agreement as ±1.96 standard deviations. To quantify uncertainty given the limited sample size (N = 26 for the image-based methods and N = 25 for point-count), 95% bootstrap confidence intervals (CIs) for bias were calculated using 10,000 resamples with replacement. Pairwise differences in absolute error between methods were assessed using paired bootstrap resampling with the same 10,000-resample procedure, and equivalence was assessed as described below.
An exploratory equivalence analysis was performed using two one-sided tests (TOST) applied to the paired difference in absolute error between each method pair. An equivalence margin of ±1 percentage point (pp) was used. The analysis is exploratory because this margin was chosen after the method MAEs were known. The margin is a study-specific practical tolerance for differences in MAE between workflows, not a threshold derived from an established standard; we consider a difference below 1 pp acceptable because it is small relative to the errors of all three methods against helium (about 2 pp). Because the margin was not prespecified, the analysis was repeated at margins of ±0.75 and ±0.5 pp. A method pair was declared equivalent if its Holm-adjusted TOST p-value was below 0.05; 90% confidence intervals of the paired MAE difference are reported for reference only. To control the family-wise error rate across the six pairwise comparisons, Holm–Bonferroni correction was applied separately to the TOST p-values at each margin and to the paired bootstrap p-values. The paired bootstrap was used as the primary test of differences because it does not assume symmetry of the per-sample error distribution. TOST concerns equivalence of mean absolute error only; it does not show that methods agree sample by sample.
To test whether rock properties explain the per-sample errors, the signed error of each method (method − helium) was correlated with quartz cement, carbonate cement, clay content, mean grain size and sorting from the drilling report (N = 25) [34]. It was also correlated with two pore-size variables from the same report (N = 26): the threshold diameter and an estimate of the porosity held in pores smaller than 1 µm. The 1 µm cut-off is the only pore-size class reported for all samples. It was calculated as helium porosity × (1 − f), where f is the fraction of pore volume in pores larger than 1 µm [34]. Spearman rank correlations were used. Because the signed error itself changes with porosity level (regression slopes below one), partial Spearman correlations controlling for helium porosity were also calculated. Holm–Bonferroni correction was applied within each method across the seven variables. The same Spearman and partial Spearman correlations were also calculated for two further proxies from the report (N = 26): the difference between helium and effective porosity, and the mercury hysteresis. These two proxies were examined without multiplicity adjustment.
3.6. Sensitivity of the QuPath Reference to Threshold Choice
The sensitivity of the QuPath reference masks to the operator’s threshold was assessed on six selected samples: those with the lowest and highest helium porosity (samples 15 and 18), the best U-Net–QuPath agreement (sample 19), the smallest U-Net–QuPath porosity difference (sample 12), and two of the lowest agreement values (samples 16 and 25). For each, the threshold was shifted by +10 and −10 intensity units (about 1.3 SD of the per-sample thresholds, SD ≈ 7.72 units), new binary masks were generated, and the porosity change and the Dice coefficient between shifted and original masks were computed. U-Net predictions were compared with the shifted masks in the same way. This test measures the sensitivity of the reference to one operator’s threshold and does not measure inter-operator variability or independent segmentation accuracy.
4. Results
4.1. Petrography and Reservoir Properties Characteristics
The samples, whose stratigraphic position is shown in Figure 5, are classified as quartz arenites, composed predominantly of monocrystalline quartz (78–92% rock vol.), which constitutes the main rock-framework mineral, with minor accessory minerals. The only exception is sample 17 (2206.5 m), which is a calcite-cemented grainstone with ooids, glauconite, and lithoclasts [34]. No modal or grain-size data are available for this sample. Quartz cement, which mainly occurs as overgrowths on quartz grains (0.5–11.5% vol.) (Figure 6A) is the dominant type of cement. Carbonate cement is locally developed as poikilotopic cement filling intergranular spaces in patchily distributed domains, where quartz grains commonly appear to float within the cement or display only point contacts (Figure 6B). Clay minerals are rare and mainly occur as localized accumulations within larger pore spaces. Occasional fractures were also observed.
Figure 5.
Generalized lithological profile of Vilkyciai-22 core (measured depth) and gamma-ray log with sampling locations (arrows).
Figure 6.
Microphotographs of quartz sandstone exhibiting (A) intense compaction and quartz overgrowths (arrow) filling the intergranular pore space (sample no. 4); (B) a carbonate cement patch with floating quartz grains surrounded by compacted sediments (sample no. 25).
The sandstones are fine-grained (2.1–2.9 phi; Udden–Wentworth grain-scale) and range from moderately well-sorted to very well-sorted. Most samples exhibited near-symmetrical skewness (21 samples) and mesokurtic grain-size distributions (22 samples), indicating a generally balanced grain-size population, whereas only a few samples show enrichment in either coarse or fine fractions or display unusually broad or narrow grain-size distributions. Grain roundness varies among samples, but sandstones are generally moderately well-rounded. Overall, the rock is compositionally and texturally mature.
There is a moderate negative relationship (r = −0.42; N = 25) between mean grain size (φ, where higher φ corresponds to finer grains) and sorting. This suggests that finer-grained sediments tend to be better sorted than coarser-grained sediments. Porosity (% vol.) determined with the point-count method positively correlates with mean grain size (φ) (r = 0.61; N = 25), indicating that finer-grained sediments tend to exhibit higher porosity. Also, porosity (% vol.) correlates strongly but negatively with quartz overgrowth content (% vol.) (r = −0.83; N = 25), suggesting that a reduction in porosity is closely related to the volume of quartz cement. On the other hand, calculated compactional porosity loss (COPL = 29–40%) and compaction index (ICOMPCT = 0.78–0.99) are significantly higher than the cementational porosity loss values (CEPL = 0.5–9%) [46], indicating that compaction exerted a greater influence on porosity reduction than cementation. Consequently, silica required for quartz cement was most likely sourced from the pressure dissolution of quartz grains during late diagenesis associated with deep burial [31]. This interpretation is further supported by thin-section observations, which show that quartz cement is most abundant in areas of tightly compacted quartz grains, characterized by grain-sutured contacts, abundant pressure-dissolution features, and even locally brittle grain deformation (Figure 6A), thereby reducing porosity. In contrast, quartz grains floating within carbonate cement suggest an early diagenetic origin of the carbonate cement, which inhibited grain compaction (Figure 6B).
The reservoir properties of the investigated Cambrian sandstone interval are generally poor. Total open porosity is, on average, 7.44% (2.18–14.55%), with only three samples showing porosity greater than 10%, whereas seven samples show porosity below 6%. Absolute permeability for gas is also low across most samples, with seventeen samples showing permeability below 1 mD, and only four samples exceeding 10 mD. A positive moderate correlation exists between total open porosity and absolute permeability for gas (r = 0.50; N = 28). In addition, total open porosity positively correlates with pore-space parameters: threshold diameter (r = 0.61; N = 27) and pore diameter >1 µm (r = 0.60; N = 28). Absolute permeability for gas also correlates well with threshold diameter (r = 0.62; N = 27). Because not all petrophysical variables were measured on every sample, each correlation is reported with its own number of samples (N). All these relationships among the petrophysical properties of sandstones suggest that their filtration properties are controlled by pore-space characteristics, with a threshold diameter > 10 µm generally corresponding to permeability at levels > 1 mD. Oil saturation in sandstones is generally uneven. The light gray sandstones are commonly interlayered with dark gray mudstones.
4.2. Segmentation Performance Metrics
A summary of segmentation performance metrics comparing U-Net predictions against QuPath reference masks (26 samples) is provided in Table 1. A pixel-wise comparison resulted in a mean Dice Coefficient of 0.92 ± 0.06 (range: 0.72–0.98) and a mean intersection-over-union (IoU) of 0.86 ± 0.09 (range: 0.56–0.96). Precision averaged 0.94 ± 0.08 and recall 0.92 ± 0.11, and U-Net porosity was on average 0.26 pp lower than QuPath, indicating slight under-detection relative to the reference. The gap between precision and recall is small compared with the spread across samples. Pixel accuracy (0.99 ± 0.01) and specificity (0.99 ± 0.01) were consistently high, reflecting the strong class imbalance associated with the low average porosity of the samples (helium 7.44%; QuPath 7.82%; U-Net 7.56%).
Table 1.
Segmentation performance metrics of U-Net predictions relative to QuPath reference masks (26 samples).
At the sample level, the comparison of porosity estimates derived from U-Net and QuPath showed a mean absolute error of 1.15 ± 1.20 pp (range: 0.02–5.26 pp). Fifteen samples (58%) had porosity errors below 1 pp, and eleven samples (42%) had errors below 0.5 pp. Sample 012 showed the smallest difference (MAE = 0.02 pp), while sample 016 showed the largest discrepancy (MAE = 5.26 pp), followed by sample 023 (MAE = 3.15 pp) and sample 025 (MAE = 2.45 pp).
Nineteen samples (73%) achieved Dice coefficients above 0.90, four samples (15%) fell within 0.85–0.90, two samples (8%) between 0.80 and 0.85, and one sample (4%) below 0.80. The best-performing sample (019) achieved a Dice score of 0.979, with a precision of 0.989 and a recall of 0.969. The lowest performing sample (016) had a Dice coefficient of 0.721, a precision of 1.000, and a recall of 0.564. Against helium porosity, however, sample 016 is an outlier only for QuPath (+4.07 pp), whereas jPOR (−0.39 pp) and U-Net (−1.18 pp) are close to the laboratory value. Its operator threshold (180) was the highest in the set. Petrographically, the sample is unremarkable: quartz cement (4.8%) is below the median (6.6%), and carbonate cement is negligible (0.3%). Mean precision across all samples was 0.94 ± 0.08 and mean recall was 0.92 ± 0.11. A visual comparison of the U-Net prediction against the QuPath reference mask for the best-performing sample is shown in Figure 7A, while the worst-performing sample is presented in Figure 7B.
Figure 7.
Visual comparison of pore segmentation results. (A) Sample 019 (Dice = 0.98, best-performing); (B) sample 016 (Dice = 0.72, worst-performing). Left: original thin-section image with blue epoxy-filled pore spaces. Centre: QuPath reference mask (blue). Right: U-Net prediction (red). The cropped region represents approximately 2.9 × 2.9 mm of the thin section (750 × 750 px at 10× downsampled resolution; pixel size 3.914 µm). Scale bar = 500 µm.
To assess the sensitivity of the QuPath reference masks to the operator’s threshold, a sweep was performed on six selected samples (Section 3.6; Table S4). Shifting the threshold by +10 units (counting more pixels as pore) increased the derived porosity by a mean of 2.13 pp (range 1.26 to 3.75 pp), and shifting by −10 units decreased it by a mean of 1.64 pp (range 1.03 to 2.67 pp). Across the six samples, the mean Dice between the original and the shifted masks was 0.89 for both the +10 and the −10 shift (individual values 0.87 to 0.92). U-Net’s mean Dice against the shifted masks was 0.83 for +10 and 0.89 for −10, compared with a mean of 0.90 against the original masks in the same six samples (the 26-sample mean in Table 1 is 0.92). The lower +10 value reflects samples 016 and 025, which had the lowest Dice against the +10 mask (0.601 and 0.724); in the other four samples the mean was 0.92. In these two samples, the original QuPath porosity (12.04% and 9.22%) already exceeded the U-Net porosity (6.79% and 6.76%). For sample 016, Dice was 0.601 against the +10 mask and 0.840 against the −10 mask. In these six samples, the porosity shifts are of the same order of magnitude as the errors of all three methods against helium (2.12 to 2.25 pp) and much larger than the differences among those methods (about 0.05 to 0.14 pp).
Across the five folds, mean Dice ranged from 0.91 to 0.94 and mean porosity MAE against QuPath from 0.89 to 1.51 pp (Table S3).
4.3. Porosity Comparison: Four-Method Analysis
All four methods yielded MAE values of the same order of magnitude against helium porosimetry, ranging from 2.12 to 3.09 pp (Table 2; Figure 8). U-Net achieved the lowest error (MAE = 2.12 pp; RMSE = 3.07 pp), followed by QuPath (MAE = 2.17 pp; RMSE = 2.88 pp) and jPOR (MAE = 2.25 pp; RMSE = 3.20 pp). Point-count porosity, the only non-digital method, showed the highest error (MAE = 3.09 pp; RMSE = 3.98 pp). The three image-based methods therefore cluster tightly within 0.14 pp of each other in MAE, whereas point-count is 0.84–0.97 pp further from helium porosimetry.
Table 2.
Method comparison against helium porosimetry. All metrics are in percentage points (pp); bias CIs are 95% bootstrap intervals.
Figure 8.
Mean absolute error (MAE) and root mean square error (RMSE) of porosity estimates from three image-based methods and point-count relative to laboratory helium porosimetry.
When the direction of the error is considered, the systematic bias confirms this distinction (Table 2; Figure 9). The image-based methods showed minimal systematic offset: jPOR achieved a mean bias of +0.20 pp (95% bootstrap CI: −1.06 to +1.44 pp), QuPath +0.38 pp (−0.74 to +1.45 pp), and U-Net +0.12 pp (−1.08 to +1.28 pp). In all three cases the bootstrap CI includes zero, indicating a statistically undetectable bias against helium porosimetry. Point-count, by contrast, overestimated helium porosimetry by +1.63 pp (95% bootstrap CI: +0.20 to +3.03 pp), with a confidence interval that excludes zero. The Bland–Altman plots (Figure 9) reflect these behaviors, showing the image-based methods scattered symmetrically about the zero-difference line, whereas point-count displays a consistent positive offset. Despite the near-zero mean biases, the 95% limits of agreement for the image-based methods remain broad (spanning approximately ±6 pp; Table 2), indicating that individual per-sample predictions can still deviate substantially from helium porosimetry.
Figure 9.
Bland–Altman plots for jPOR, QuPath, U-Net, and point-count porosity estimates against helium porosimetry. Solid lines indicate mean bias; dashed lines indicate 95% limits of agreement (±1.96 SD); dotted lines indicate zero difference.
A direct comparison between the three image-based methods and the independent point-count porosity was performed on the 25 common samples. The image-based methods gave lower porosity than point-count on average, with mean biases of −1.64 pp (jPOR), −1.45 pp (QuPath) and −1.81 pp (U-Net). These offsets equal each method’s bias against helium minus point-count’s own overestimate of helium (+1.63 pp), so they restate that overestimate and do not independently locate its cause. Mean absolute errors against point-count (2.99, 2.92 and 3.03 pp) were larger than the mean biases because individual differences were of both signs; against helium on the same 25 samples, MAE was 2.11, 2.04, and 1.89 pp, respectively. Spearman rank correlations with point-count were moderate (ρ = 0.64, 0.65 and 0.61; p ≤ 0.002) and similar to those with helium on the same samples (ρ = 0.59, 0.62 and 0.61). Point-count itself correlated with helium at ρ = 0.63, similar to the image-based methods.
In the exploratory equivalence analysis (Table 3), all three image-based method pairs were equivalent within the ±1 pp margin specified in Section 3.5 (jPOR vs. QuPath, jPOR vs. U-Net, and QuPath vs. U-Net; Holm-adjusted TOST p ≤ 0.014). At ±0.75 pp, jPOR vs. U-Net, and QuPath vs. U-Net remained equivalent (adjusted p = 0.022 and 0.018) but jPOR vs. QuPath did not (p = 0.084), and at ±0.5 pp no pair was equivalent. None of the three point-count comparisons met the equivalence criterion at any margin. Using the paired bootstrap as the test of difference, only the U-Net vs. point-count pair was significantly different after Holm correction (adjusted p = 0.024). The jPOR vs. point-count and QuPath vs. point-count comparisons did not survive correction (adjusted p = 0.071 and 0.053, respectively) but also failed the equivalence criterion. These equivalence results concern the difference in mean absolute error between methods, not agreement with helium for individual samples.
Direct regression of image-derived porosity against helium porosity (Figure 10) showed that all four methods compress the true dynamic range of the sample set to some degree. Regression slopes were below unity for all three image-based methods (jPOR: slope = 0.49, R2 = 0.21; QuPath: slope = 0.50, R2 = 0.26; U-Net: slope = 0.37, R2 = 0.16). Point-count tracked the porosity range more faithfully (slope = 1.17, R2 = 0.45) but showed the largest positive bias. The low R2 values for the three image-based methods (0.16–0.26) indicate that they explain less than a third of the variance in the helium data.
Figure 10.
Laboratory (helium) porosity versus image-derived or point-count porosity for all four methods. The dashed gray line indicates the 1:1 reference; solid lines indicate the fitted linear regression for each method (jPOR, blue; QuPath, red; U-Net, teal; point-count, orange).
Predicting the mean helium porosity (7.44%) for every sample gives an MAE of 2.24 pp. The three image-based methods (2.12–2.25 pp) therefore perform close to this in-sample null model.
Table 3.
Exploratory pairwise equivalence testing. MAE difference = MAE(first) − MAE(second); 90% CIs are for reference. TOST and bootstrap p-values are Holm–Bonferroni adjusted across the six comparisons (TOST at each margin); equivalence is declared at adjusted p < 0.05.
Five samples account for most of the scatter in Figure 10 (Table 4): 9, 11, 15, 17, and 18. For each, at least one image method is offset from helium by more than 4 pp, whereas in the remaining 21 samples U-Net offsets are all below 2.6 pp, and QuPath exceeds 4 pp only at samples 16 (+4.07 pp). Point-count, available for four of the five (not 17), moves in the same direction as the image methods for samples 9, 11, and 15 but not 18, where it gives 21.21% against a helium value of 14.55% and image values of 7.25–7.69%. The largest single offset is sample 17 (+7.65 pp for U-Net, +5.75 pp for jPOR, +5.40 pp for QuPath).
Table 4.
Porosity from helium porosimetry and the four methods for the five samples with the largest offsets in Figure 10.
With plain Spearman correlations, no petrographic variable was significantly related to the error of any image-based method after Holm correction. When helium porosity was controlled for, quartz cement was negatively related to the error of all three methods (partial ρ = −0.71 for jPOR, −0.65 for QuPath, and −0.58 for U-Net; Holm-adjusted p ≤ 0.011). At a given helium porosity, more strongly cemented samples therefore gave lower image porosity. Point-count showed the same pattern (partial ρ = −0.65, p = 0.002). The estimated porosity in pores below 1 µm averaged 1.65 pp (range 0.45–5.85 pp). It was negatively related to the error of U-Net (partial ρ = −0.69, Holm-adjusted p = 0.001), and point-count (−0.56, p = 0.018), but not significantly to jPOR (−0.47, p = 0.077) or QuPath (−0.35, p = 0.40). The five samples with more than 1% carbonate cement were overestimated on average by jPOR (+1.59 pp) and QuPath (+1.10 pp), compared with −0.42 and −0.06 pp in the other samples, whereas U-Net showed no such difference (−0.16 vs. −0.19 pp). Image porosity was correlated with quartz cement about as strongly as helium porosity was (Spearman ρ = −0.74 to −0.81 for the three image-based methods, −0.76 for helium and −0.77 for point-count; N = 25).
Effective porosity [34] averaged 94% of helium porosity (mean difference between helium and effective porosity: 0.43 pp; maximum: 1.98 pp), while image-derived porosity was no closer to effective porosity than to helium porosity (MAE: 2.04–2.40 vs. 2.12–2.25 pp, respectively). The errors were weakly correlated with the difference between helium and effective porosity (Spearman’s ρ: −0.30 to +0.02; partial ρ: −0.25 to +0.06; unadjusted p ≥ 0.14) and with mercury hysteresis (Spearman’s ρ: −0.12 to +0.05; partial ρ: −0.13 to +0.06; unadjusted p ≥ 0.54). The threshold diameter, which was below 8 μm in 15 of the 26 samples, showed no significant relationship with the errors in the unadjusted correlations (ρ = −0.12 to +0.06). For U-Net, the partial correlation was ρ = +0.41 (unadjusted p = 0.045; Holm-adjusted p = 0.22 across the seven variables).
5. Discussion
5.1. Method Performance and the Dimensionality Argument
The three image-based methods (jPOR, QuPath, and U-Net) had similar absolute errors against helium (MAE 2.12 to 2.25 pp), and the exploratory TOST showed that their pairwise differences fell within the ±1 pp margin (Section 3.5). None showed a statistically detectable mean bias against helium porosimetry (the 95% bias CIs included zero), but this does not demonstrate absence of bias: with 26 samples, the CIs are about ±1.2 pp wide. Despite the near-zero mean biases, their regression slopes were well below unity (0.37 to 0.50) with low R2 values (0.16 to 0.26), meaning that image-derived porosity explains less than a third of the variance in helium porosity, and the 95% limits of agreement were about ±6 pp. With biases near zero, differences in MAE among the methods reflect scatter and not a systematic offset. The near-zero mean bias of QuPath, and of the U-Net trained on its masks, also depends on the threshold level chosen. In the six samples tested, a ±10 threshold shift changed QuPath porosity by about 1.6 to 2.1 pp, so the near-zero bias should not be read as a property of the method. Because the ±1 pp equivalence margin is smaller than the porosity change produced by a ±10 threshold shift, the methods can be described as similar to each other, but not as accurate against helium: all three have errors of about 2 pp, and the reference they are trained or tuned on is itself sensitive at that level. This weak tracking limits the use of any of the three methods as an estimator of plug-scale helium porosity in this dataset.
A slope below 1.0 indicates proportional bias: the methods over-predict porosity in low-porosity samples and under-predict it in high-porosity samples. This compressed slope is driven by the relatively weak correlation between the image-derived and helium porosity (r = 0.40–0.51). Additionally, because the core plugs and thin sections were sampled from the same depth interval but not the exact same physical volume, local centimeter-scale heterogeneity introduces further scatter into the per-sample comparison. Uncertainty in the helium measurements may also contribute to the shallow slopes, but its contribution cannot be determined because replicate helium measurements are unavailable.
The 2D-versus-3D difference does not by itself produce bias. By the Delesse principle [8], the area fraction of a pore network measured on a random 2D section is an unbiased estimator of its 3D volume fraction, and the near-zero mean biases of the image-based methods are consistent with this. Differences in sampled volume may increase variability but, under appropriate stereological sampling assumptions [8], do not inherently introduce bias.
Helium porosimetry measures the gas-accessible pore volume of a plug (10–40 cm3) [6,7], including pores substantially smaller than the image resolution, whereas image-based methods quantify epoxy-filled pore areas in a thin section (~0.02 cm3), without establishing whether they are connected (Table 5). The approximate image-based detection limit of 8 µm (two pixels at 3.914 µm/px) reflects the 10×-downsampled analysis grid rather than the optical resolution of the microscope. The native images have a pixel size of 0.3914 µm/px. The proxies for pore accessibility and connectivity from the drilling report [34] (Section 4.3) showed no consistent association with the errors, apart from one association for U-Net that did not remain significant after correction. These proxies are indirect; therefore, contributions from spatial resolution, pore accessibility, and connectivity cannot be excluded, particularly for individual samples such as sample 11.
Table 5.
Comparison of helium porosimetry and thin-section image analysis principles (sources: [6,7,8,47,48]).
The petrographic correlations point to the same source of scatter for all four thin-section methods. Image porosity followed quartz cement as closely as helium porosity did (ρ = −0.74 to −0.81 for the image methods, −0.76 for helium), so the methods respond to the main diagenetic control on porosity in these sandstones. However, at a given helium porosity, samples with more quartz cement and more fine porosity gave lower thin-section values. A plausible explanation is that overgrowths reduce pores and pore throats to sizes that helium can enter but that are not resolved in the images. Point-count porosity, measured on different sections and not by digital segmentation, showed the same pattern. This suggests that the effect arises from the difference between thin-section and plug measurements in cemented rock, not from any one segmentation algorithm. Because quartz cement and helium porosity are themselves strongly correlated (ρ = −0.76), these partial correlations should be read as consistent with this explanation rather than as proof.
The petrographic point-count method behaved differently. It modestly overestimated helium porosity by a mean of +1.63 pp (95% CI: +0.20 to +3.03 pp), and it tracked the dynamic range of the rock better than the digital methods (slope = 1.17, R2 = 0.45). The steeper slope follows from its higher correlation with helium (r ≈ 0.67). Combined with the slope, this correlation implies that point-count values were more spread out than helium values (Sy/Sx ≈ 1.75), unlike the image-based methods. Possible causes of the positive offset are epoxy-filled pluck-outs and grain-relief artefacts, microfractures, and counting error; the present data do not identify which operates.
The drilling report [34] gives a likely reason for three of the five outliers. Sample 17 (2206.5 m) is not a quartz arenite but a calcite-cemented grainstone with ooids, glauconite and lithoclasts, whose dark grains may be read as pore; excluding it raises the correlation with helium (r = 0.46 to 0.50 for jPOR, 0.51 to 0.55 for QuPath, 0.40 to 0.51 for U-Net). Sample 15 (2204.8 m) has a specific surface area of 1.25 m2/g, about 15 times the median of the other samples, indicating a micropore-rich rock in which all thin-section estimates (6.3 to 11.0%) exceed helium (2.18%). In sample 11 (2175.8 m), helium (11.31%) exceeds all thin-section estimates (4.7 to 7.5%); only 67% of its pore volume lies in pores >1 µm (78 to 96% in the other samples above 8.5% helium), so about 3.7 pp of its helium porosity lies in pores below 1 µm, far below the image resolution, and the report records fractures in its thin section.
Samples 9 (2162.5 m) and 18 (2162.9 m) lie 0.4 m apart and show opposite offsets. For sample 9, point-count (13.82%) and the image methods (13.30 to 16.08%) agree and exceed helium (8.60%), consistent with a plug–section difference. For sample 18, helium porosimetry (14.55%) and point-count (21.21%) indicate relatively high porosity, whereas the three image-based methods yield 7.25–7.69%. The discrepancy could reflect spatial heterogeneity between the analyzed thin section and the material sampled for helium porosimetry and point-count, but segmentation errors cannot be excluded without independent pixel-level annotations. Fracture porosity is a possible contribution only at sample 11, where the report records fractures [34]; plug and thin-section depths agree within 0.02 m for all five outliers [34], so depth mismatch is unlikely, and plug damage cannot be assessed with the available data.
5.2. Practical Implications
The three methods differ little in absolute error against helium. QuPath depends on an expert adjusting thresholds per sample, which is subjective and slow for large datasets. jPOR is automatic and performed similarly to QuPath against helium. U-Net, once trained, needs no per-sample threshold, but it reproduces QuPath only on average and agrees less well in the samples with the highest operator thresholds (016, 023, and 025; Section 4.2). Training it required QuPath thresholding of all 26 images, so any saving in operator time applies to new image sets only. Annotation, training, inference, and QuPath adjustment times were not measured, so no labor advantage is claimed. Its performance depends on the training data representing the target lithology and imaging conditions; if new images differ substantially, retraining is required.
5.3. Limitations
The U-Net was trained and evaluated using QuPath-derived masks, and thresholds were set by a single operator. The pixel-wise metrics therefore quantify agreement with this specific labeling scheme, not absolute segmentation accuracy, and the operator’s subjectivity is inherited by the U-Net model. The threshold-sensitivity test (Section 4.2; Table S4) shows how much the reference depends on one operator’s choice, but it is not a measurement of inter-operator variability, which was not assessed. The test covered six of 26 samples and may not generalize. Helium porosimetry and point-count porosity provide independent benchmarks for porosity that do not depend on the digital segmentation pipeline, but neither validates individual pixel labels.
Physical sampling limits the agreement that can be achieved. Core plugs and thin sections were sampled from the same depth interval but not the same physical volume. In heterogeneous sandstones, centimeter-scale variation in cementation or clay content means the two methods can measure different local porosity. This introduces scatter independent of segmentation quality and may account for part of the low R2, although the present data cannot separate it from segmentation error. The reported agreement therefore applies to this sampling arrangement. It does not establish pixel-level segmentation validity or porosity prediction for reservoirs in general.
The comparison rests on 26 sections from one well and was cross-validated by image in five folds of five or six images. Across folds, mean Dice was 0.92 ± 0.01 and mean porosity MAE against QuPath 1.16 ± 0.24 pp (Table S3). This supports an internal comparison, not performance on unseen wells, other lithologies, or other imaging conditions. The probability threshold was chosen on a small validation set per fold and varied between folds (0.20 to 0.80).
Finally, the U-Net model was trained exclusively on samples from the Vilkyčiai-22 well. Model performance may decline on different lithologies or imaging conditions [49]. Future work should incorporate multi-well datasets, independently annotated masks, and inter-operator comparisons.
6. Conclusions
We applied three image-based methods to quantify pore space in thin sections of Cambrian sandstone from the Vilkyčiai-22 well. These were color thresholding with the jPOR macro in ImageJ, minimum-channel thresholding in QuPath with an operator-set threshold for each sample, and a U-Net model which was trained on QuPath masks. Helium porosimetry on 26 core plugs from the laboratory was used as a reference together with additional point-count porosity from the drilling report as an independent optical estimate.
The three image-based methods yielded nearly identical mean absolute errors against helium porosity (2.12–2.25 pp), and an exploratory TOST confirmed all pairs were equivalent within the ±1 pp margin. None of them displayed a mean bias distinguishable from zero. This agreement is inter-method and does not reflect accuracy compared to the laboratory standard. Each method described accounted for only 16–26% of the variance in helium porosity, exhibiting regression slopes substantially under one and wide 95% limits of agreement (approximately ±6 pp). The scatter was primarily driven by five specific samples, where lithological differences, micropores, or plug-to-section spatial mismatches may explain the deviation.
Point-count porosity tracked the range of helium values more closely, yielding a regression slope of 1.17 (R2 = 0.45), though it systematically overestimated laboratory helium porosity by an average of 1.63 pp. Because this offset is comparable in magnitude to the errors observed in the image-based methods, point-counting could not serve as a benchmark to resolve the origin of those discrepancies.
Relative to the QuPath reference masks on which it was trained, the U-Net achieved a mean dice coefficient of 0.92 and an average absolute porosity discrepancy of 1.15 pp. While this approach eliminates manual threshold selection for individual images, it inherently reproduces the bias of a single operator. Indeed, adjusting that operator’s baseline threshold by ±10 intensity units shifted the resulting reference porosity by approximately 2 pp. Because processing runtime was not recorded, we claim no time or labor savings.
For these Cambrian sandstone samples, the three image-based methods agree closely with each other, but none should serve as a standalone proxy for plug-scale porosity. Broader application of the U-Net model will require validation across additional wells, using reference masks annotated by multiple independent operators.
Supplementary Materials
The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/geosciences16120485/s1, Table S1. Per-sample QuPath threshold values (Min-Channel) used for the 26 studied samples at 10× downsampled resolution; Table S2. Per-sample U-Net folds, thresholds and predictions (26 rows); Table S3. Per-fold U-Net cross-validation summary: held-out sample count, inner validation images, fold-specific decision threshold, mean Dice, IoU and porosity MAE versus QuPath; Table S4. Threshold sensitivity on six selected samples (T = original operator threshold).
Author Contributions
Conceptualization, N.T.; data curation, N.T.; formal analysis, N.T. and I.K.-B.; investigation, N.T. and A.C.-P.; methodology, N.T. and I.K.-B.; project administration, N.T.; software, N.T.; supervision, D.K. and A.C.-P.; validation, N.T., I.K.-B., D.K., and A.C.-P.; visualization, N.T.; writing—original draft, N.T. and A.C.-P.; writing—review and editing, N.T., I.K.-B., D.K., and A.C.-P. All authors have read and agreed to the published version of the manuscript.
Funding
This work was supported by the annual doctoral research funding allocated by the State Scientific Research Institute Nature Research Centre to the corresponding author as a PhD candidate. No specific grant number was assigned.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
The thin-section images, QuPath annotation masks and thresholds, jPOR outputs, U-Net per-sample predictions with fold assignments and fold-specific thresholds, per-fold metrics, threshold-sensitivity results, matched helium and point-count porosity values, pore-size and petrographic data with the error-correlation results, and the analysis and training code are publicly available in the Zenodo repository at https://doi.org/10.5281/zenodo.21515500 under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) license.
Acknowledgments
During the preparation of this manuscript, the authors used ChatGPT (GPT-6, OpenAI)) and Claude (Sonnet 5.5, Anthropic) for the purposes of improving language, grammar, clarity, and overall presentation, as well as for text editing and formatting. The authors have reviewed and edited the output and take full responsibility for the content of this publication.
Conflicts of Interest
Author Ieva Kaminskaite-Baranauskiene was employed by the company GeoPower LT. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Abbreviations
The following abbreviations are used in this manuscript:
| CDF | Caledonian Deformation Front |
| CEPL | Cementational porosity loss |
| CNN | Convolutional neural network |
| COPL | Compactional porosity loss |
| EEC | East European Craton |
| ICOMPCT | Compaction index |
| IoU | Intersection over union |
| LoA | Limits of agreement |
| MAE | Mean absolute error |
| mD | Millidarcy |
| PNG | Portable Network Graphics |
| RGB | Red, green, blue |
| RMSE | Root mean square error |
| SD | Standard deviation |
| TIFF | Tagged Image File Format |
| TTZ | Teisseyre–Tornquist Zone |
| U-Net | U-shaped convolutional neural network |
| WSI | Whole-slide imaging |
References
- Makauskas, P.; Kaminskaite-Baranauskiene, I.; Memon, A.R.; Pal, M. Assessing geothermal energy production potential of Cambrian geothermal complexes in Lithuania. Energies 2024, 17, 1054. [Google Scholar] [CrossRef] [Scilit]
- Memon, A.R.; Makauskas, P.; Kaminskaite-Baranauskiene, I.; Pal, M. Assessing the potential of geothermal energy in Cambrian complexes for renewable energy transition in Lithuania. Adv. Carbon Capture Util. Storage 2024, 2, 9–12. [Google Scholar] [CrossRef] [Scilit]
- Memon, A.R.; Makauskas, P.; Kaminskaite-Baranauskiene, I.; Pal, M. Repurposing depleted hydrocarbon reservoirs for geothermal energy: A case study of the Vilkyčiai Cambrian sandstone in Lithuania. Energy Rep. 2025, 14, 243–253. [Google Scholar] [CrossRef] [Scilit]
- Liugas, J.; Šliaupienė, R.; Grendaitė, M.; Michelevičius, D.; Šliaupa, S. CO2 geological storage prospects of Lithuania—Update. Adv. Carbon Capture Util. Storage 2023, 2, 8. [Google Scholar] [CrossRef] [Scilit]
- Šliaupa, S.; Michelevičius, D.; Šliaupienė, R.; Liugas, J. Assessment of the potential for CO2 storage and utilization in the fractured and porous reservoir of the Cambrian sandstones in west Lithuania’s Baltic Basin. Minerals 2024, 14, 1112. [Google Scholar] [CrossRef] [Scilit]
- Tiab, D.; Donaldson, E.C. Petrophysics: Theory and Practice of Measuring Reservoir Rock and Fluid Transport Properties, 5th ed.; Elsevier: Amsterdam, The Netherlands, 2024. [Google Scholar]
- American Petroleum Institute. Recommended Practices for Core Analysis, 2nd ed.; API RP 40; American Petroleum Institute: Washington, DC, USA, 1998. [Google Scholar]
- Underwood, E.E. Quantitative Stereology; Addison-Wesley: Reading, MA, USA, 1970; 274p. [Google Scholar]
- Saxena, N.; Day-Stirrat, R.J.; Hows, A.; Hofmann, R. Application of deep learning for semantic segmentation of sandstone thin sections. Comput. Geosci. 2021, 152, 104778. [Google Scholar] [CrossRef] [Scilit]
- Yanguas, J.E.; Dravis, J.J. Blue fluorescent dye technique for recognition of microporosity in sedimentary rocks. J. Sediment. Petrol. 1985, 55, 600–602. [Google Scholar] [CrossRef] [Scilit]
- Ruzyla, K.; Jezek, D.I. Staining method for recognition of pore space in thin and polished sections. J. Sediment. Res. 1987, 57, 566–568. [Google Scholar] [CrossRef] [Scilit]
- Anselmetti, F.S.; Luthi, S.; Eberli, G.P. Quantitative characterization of carbonate pore systems by digital image analysis. AAPG Bull. 1998, 82, 1815–1836. [Google Scholar] [CrossRef] [Scilit]
- Grove, C.; Jerram, D.A. jPOR: An ImageJ macro to quantify total optical porosity from blue-stained thin sections. Comput. Geosci. 2011, 37, 1850–1859. [Google Scholar] [CrossRef] [Scilit]
- Schneider, C.A.; Rasband, W.S.; Eliceiri, K.W. NIH Image to ImageJ: 25 years of image analysis. Nat. Methods 2012, 9, 671–675. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Otsu, N. A threshold selection method from gray-level histograms. IEEE Trans. Syst. Man. Cybern. 1979, 9, 62–66. [Google Scholar] [CrossRef] [Scilit]
- Bankhead, P.; Loughrey, M.B.; Fernández, J.A.; Dombrowski, Y.; McArt, D.G.; Dunne, P.D.; McQuaid, S.; Gray, R.T.; Murray, L.J.; Coleman, H.G.; et al. QuPath: Open source software for digital pathology image analysis. Sci. Rep. 2017, 7, 16878. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- LeCun, Y.; Bengio, Y.; Hinton, G. Deep learning. Nature 2015, 521, 436–444. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Ronneberger, O.; Fischer, P.; Brox, T. U-Net: Convolutional networks for biomedical image segmentation. In Medical Image Computing and Computer-Assisted Intervention—MICCAI 2015; Springer: Cham, Switzerland, 2015; Volume 9351, pp. 234–241. [Google Scholar] [CrossRef] [Scilit]
- Nande, S.B.; Patwardhan, S.D. A deep learning approach for automating the thin-section petrography of the carbonate rocks for effective reservoir characterization. Arab. J. Sci. Eng. 2024, 50, 10269–10301. [Google Scholar] [CrossRef] [Scilit]
- Poprawa, P.; Šliaupa, S.; Stephenson, R.; Lazauskienė, J. Late Vendian–Early Palaeozoic tectonic evolution of the Baltic Basin: Regional tectonic implications from subsidence analysis. Tectonophysics 1999, 314, 219–239. [Google Scholar] [CrossRef] [Scilit]
- Poprawa, P.; Pacześna, J. Rozwój ryftu w późnym neoproterozoiku–wczesnym kambrze na lubelsko-podlaskim skłonie kratonu wschodnioeuropejskiego—Analiza subsydencji i zapisu facjalnego. Przegląd Geol. 2002, 50, 49–63. [Google Scholar]
- Zdanavičiūtė, O.; Lazauskienė, J.; Khoubldikov, A.I.; Dakhnova, M.V.; Zheglova, T.P. The Middle Cambrian succession in the Central Baltic Basin: Geochemistry of oils and sandstone reservoir characteristics. J. Pet. Geol. 2012, 35, 237–254. [Google Scholar] [CrossRef] [Scilit]
- Jankauskas, T. Cambrian Stratigraphy of Lithuania; Institute of Geology, Vilnius University: Vilnius, Lithuania, 2002; 256p. [Google Scholar]
- Zdanavičiūtė, O.; Sakalauskas, K. (Eds.) Petroleum Geology of Lithuania and Southeastern Baltic; Institute of Geology: Vilnius, Lithuania, 2001. [Google Scholar]
- Laškovas, J. The Sedimentation Environments of the Ordovician Basin in the South-Western Margin of the East European Platform and Lithogenesis of Deposits; Institute of Geology: Vilnius, Lithuania, 2000; 314p. [Google Scholar]
- Meidla, T. Ediacaran and Cambrian stratigraphy in Estonia: An updated review. Est. J. Earth Sci. 2017, 66, 152–160. [Google Scholar] [CrossRef] [Scilit]
- Zdanavičiūtė, O.; Bojesen-Koefoed, J.A. Geochemistry of Lithuanian oils and source rocks: A preliminary assessment. J. Pet. Geol. 1997, 20, 381–402. [Google Scholar] [CrossRef] [Scilit]
- Cichon-Pupienis, A.; Littke, R.; Froidl, F.; Lazauskienė, J. Depositional history, source rock quality and thermal maturity of Upper Ordovician–Lower Silurian organic-rich sedimentary rocks in the central part of the Baltic Basin (Lithuania). Mar. Pet. Geol. 2020, 112, 104083. [Google Scholar] [CrossRef] [Scilit]
- Šliaupa, S.; Cyzienė, J.; Molenaar, N.; Musteikytė, D. Ferroan dolomite cement in Cambrian sandstones: Burial history and hydrocarbon generation of the Baltic sedimentary basin. Acta Geol. Pol. 2008, 58, 27–41. [Google Scholar]
- Lazauskienė, J.; Stephenson, R.; Šliaupa, S.; van Wees, J.D. 3-D flexural modelling of the Silurian Baltic Basin. Tectonophysics 2002, 346, 115–135. [Google Scholar] [CrossRef] [Scilit]
- Kilda, L.; Friis, H. The key factors controlling reservoir quality of the Middle Cambrian Deimena Group sandstone in West Lithuania. Bull. Geol. Soc. Den. 2002, 49, 25–39. [Google Scholar] [CrossRef] [Scilit]
- Molenaar, N.; Cyziene, J.; Sliaupa, S.; Craven, J. Lack of inhibiting effect of oil emplacement on quartz cementation: Evidence from Cambrian reservoir sandstones, Paleozoic Baltic Basin. Geol. Soc. Am. Bull. 2008, 120, 1280–1295. [Google Scholar] [CrossRef] [Scilit]
- Zinevicius, F.; Šliaupa, S. Lithuania—Geothermal energy country update. In Proceedings of the World Geothermal Congress, Bali, Indonesia, 25–29 April 2010; International Geothermal Association: The Hague, The Netherlands, 2010; pp. 1–8. [Google Scholar]
- Cicha-Szot, R.; Budak, P.; Majkrzak, M.; Such, P.; Matyasik, I.; Mroczkowska-Szerszeń, M.; Brzuszek, P.; Słoczyński, T.; Kowalska-Włodarczyk, M.; Darłak, B.; et al. Special Analyses of Cores from Vilkyčiai-22 Well with Interpretation; Unpublished internal report archived in the Lithuanian Geological Survey archive; Institute of Oil and Gas—National Research Institute (INiG–PIB): Kraków, Poland, 2014. [Google Scholar]
- Shorten, C.; Khoshgoftaar, T.M. A survey on image data augmentation for deep learning. J. Big Data 2019, 6, 60. [Google Scholar] [CrossRef] [Scilit]
- Ioffe, S.; Szegedy, C. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Proceedings of the 32nd International Conference on Machine Learning (ICML); PMLR: Lille, France, 2015; Volume 37, pp. 448–456. [Google Scholar]
- Srivastava, N.; Hinton, G.; Krizhevsky, A.; Sutskever, I.; Salakhutdinov, R. Dropout: A simple way to prevent neural networks from overfitting. J. Mach. Learn. Res. 2014, 15, 1929–1958. [Google Scholar]
- Abadi, M.; Agarwal, A.; Barham, P.; Brevdo, E.; Chen, Z.; Citro, C.; Corrado, G.S.; Davis, A.; Dean, J.; Devin, M.; et al. TensorFlow: Large-Scale Machine Learning on Heterogeneous Systems [Software]. 2015. Available online: https://www.tensorflow.org (accessed on 19 November 2026).
- Lin, T.-Y.; Goyal, P.; Girshick, R.; He, K.; Dollár, P. Focal loss for dense object detection. In Proceedings of the IEEE International Conference on Computer Vision (ICCV); IEEE: New York, NY, USA, 2017; pp. 2980–2988. [Google Scholar] [CrossRef] [Scilit]
- Salehi, S.S.M.; Erdogmus, D.; Gholipour, A. Tversky loss function for image segmentation using 3D fully convolutional deep networks. In Machine Learning in Medical Imaging—MLMI 2017; Springer: Cham, Switzerland, 2017; Volume 10541, pp. 379–387. [Google Scholar] [CrossRef] [Scilit]
- Kingma, D.P.; Ba, J. Adam: A method for stochastic optimization. arXiv 2015, arXiv:1412.6980. [Google Scholar] [CrossRef] [Scilit]
- Kohavi, R. A Study of Cross-Validation and Bootstrap for Accuracy Estimation and Model Selection. In Proceedings of the 14th International Joint Conference on Artificial Intelligence (IJCAI), Montréal, QC, Canada, 20–25 August 1995; Morgan Kaufmann: San Francisco, CA, USA; Volume 2, pp. 1137–1143.
- Dice, L.R. Measures of the amount of ecologic association between species. Ecology 1945, 26, 297–302. [Google Scholar] [CrossRef] [Scilit]
- Jaccard, P. The distribution of the flora in the alpine zone. New Phytol. 1912, 11, 37–50. [Google Scholar] [CrossRef] [Scilit]
- Bland, J.M.; Altman, D.G. Statistical methods for assessing agreement between two methods of clinical measurement. Lancet 1986, 327, 307–310. [Google Scholar] [CrossRef] [Scilit]
- Lundegard, P.D. Sandstone porosity loss—A “Big Picture” view of the importance of compaction. J. Sediment. Petrol. 1992, 62, 250–260. [Google Scholar] [CrossRef] [Scilit]
- Ehrlich, R.; Crabtree, S.J.; Horkowitz, K.O.; Horkowitz, J.P. Petrography and reservoir physics I: Objective classification of reservoir porosity. AAPG Bull. 1991, 75, 1547–1562. [Google Scholar] [CrossRef] [Scilit]
- Russ, J.C. The Image Processing Handbook, 6th ed.; CRC Press: Boca Raton, FL, USA, 2011. [Google Scholar] [CrossRef] [Scilit]
- Goodfellow, I.; Bengio, Y.; Courville, A. Deep Learning; MIT Press: Cambridge, MA, USA, 2016; Available online: http://www.deeplearningbook.org (accessed on 19 November 2026).
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.









