If you are a machine-learning engineer who just landed on a subsurface team, the borehole image log in front of you is not a picture — it is a sensor reading, and your job is to turn it into a tensor a model can learn from. This is the "what is a borehole image log" primer written for the person who will preprocess, label, and feed it to a network, not for the geologist who interprets it by eye. Every wavy dark line is a planar geological feature flattened onto a page, and the height and offset of that wave are the two numbers your model has to predict: dip and azimuth. Get the data representation right and the rest of the pipeline — imputation, normalisation, the loss, the metric — stops being arbitrary and starts following from the physics. This is the foundation under every later model we built in a roughly twenty-month engagement with a mid-sized Middle East carbonate operator.
The sensor: from electrodes to an array
A high-resolution borehole image logHigh-resolution borehole image log — a wireline logging tool that presses arrays of microresistivity electrodes against the borehole wall to produce a high-resolution electrical image of the rock. Conductive rock reads dark, resistive rock reads bright. tool measures the rock's electrical conductivity at the borehole wall, point by point, all the way up the well. Tiny electrodes on pads and flaps press against the wall; as the tool is pulled uphole, each draws a current into the formation and the rock's resistance becomes one pixel. A classic high-resolution borehole image log carries 192 electrodes in two rows, 24 copper electrodes per pad or flap, and the pad array wraps around roughly 80% of the borehole circumference, resolving detail down to about 50 micrometres — fine enough to image a hairline fracture a few millimetres wide.
Two facts on that line matter most. The coverage is partial — about 80%, not 100% — so the raw image arrives with structural holes in it. And the resolution is finite, which sets a hard floor on label precision no model can beat. Both come back below.
The image-log tool as a sensor
Electrodes (two rows)
Borehole circumference imaged
Imaging detail
You will also meet a sibling tool, the compact microresistivity toolCompact microresistivity tool — a slimmer through-tubing microresistivity imager with a much shallower depth of investigation than the standard image-log tool, used where the larger tool will not fit. Reads under an inch into the formation versus several inches for a standard image-log tool., which trades coverage and depth of investigation for a slim body that fits where the standard image-log tool cannot. The geometry below is identical for either tool — but the pixel statistics are not, and that bites you in preprocessing. A healthy dynamic image spans intensities of roughly 0 to 255; in our work, a corrupt or mis-scaled image (sometimes from the compact microresistivity tool) showed a range of only 0 to 15. A range check on raw pixel values is the cheapest quality gate you can put at the front of the pipeline, and it catches more bad wells than any clever model.
Unrolling the cylinder: the coordinate space you train on
The borehole is a cylinder; the image log is a rectangle. The processing software takes a vertical cut down the wall — conventionally at true north for a vertical well — and unrolls the cylinder flat, like peeling a label off a tin.
That gives you the array convention to keep. The horizontal axis is azimuth around the borehole, running 0° to 360°, so a pixel's horizontal index lives in [0, 359]; the vertical axis is depth; the intensity is a single channel in [0, 255]. When we represented image-log pixels as data points for clustering early on, each was exactly (X, Y, Z) with X ∈ [0, 359] (azimuth), Y the depth index, and Z ∈ [0, 255] the intensity. That is your input space — an azimuth-by-depth raster with a resistivity channel, not an RGB photograph.
Now drop a flat geological surface through that cylinder. A perfectly horizontal bed cuts a flat ring and draws a straight horizontal line on the unrolled image. Tilt the plane and the line rises on one side and falls on the other; unroll it and that line becomes a wave completing exactly one cycle across the image. That wave is a sine curve — not approximately, but as geometry: a tilted plane intersecting a cylinder is always an ellipse, and an ellipse unrolled against an angular axis is a sinusoid. This is why the whole problem reduces to detecting and parameterising sine waves, and why your label schema is built around them.
The missing-data problem nobody warns you about
Because the pads cover only ~80% of the wall, the unrolled image arrives with blank vertical stripes — the inter-pad gaps where no electrode touched the rock. In the file these samples are not zeros; they are coded with a sentinel value of -9999, which you convert to NaN. The first decision an honest pipeline makes is how to treat that missing data, because a convolutional or transformer backbone has no concept of "not measured" and will happily learn from a sentinel if you let it.
This is a data-engineering choice with a real cost curve. We benchmarked imputation on a single well interval and the difference was stark: 1-D interpolation along depth filled a patch in about 0.115 s on average, while a KNN imputer took roughly 2.625 s for the same patch — and run across a whole well KNN never finished, whereas 1-D interpolation completed in about 11 seconds. At borehole-image scale, the imputation method you pick is a throughput decision as much as a quality one, and the naive sophisticated choice can be the one that stalls the pipeline.
Static versus dynamic: a normalisation choice with teeth
Image logs ship in two normalisations, and which you train on is not cosmetic. Static imagery applies one fixed scaling across the whole interval; dynamic imagery rescales contrast within a sliding window, preserving the local conductivity contrast that makes a sinusoid pop. For a human both are useful; for a model the choice is close to decisive. In our ablations on the Middle East carbonate dataset, training the same architecture on static imagery left classification error at 63.5% — effectively unusable — while dynamic imagery dropped it to 2.54%. Static scaling flattens exactly the signal the model keys on. Take one preprocessing rule from this primer: train on dynamic-normalised logs, and treat "static vs dynamic" as a first-class configuration flag, not a default you inherit silently.
The fitting form is your label schema
Now the payoff. Once you accept that every planar feature is a sinusoid, a feature is fully described by fitting it with
y = A · sin(0.0175 · x + φ) + offset
where x is the azimuth in degrees and the constant 0.0175 is simply π/180, converting degrees to radians for one full cycle. Four numbers fall out of that fit, and three of them are the labels your model will regress.
- The offset is the centre line of the wave — the feature's depth.
- The amplitude
Ais the half-height of the wave, set entirely by how steeply the plane is tilted relative to the borehole. It encodes dip: gentle dip, short wave; steep dip, tall wave. - The phase
φis the horizontal shift — where around the borehole the wave reaches its lowest point. That trough points down-dip, so phase encodes azimuth.
So (offset, A, φ) is, up to a coordinate change, your target vector (depth, dip, azimuth). That is the whole reason the most effective approach is not to paint a pixel mask and fit curves afterward, but to treat each feature as an object and regress its sinusoid parameters end to end. In the production model we normalise that target to the unit interval before training — dividing the location, dip, and azimuth channels by 100, 90, and 360 respectively — so no single parameter, despite a wildly different native scale, dominates the regression gradient.
The mental model in one line
Apparent versus true: the correction that trips up newcomers
One subtlety causes silent label errors if you skip it. The dip and azimuth you read directly off the unrolled image are apparent — measured relative to the borehole axis, not the earth. To recover true values you correct for how the well itself is deviated and oriented, using the tool-angle and well-angle channels that ride along in the same binary wireline log fileThe binary wireline log file — the binary digital log format that carries logging-tool measurements and metadata, including the orientation channels needed to convert apparent dip and azimuth to true.. In our pipeline the corrections were as direct as trueAzimuth = Azimuth + toolangle − 180 and trueDip = Dip + wellangle − 180. Miss those channels — they are sometimes absent — and you are stuck training on apparent values, a quietly different target. Always confirm which frame your labels are in before you trust a metric.
Resolution is the ceiling, and the foundation under the AI
The last number to carry: in this Middle East carbonate dataset, a single pixel of the unrolled image corresponded to about 3 cm of depth — so a built-in ±3 cm depth uncertainty sits in every pick before any model runs, because you cannot localise a feature more precisely than one raster cell. That reframes evaluation. When depth-matching accuracy is reported at a 3 cm, 6 cm, or 9 cm threshold, those bands are calibrated against the pixel budget; no method beats its own raster, so the metric must live in physical depth bands, not an abstract IoU a sine wave has no box to support.
This is why our borehole-image computer-vision stack looks the way it does. The detection model — a Detection Transformer adapted for set prediction — does not classify pictures; it emits a fixed set of learned queries, each regressing one sinusoid's (depth, dip, azimuth) against the matched ground-truth fit, with missing-pad NaNs handled, dynamic normalisation applied, and the apparent-to-true correction baked into the labels. Get the representation in this primer right and the downstream choices — set prediction over anchors, depth-thresholded evaluation over IoU, focal loss for the overwhelming no-object case — stop being exotic and become the obvious consequence of the data. The geology writes the sinusoid; your pipeline just has to respect it from the first array onward.
Key takeaways
- Treat a borehole image log as a sensor-derived tensor, not a photo: an azimuth (x ∈ [0,359]) by depth array with a single resistivity channel (z ∈ [0,255]). A classic tool uses 192 electrodes covering ~80% of the borehole at ~50 µm detail.
- Partial pad coverage means missing data coded -9999 → NaN. Imputation is a throughput decision: 1-D interpolation (~0.115 s/patch) is viable at well scale; a KNN imputer (~2.625 s/patch) never finished across a whole well.
- Train on dynamic-normalised imagery, not static — it preserves the sinusoid contrast the model keys on. In ablation, static left classification error at 63.5% versus 2.54% for dynamic.
- Every planar feature is a sinusoid; fitting y = A·sin(0.0175·x + φ) + offset turns it into your label vector — offset→depth, amplitude→dip, phase→azimuth — normalised by 100/90/360 before training.
- Confirm apparent-vs-true frame (trueAzimuth = Azimuth + toolangle − 180; trueDip = Dip + wellangle − 180) and remember resolution caps accuracy: at ~3 cm per image-log pixel you inherit ±3 cm depth uncertainty, which is why detectors are evaluated in physical depth bands (3/6/9 cm), not IoU.
References
[1] Fullbore microresistivity borehole image-log tool — vendor tool description and microresistivity imaging principles. https://www.slb.com/
[2] Energistics, binary wireline log file format (RP66) specification. https://www.energistics.org/