Add v4 candidate encoder docs (README + meta)
Browse filesNot shipped: describes the 32.0M v4 student DINO encoder and its held-out scores.
- encoders/v4/README.md +45 -0
- encoders/v4/encoder_meta.json +77 -0
encoders/v4/README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# v4 candidate student DINO encoder (not shipped)
|
| 2 |
+
|
| 3 |
+
`dino_student.onnx` is the **v4** candidate condition encoder for the in-browser
|
| 4 |
+
image-to-3DGS pipeline. It is *not* the default encoder on the live site: the site still
|
| 5 |
+
runs v1 (`/dino_student.onnx` at the repo root, 19.38M params). Nothing here changes
|
| 6 |
+
`dit.int4.onnx`, the decoder, or the VAE/matting students.
|
| 7 |
+
|
| 8 |
+
| file | bytes | sha256 |
|
| 9 |
+
|---|---|---|
|
| 10 |
+
| `dino_student.onnx` | 128,044,411 | `9793f4a8cc10a380ab844d1e162fc9cbd16f8dd39c9cc84748d51b9a4d38bb20` |
|
| 11 |
+
| `best_h32ts.pt` | 128,004,627 | `07a296b4bd2e92fa10601f60e83b8357ba64330b1a926b0fca986fbe9da13b58` |
|
| 12 |
+
|
| 13 |
+
## What it is
|
| 14 |
+
|
| 15 |
+
32.0M-param `DinoHybridStudent(dim=512, depth=8, heads=8, axial=4)` distilled against the
|
| 16 |
+
teacher ViT-H/16+reg DINOv3 (`f1` = 4,101 tokens x 1280, cosine on the token grid).
|
| 17 |
+
Started from the v3 weights and continued on 5,648 images: v3's 5,544-image corpus plus
|
| 18 |
+
104 new real photos, 6 epochs, best round chosen on the clean probe split (epoch 5, score 0.9159).
|
| 19 |
+
|
| 20 |
+
Input/output are identical to the shipped v1 encoder (`1x3x1024x1024` uint8-scaled RGB canvas
|
| 21 |
+
-> `1x4101x1280` fp16), so `encoders/v4/dino_student.onnx` can replace the site encoder without
|
| 22 |
+
any pipeline change. Preprocessing stays as in `encoder_meta.json`: cut-out composited on a
|
| 23 |
+
1024x1024 canvas, RGB / 255.
|
| 24 |
+
|
| 25 |
+
## Held-out scores (f1 cosine vs teacher, mean over photos)
|
| 26 |
+
|
| 27 |
+
| set | n | v1 shipped | v2 | v3 | v4 |
|
| 28 |
+
|---|---|---|---|---|---|
|
| 29 |
+
| 30 unseen probe photos | 30 | 0.8112 | 0.8904 | 0.9085 | **0.9114** |
|
| 30 |
+
| 104 photos used by v4 training | 104 | 0.8133 | 0.8876 | 0.9078 | 0.9277 |
|
| 31 |
+
| original hf holdout (never seen by anyone) | 24 | 0.8019 | 0.8667 | 0.8910 | **0.8931** |
|
| 32 |
+
|
| 33 |
+
Foreground-masked tokens on the 30 probes: v3 0.7391 -> v4 0.7471.
|
| 34 |
+
|
| 35 |
+
The probe split is the clean generalisation estimate: those 30 photos were stratified by v3 `f1`
|
| 36 |
+
and excluded from v4 training on purpose. v4 gains +0.29 pt there and +0.21 pt on the hf holdout,
|
| 37 |
+
so the +2.0 pt on the 104 training photos is mostly memorisation and the real gain is small.
|
| 38 |
+
Target for shipping is f1 >= 0.95, so v4 is **still below gate** and remains unshipped.
|
| 39 |
+
|
| 40 |
+
## Reproduce
|
| 41 |
+
|
| 42 |
+
Exported from `best_h32ts.pt` with the same opset/graph rewrite as v1-v3; verify by running the
|
| 43 |
+
QC portal batch (`metrics.json` rows carry `v4.f1`, `v4.fg`, `v4.lat_e2e`, `v4.lat_iso` for all
|
| 44 |
+
54 photos, with e2e latent cosine against the teacher condition measured through the shared
|
| 45 |
+
4-step int4 student DiT and decoder).
|
encoders/v4/encoder_meta.json
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"files": {
|
| 3 |
+
"dino": "dino_student.onnx",
|
| 4 |
+
"vae": "vae_student.onnx",
|
| 5 |
+
"matte": "matte_student.onnx"
|
| 6 |
+
},
|
| 7 |
+
"shapes": {
|
| 8 |
+
"dino": {
|
| 9 |
+
"input": [
|
| 10 |
+
1,
|
| 11 |
+
3,
|
| 12 |
+
1024,
|
| 13 |
+
1024
|
| 14 |
+
],
|
| 15 |
+
"output": [
|
| 16 |
+
1,
|
| 17 |
+
4101,
|
| 18 |
+
1280
|
| 19 |
+
]
|
| 20 |
+
},
|
| 21 |
+
"vae": {
|
| 22 |
+
"input": [
|
| 23 |
+
1,
|
| 24 |
+
3,
|
| 25 |
+
1024,
|
| 26 |
+
1024
|
| 27 |
+
],
|
| 28 |
+
"output": [
|
| 29 |
+
1,
|
| 30 |
+
4096,
|
| 31 |
+
128
|
| 32 |
+
]
|
| 33 |
+
},
|
| 34 |
+
"matte": {
|
| 35 |
+
"input": [
|
| 36 |
+
1,
|
| 37 |
+
3,
|
| 38 |
+
"h",
|
| 39 |
+
"w"
|
| 40 |
+
],
|
| 41 |
+
"output": [
|
| 42 |
+
1,
|
| 43 |
+
1,
|
| 44 |
+
"h",
|
| 45 |
+
"w"
|
| 46 |
+
]
|
| 47 |
+
}
|
| 48 |
+
},
|
| 49 |
+
"params": {
|
| 50 |
+
"dino": 32.0,
|
| 51 |
+
"vae": 7.83,
|
| 52 |
+
"matte": 2.76
|
| 53 |
+
},
|
| 54 |
+
"preprocess": {
|
| 55 |
+
"resize": "shortest side 1024, dims rounded to /32",
|
| 56 |
+
"matte_input": "rgb / 255",
|
| 57 |
+
"dino_input": "canvas rgb / 255",
|
| 58 |
+
"vae_input": "canvas rgb / 255 * 2 - 1",
|
| 59 |
+
"canonical": 1024
|
| 60 |
+
},
|
| 61 |
+
"tokens": {
|
| 62 |
+
"dino": 4101,
|
| 63 |
+
"vae": 4096
|
| 64 |
+
},
|
| 65 |
+
"student": {
|
| 66 |
+
"version": "v4",
|
| 67 |
+
"arch": "DinoHybridStudent(dim=512, depth=8, heads=8, axial=4)",
|
| 68 |
+
"init": "v3 (best_h32x5.pt, 5,544-image distillation set)",
|
| 69 |
+
"train_images": 5648,
|
| 70 |
+
"train_note": "5,544 from v3 + 104 new real photos; the 24 hf holdout photos and the 30 probe photos were never trained on",
|
| 71 |
+
"checkpoint": "best_h32ts.pt (epoch 5, probe score 0.9159)",
|
| 72 |
+
"dino_sha256": "9793f4a8cc10a380ab844d1e162fc9cbd16f8dd39c9cc84748d51b9a4d38bb20",
|
| 73 |
+
"dino_bytes": 128044411,
|
| 74 |
+
"teacher": "ViT-H/16+reg DINOv3, f1 = 4,101 tokens x 1280",
|
| 75 |
+
"note": "meta is otherwise identical to the shipped v1 encoder: same I/O shape (1x3x1024x1024 -> 1x4101x1280), so it drops into the site encoder slot unchanged"
|
| 76 |
+
}
|
| 77 |
+
}
|