SurfNet

SurfNet places a papyrus sheet's surface in a CT scan of a Herculaneum scroll, starting from the part of the sheet you have already approved. Run on GrowPatch's surface, it fixed 10 of the 19 benchmark cases that GrowPatch failed and failed none of the others. On its own, it fills small holes.

Code, documentation and the full benchmark: github.com/nestorvfx/RectoLocalScrollSolvers.

Files

file what
surfnet_base.pt the base model: its weights (22.8 M parameters, fp32), the network's spec and its training configuration
surfnet_pherc0211.pt the base model fine-tuned on one PHerc0211 sheet (below), in the same format
SHA256SUMS the files' checksums

Use

Install the code from the repository (bash setup.sh), then:

wget https://huggingface.co/nestorvfx/surfnet/resolve/main/surfnet_base.pt
surfnet grow --sheet sheet.tifxyz --known known.png --solve area.png --m7 $M7.zarr --normal-grids $M7.normal-grids \
  --pitch-um 9.362 --vc3d vc3d/squashfs-root/AppRun --out grown/
surfnet correct --ckpt surfnet_base.pt --sheet grown/surface --known known.png --solve area.png \
  --volume $CT --pitch-um 9.362 --mode fast --keep-draft --out corrected/

The inputs are a sheet (VC3D tifxyz), the approved cells and the area to place, as masks on its grid. The repository's README explains them, and every option.

Results

On 80 test cases on four windings of PHerc0139 that SurfNet was never trained on, scored against the official ground truth. The score (0-100) gives each cell full credit within 2 voxels of the ground truth, falling linearly to none at half the winding spacing; a case fails when more than 10 % of its area is on the wrong sheet (half a winding or more from the ground truth, or with no surface).

GrowPatch alone GrowPatch → SurfNet SurfNet alone
score, all 80 cases 83.6 87.5 54.1
failure rate, all 80 cases 24 % 11 % 74 %
score, holes up to 3.8 mm across (12 cases) 82.3 95.4 96.0

GrowPatch → SurfNet scored higher than GrowPatch in 62 of the 80 cases and lower in 8. It fixed 10 of GrowPatch's 19 failed cases and failed none of the 61 others. SurfNet alone is reliable only close to approved cells. The results by kind of area are in the repository.

Training

42,000 steps of batch 8 on synthetic errors of official ground truth (the approved cells given as prompts):

data objects area
PHerc0139 ground-truth windings (w023-w040, w047-w055) 27 1,081 cm²
PHerc1667 merged unwrap (31 wraps) 1 1,212 cm²
ink-labelled segments (PHercParis4 × 7, PHerc0814, PHerc0009B, PHerc0500P2) 10 991 cm²
total 38 3,284 cm²

Never trained on: PHerc0139 w056-w059, PHerc0841, PHerc1447, PHerc0343.

This model is a starting point. It can be fine-tuned on the approved part of your own sheet, which adapts it to that scroll's CT and to your surface convention, or trained further on more data; the repository has the commands.

Fine-tuned on PHerc0211

surfnet_pherc0211.pt: the base model fine-tuned for 6,000 steps (about 40 minutes on one 24 GB GPU) on 415 mm² of approved cells of one PHerc0211 sheet; more approved area may adapt it further, which was not tested. Tested on five areas of the same sheet it never trained on, SurfNet alone scored:

extension extension, right side given beside the trained edge hole 2.3 mm hole 1.8 mm
base model 29.8 50.9 64.6 97.8 97.8
fine-tuned 43.5 64.7 66.6 96.5 97.8

On these areas GrowPatch placed most of four of the five on the wrong sheet, so GrowPatch → SurfNet scored low with either model; the recto local solver, in the same repository, scored highest on four of the five. The sheet, the cells the model trained on, the cases and every method's scores are in the repository.

Limits

The base model was benchmarked on one scroll, PHerc0139, on four windings 1-4 windings from the nearest one it trained on; the fine-tuned one on five areas of one PHerc0211 sheet. Their accuracy elsewhere is not measured.

License

Both weights files and the code are released under the MIT License. They were trained on Vesuvius Challenge open data, "Vesuvius Challenge - CT Scans of Herculaneum Papyri", licensed CC BY-NC 4.0, and the fine-tuned model also on a PHerc0211 sheet derived from it, released with the code under CC BY-NC 4.0; the data itself remains under those terms.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support