Vesuvius expanded 9µm residual 3D U-Net
Recommended inference: use stride 64 pixels with Hann blending of overlapping predictions. Use 128×128 model inputs and blend the central 96×96 output windows.
Private research model for ink segmentation in surface-aligned micro-CT stacks.
The model is the dashboard's custom 223,355,921-parameter DeepResidualUNet(deeper=False), trained from scratch with the original 814/841/9B scroll-shift-v2 recipe and an expanded, equally weighted scroll corpus.
- Weights and model card: https://huggingface.co/paranke/vesuvius-expanded9-resunet
- Code and training snapshot: https://github.com/priyankaranke/vesuvius-expanded9-resunet
- Training run: https://wandb.ai/aranke-priyank99-personal/donor-s1-continued-training/runs/expanded9-resunet128-v2-scratch-20260917
- Training recipe and data coverage
Completed training and checkpoint
The released weights are the completed epoch 10, after 74,160 optimizer updates and 20.62 hours of training/validation/checkpoint time. On the original 1,334-patch PHerc0841 holdout, final loss is 0.256293, AP 0.054061, and ROC-AUC 0.805088. AP/AUC use the central 32px core; loss uses the central 96px core. These final AP/AUC values are lower than epoch 9 (0.082163 / 0.869425). The release is the final checkpoint, not a validation-best selection, and these results do not establish improved cross-scroll performance.
- Completed training result
- Model configuration and checksums
- Final safetensors SHA-256:
4865e1133e85be5943da8f2cd64afcf9fcfb1407d23a8624d8f7f44a6bee80da - Original final checkpoint SHA-256:
2cc81a3af47060aef27106371d042c84651bd72e6c233bc9149a5da25a55331f
The safetensors export preserves every model tensor exactly. Optimizer and random-generator states are omitted from the release weights.
Installation and access
Both repositories are private. Authenticate with accounts granted access. Install a PyTorch build compatible with your CUDA environment, then:
git clone https://github.com/priyankaranke/vesuvius-expanded9-resunet.git
cd vesuvius-expanded9-resunet
python -m pip install -r requirements.txt
hf auth login
Input contract
Supply a local NumPy .npy array of shape [16, H, W], dtype uint8 containing sixteen consecutive, surface-normal CT planes in the verified model depth order. Use approximately 9µm physical spacing in XY and depth. These are already flattened/rendered surface stacks, not unprocessed CT volumes.
The stack must use the same physical surface mapping, normal orientation and center-plane convention as the training source. Do not infer plane order from filenames alone, reverse it arbitrarily, or resize labels independently of their surface UV mapping. The source preparation scripts and source records in training/ document the mappings. Scroll 1 has source-specific reversal rules in training/pherc1447-architecture-study-20260906/s1_depth_order.py.
Preprocessing is exactly clip(raw, 0, 200) / 255, with no per-image percentile normalization. Do not supply data already scaled to [0,1] or silently cast 16-bit CT to uint8. Rendering/intensity conversion must follow the source preparation pipeline before this step.
Inference
python inference.py --input surface_16planes_uint8.npy \
--output ink_probability.npy --device cuda --batch-size 1
The first invocation downloads the weights to the local HF cache; all image data remain local. For offline use, provide --checkpoint /path/to/model.safetensors. For a reproducible download, set --revision to the model repository commit. Increase batch size only within available GPU memory. Use --amp fp32 if BF16 is unsupported; --device cpu is supported but substantially slower.
Output is a float32 [H,W] array of sigmoid ink probabilities. The helper retains its legacy default: it uses 128×128 inputs, keeps the central 96×96 prediction, tiles with stride 96, and reflect-pads canvas edges. It performs no test-time augmentation or threshold calibration. This is a documented inference policy; reported validation AP/AUC use a narrower central 32×32 core and therefore should not be equated with whole-canvas scores from this helper.
For production inference, configure your tiling pipeline for the recommended stride 64 with Hann blending above.
For custom pipelines, instantiate model.DeepResidualUNet(deeper=False), load the safetensors state dict with strict=True, and pass [N,1,16,128,128] tensors after the preprocessing above. The network returns logits of shape [N,1,128,128]; apply sigmoid to obtain probabilities.
Limitations and data access
The corpus includes all 29 selected official Ink9 label sets but does not include every Ink-tagged specimen on the website: PHerc0343P is excluded. Additional hidden-surface labels for Fragments 2–4 could not be retrieved. See the exact coverage and exclusions in TRAINING.md.
Teacher-derived labels remain noisy. Connected-component cleanup removes small specks; it does not establish that every retained component is a genuine letter. Probabilities are uncalibrated. Validation uses one held-out PHerc0841 region, not an independent benchmark spanning all scrolls.
Raw CT, label images and prepared training caches are not redistributed in these repositories. Source URLs and preparation code are provided; some dashboard labels and original caches require the owner's existing access. Source data retain their upstream terms. This private release does not grant additional rights to the underlying scans or annotations.