CoreLog Vision — Drill-Core Logging & Lithology Classification Workbench
A browser-native drill-core logging workbench: it classifies sliding windows along core-tray channels into six lithologies with a CNN, merges adjacent same-class patches into a depth-stitched strip log with confidence shading, and flags out-of-distribution core with a Mahalanobis detector instead of forcing a class. It runs on procedurally synthetic trays, with a real-photo lane (DCID) used strictly as the out-of-distribution and real-head evaluation set. Honest by design: the CNN accuracy is synthetic-vs-synthetic, a label-permutation control collapses to chance, and the shipped detector is named for what it is.
Business Context
Consistent, auditable lithology logging feeds resource models, geometallurgy and blast design, so an automated logger is only useful if it says when to distrust it. CoreLog's value is the discipline around the number: the classifier is measured on a grouped-by-hole split (14 training holes, 4 test holes) so overlapping windows cannot leak, its accuracy is stated as synthetic-vs-synthetic rather than as real-core performance, and unfamiliar core is routed to a novelty flag instead of a forced class. That is the shape a logging aid needs before it touches a resource decision, not a single flattering accuracy.
Strategic Value
CoreLog's strongest asset is a control that actually ran and reported against interest: a label-permutation null collapses to chance (top-1 0.1387 vs a 0.1429 baseline), evidence there is no leakage behind the 0.994 grouped-by-hole CNN accuracy. It also documents a reversal most demos would hide: the incumbent pixel-autoencoder OOD detector scored AUROC 0.3078, worse than chance, and was replaced by a Mahalanobis detector in the CNN feature space at 0.9463, which is the one that ships (not the offline benchmark winner at 0.9995). The real DCID lane is scoped as evaluation, not deployment, and the card is explicit that the 0.994 number is synthetic and that DCID-7 carries no schist or ore class. It is a reusable pattern for an on-device, honestly-scoped logging aid that names its own limits.
The Challenge
Logging drill core is slow, subjective and hard to audit: a geologist assigns lithology by eye down thousands of metres of tray, and two loggers rarely agree at the boundaries. Automating it invites a worse failure, a model that emits a confident class for core it has never seen and buries the uncertainty. The useful questions are not only "which lithology" but "is this window even in the world the model was trained on", and "would this accuracy survive a split that does not let overlapping windows from the same hole leak between train and test".
Our Approach
CoreLog runs a full computer-vision ladder client-side over 8 procedurally synthetic tray cases (lithology suites, imaging-quality regimes, and closed-form analytic controls). A colour/texture baseline classifier and a run-merge segmentation that emerges from the classifier form the classical rung; a 6-class lithology CNN (ONNX, softmax plus a 64-dimensional penultimate feature in one pass) is the learned rung; and out-of-distribution flagging is done by a Mahalanobis detector in the CNN's 64-d feature space, whose mean and covariance ship as JSON and are scored in TypeScript. A separate real-photo lane loads the DCID drill-core image dataset as the out-of-distribution and real-head evaluation set only, never as training data. Nine OOD detectors are benchmarked offline on identical splits. Everything is client-side, TypeScript plus onnxruntime-web on the WASM backend, static on GitHub Pages; the offline precompute lane bakes artifacts by importing the same TypeScript engine the browser runs, so offline and live numbers match by construction.
Key Performance Indicators
| KPI | Baseline | Result | Impact |
|---|---|---|---|
| What the result tells you | A confident lithology class for every window | Lithology per window PLUS a Mahalanobis out-of-distribution flag when the core is unfamiliar | The model routes unknown core to a flag instead of forcing a class |
| Leakage control | Random patch-level split (windows leak between train and test) | Grouped-by-hole split (14 train / 4 test) + label-permutation null collapses to chance (0.1387 vs 0.1429) | The 0.994 accuracy is not an artifact of leakage |
| OOD detector, honestly named | Pixel autoencoder: AUROC 0.3078 (worse than chance) | Shipped detector: Mahalanobis in the CNN 64-d feature space, AUROC 0.9463 | The reversal is documented, not the benchmark winner (0.9995, not shipped) |
| Compute | Server / GPU inference service | 100% client-side: TypeScript computer vision + onnxruntime-web (WASM) | Static hosting, nothing to install, zero backend |
Architecture
corelog pipeline
From “which lithology” to “is this core even in-distribution”
CoreLog Vision is a browser-native drill-core logging workbench. It classifies sliding windows along core-tray channels into six lithologies with a CNN, merges adjacent same-class patches into a depth-stitched strip log with confidence shading, and flags out-of-distribution core instead of forcing a class. Live at corelog.fasl-work.com, part of the Faena mining-analytics hub.
What it runs on
- Synthetic trays (the main lane, and the training data): 8 procedurally generated cases, three lithology suites, three imaging-quality regimes, and two closed-form analytic controls. There is no in-app upload; the workbench runs these cases plus the real evaluation lane.
- Real DCID photos (evaluation only): the Drill Core Image Dataset is loaded as the out-of-distribution and real-head evaluation set, never as training data. 21 verbatim CC BY-NC patches are committed with DOI-level provenance.
Three rungs, run live
A classical rung (colour/texture baseline plus a run-merge segmentation that emerges from the classifier), a learned rung (the 6-class lithology CNN, ONNX, softmax plus a 64-d penultimate feature in one pass), and out-of-distribution flagging via a Mahalanobis detector in that 64-d feature space. Everything runs client-side over onnxruntime-web on the WASM backend, with a graceful fallback to the classical method if a model is absent.
Honest about what the numbers mean
The CNN reaches 0.994 accuracy against a 0.9286 colour baseline on a grouped-by-hole split (14 train / 4 test holes, nEval 1344), and this is stated for what it is: synthetic-vs-synthetic, the CNN scored against the generator’s own ground truth, not real-core accuracy. Two things keep it honest. A label-permutation null collapses to chance (top-1 0.1387 vs a 0.1429 baseline), which is the leakage control that the grouped split is meant to guarantee. And the shipped OOD detector is named for what it is: a Mahalanobis detector at AUROC 0.9463, which replaced an incumbent pixel-autoencoder that scored 0.3078 (worse than chance); the offline benchmark winner (0.9995, a second backbone) is not the one that ships. The real DCID head reaches top-1 0.9916 on held-out real core, but DCID-7 contains no schist and no ore class, so it is an evaluation lane, not a mine-lithology claim.
Technology Stack
In action
A short tour of the live app — the real interface, recorded from the deployed site.

Application Screenshots

