Lasagnetta 0.1.0 (experimental): three students, recipe, model card
Browse files- README.md +62 -0
- lasagnetta-l32n.pt +3 -0
- lasagnetta-w24.pt +3 -0
- lasagnetta-xl.pt +3 -0
README.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-nc-4.0
|
| 3 |
+
library_name: pytorch
|
| 4 |
+
tags:
|
| 5 |
+
- vesuvius-challenge
|
| 6 |
+
- herculaneum-papyri
|
| 7 |
+
- 3d
|
| 8 |
+
- ct
|
| 9 |
+
- distillation
|
| 10 |
+
- experimental
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# Lasagnetta (experimental)
|
| 14 |
+
|
| 15 |
+
Lasagnetta is a fast preview of villa's lasagna field. villa's lasagna net ([ScrollPrize/villa](https://github.com/ScrollPrize/villa), weights [scrollprize/lasagna](https://huggingface.co/scrollprize/lasagna), MIT) predicts, for a CT scan of a Herculaneum scroll, a cos signal that repeats once per papyrus layer, its gradient size and the sheet normals. villa's surface fitting reads that field. Lasagnetta is a smaller 3D U-Net trained to copy villa's output, written on the same grids (cos at scaledown 2, grad_mag and the normal at 4) in villa's own layout, about 4 times faster end to end.
|
| 16 |
+
|
| 17 |
+
**It did not pass its held-out test.** Use it as a preview, with its self-check on, and keep villa's own field as the reference. Its output is model output, a preview of another model's output, not a reading of any text.
|
| 18 |
+
|
| 19 |
+
## Files
|
| 20 |
+
|
| 21 |
+
| File | What it is |
|
| 22 |
+
| --- | --- |
|
| 23 |
+
| `lasagnetta-l32n.pt` | Student 1 (config `l32n`, 100,000 steps) |
|
| 24 |
+
| `lasagnetta-xl.pt` | Student 2 (config `xl`, 100,000 steps) |
|
| 25 |
+
| `lasagnetta-w24.pt` | Student 3 (config `w24`, 100,000 steps and a 50,000-step polish) |
|
| 26 |
+
|
| 27 |
+
The release is the average of the three students, each run once, followed by a 0.5 voxel Gaussian blur of cos and a 0.04 cos offset. The offset was fitted on training crops. Each file is a dict with `config`, `steps` and `state_dict`. It loads with `torch.load(path, weights_only=True)`.
|
| 28 |
+
|
| 29 |
+
## Run it
|
| 30 |
+
|
| 31 |
+
The code is in [ChaseHendrick/Scrolls](https://github.com/ChaseHendrick/Scrolls) under `scripts/lasagnetta/` (Apache-2.0). Its guide is [docs/tools/lasagnetta.md](https://github.com/ChaseHendrick/Scrolls/blob/main/docs/tools/lasagnetta.md).
|
| 32 |
+
|
| 33 |
+
```bash
|
| 34 |
+
git clone https://github.com/ChaseHendrick/Scrolls && cd Scrolls
|
| 35 |
+
pip install torch numpy numcodecs huggingface_hub
|
| 36 |
+
python scripts/lasagnetta/preview.py --checkpoint release \
|
| 37 |
+
--ct s3://vesuvius-challenge-open-data/PHerc0139/volumes/20260102150214-2.399um-0.2m-78keV-masked.zarr/2 \
|
| 38 |
+
--region 9472 9984 3072 3584 4096 4608 --input-level 2 --out out --name PHerc0139 --self-check
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
`--checkpoint release` downloads these files and sets the recipe. With `--self-check`, villa's net (it needs a villa checkout, `LASAGNETTA_VILLA=/path/to/villa/lasagna`) first runs on 12 spots of the region and the preview is scored against it. When the median peak F1 is under 0.82, the command writes no field and exits 3, so you can run villa's `predict3d` instead.
|
| 42 |
+
|
| 43 |
+
## How well it agrees with villa
|
| 44 |
+
|
| 45 |
+
Agreement was measured with villa's net as the reference, never against truth, on 256³ crops of scans no student had trained on. The measures are cos r (Pearson), peak F1 (sheet crossings matched within one cos voxel), the median normal angle and grad_mag r. The bars, fixed before each test, were 0.80, 0.80, 12° and 0.70, pooled and on every scan.
|
| 46 |
+
|
| 47 |
+
| Test (25 Oct 2026) | Model | Pooled cos r / peak F1 / normal / grad r | Peak F1 per scan | Speed (end to end) | Verdict |
|
| 48 |
+
| --- | --- | --- | --- | --- | --- |
|
| 49 |
+
| Second | `l32n` alone, blur 0.5 | 0.864 / 0.811 / 4.0° / 0.796 | PHerc0175A 0.863, 0175B 0.759, 0306B 0.828, 0846A 0.824, 0846B 0.809 | 6.9x | FAIL (PHerc0175B) |
|
| 50 |
+
| Third | this release | 0.910 / 0.855 / 3.1° / 0.877 | PHerc0009B 0.849, 0172 0.852, 0500P2 0.861, MAN5 0.774, MANB 0.870 | 3.9x | FAIL (PHercMAN5) |
|
| 51 |
+
|
| 52 |
+
Each test had 30 crops per scan. Both had a control, the maps shifted by 3 cos voxels, and it failed as it should (third test: cos r 0.07, peak F1 0.16). Speed was measured on one RTX Pro 6000: on a 1024 × 2048 × 2048 region of PHerc0172, villa `predict3d` (tile 192) took 235.2 s and the release took 59.6 s.
|
| 53 |
+
|
| 54 |
+
The self-check was run on whole volumes, two seeds each, after the third test. It sent PHerc0175B, PHercMAN5, PHerc0846B and PHerc0172 to villa. It kept Lasagnetta on PHerc0800, 1545, 0814, 0175A, 0306B, 0846A, 0009B and MANB, where the median peak F1 over its spots was 0.82 to 0.90. Each check took about 50 s on that GPU. Two of the three students had trained on PHerc0175A, 0306B and 0846A, so those three volumes say little about unseen scans.
|
| 55 |
+
|
| 56 |
+
## Training
|
| 57 |
+
|
| 58 |
+
The students were trained only on villa lasagna fields: the published fields in the Vesuvius Challenge open data, plus fields made with villa's own lasagna for scans that had none. They read level 0 of the 8 to 9.4 µm scans and level 2 of the 2.4 µm scans. `l32n` trained on 23 open-data scans. `xl` and `w24` trained on 27, which included four of the second test's five scans; the fifth, PHerc0175B, was used for development. PHerc0800, 1545 and 0814 were also development scans, and PHercParis4 was left out. No student had seen any scan of its own test.
|
| 59 |
+
|
| 60 |
+
## License and credit
|
| 61 |
+
|
| 62 |
+
The weights are CC BY-NC 4.0, the license of the scans they derive from. The teacher model and its code are villa's lasagna (MIT), and credit goes to its authors. The scans come from the [Vesuvius Challenge open data](https://scrollprize.org/data). This is an experimental release by Chase Hendrick.
|
lasagnetta-l32n.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ea9d7980d400338490cc936569ffbaca0043f4faae3a71999249b8eadb4e662b
|
| 3 |
+
size 41696023
|
lasagnetta-w24.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ebb10e109b95e63a64a560c79f0c130b2b71bc81c43b651d8f3594e561d43b52
|
| 3 |
+
size 91844919
|
lasagnetta-xl.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d521c052a4089443fce53cde0c0b356c53d2cab6ea15351853eff19d8fd05e2b
|
| 3 |
+
size 100731501
|