DISTS-Sq Smoke Checkpoint¶
dists_sq_placeholder_v0 is a tiny-AI smoke checkpoint for the dists_sq full-reference extractor. It locks the DISTS host ABI and lets libvmaf test the two-input ONNX path while the real Ding et al. weights are tracked separately as T7-DISTS-followup.
Model¶
| Field | Value |
|---|---|
| Registry id | dists_sq_placeholder_v0 |
| File | model/tiny/dists_sq.onnx |
| Sidecar | model/tiny/dists_sq.json |
| SHA-256 | ec8433e8c7c6a33ef3032a6e4538833e0bbb59de9f088054bbcb3be0e371ee55 |
| ONNX opset | 17 |
| License | BSD-2-Clause-Patent |
| Generator | ai/scripts/gen_dists_sq_placeholder_onnx.py |
Contract¶
Inputs:
| Name | Type | Shape | Meaning |
|---|---|---|---|
ref | float32 | [1, 3, H, W] | ImageNet-normalised RGB reference frame |
dist | float32 | [1, 3, H, W] | ImageNet-normalised RGB distorted frame |
Output:
| Name | Type | Shape | Meaning |
|---|---|---|---|
score | float32 | scalar | Mean squared distance between ref and dist tensors |
The extractor publishes the scalar as the per-frame dists_sq feature. The host side accepts planar YUV 4:2:0 / 4:2:2 / 4:4:4 at 8, 10, 12, or 16 bpc and normalises high-bit-depth samples into the same RGB8 tensor contract before ImageNet normalisation.
Training and evaluation¶
None. The weights are generated by the script above, not trained, and no quality evaluation exists: the graph computes a plain mean squared distance, so any PLCC/SROCC against subjective scores would not describe DISTS. The registry entry sets "smoke": true for this reason.
Run it¶
dists_sq is a feature extractor (needs libvmaf built with -Denable_dnn=enabled). The option model_path selects the model; without it the extractor reads VMAF_DISTS_SQ_MODEL_PATH:
vmaf --reference ref.yuv --distorted dis.yuv --width 576 --height 324 \
--pixel_format 420 --bitdepth 8 \
--feature dists_sq=model_path=model/tiny/dists_sq.onnx --output score.json
The per-frame dists_sq metric appears in the JSON output. Loading a path that contains dists_sq.onnx or placeholder logs a warning that the weights are synthetic.
Intended Use¶
Use this checkpoint for build, packaging, registry, and smoke-test coverage of the dists_sq extractor. It proves that model lookup, named two-input binding, dynamic image dimensions, and scalar output collection work through the tiny-AI runtime.
Do not use this checkpoint for perceptual-quality decisions. It is not a trained DISTS model and intentionally sets "smoke": true in model/tiny/registry.json.
Regeneration¶
.venv/bin/python ai/scripts/gen_dists_sq_placeholder_onnx.py # rewrite model/tiny/dists_sq.onnx
.venv/bin/python ai/scripts/gen_dists_sq_placeholder_onnx.py --check # exit 1 if the file differs
The generator writes the ONNX file only; the sidecar JSON and the registry entry are committed files. The output is byte-identical to the shipped file on every onnx version that serialises the graph the same way, so --check is the test that the registry's SHA-256 still describes what the script builds. After a change, update the SHA-256 and re-run registry validation:
Limitations¶
The graph is Sub -> Mul -> ReduceMean; it contains no learned feature backbone and no DISTS texture/structure statistics. The production follow-up must replace the placeholder with upstream-derived DISTS-compatible weights, pin a new SHA-256, update this model card, and verify representative scores against an independent reference.