Skip to content

Tiny AI

Tiny AI is the part of VMAFx that runs small ONNX perceptual-quality models next to the classic VMAF SVM. A tiny model can replace or augment the SVM score (full-reference), score a clip without a reference, or filter frames before encoding. libvmaf stays C-only: models run through ONNX Runtime, and training lives in the Python package ai/.

Run a shipped model

You need a libvmaf build with ONNX Runtime (-Denable_dnn=enabled, or auto with ONNX Runtime found by pkg-config). --tiny-model takes the path of an .onnx file, not a registry id. Models ship under model/tiny/.

vmaf -r ref.yuv -d dis.yuv -w 576 -h 324 -p 420 -b 8 \
     --tiny-model model/tiny/vmaf_tiny_v2.onnx \
     --json -o scores.json

The tiny score is an ordinary per-frame feature in the output. It is named after the name field of the model's sidecar JSON, or vmaf_tiny_model when the sidecar has no name. Look for it in frames[].metrics and pooled_metrics next to vmaf. Full details, flags and caveats are in inference.md.

Note

Models that read libvmaf features (the vmaf_tiny_* and fr_regressor_* families) make the run compute them, and their scores appear once the run has read its last frame. The codec-aware fr_regressor_v2 and fr_regressor_v3 also need --tiny-codec and --tiny-crf (inference).

Status

The shipped models were trained against the vmaf_v0.6.1 teacher, and model/tiny/registry.json lists 26 entries, 13 of them smoke fixtures that exercise the loader and are not quality models. The one-shot retrain against the vmaf_v1.0.16_3d0h teacher is RC9 work, see the roadmap and the retrain runbook. Treat accuracy numbers as pre-retrain.

Start here

Page What you get
Overview The four capabilities, architecture and the shipped model per capability
Inference Run a model from the CLI, the C API or ffmpeg; device selection
Training Train, export and register a model with vmaf-train
Security Operator allowlist, size and path limits, Sigstore verification
Model registry Registry schema, sidecar fields, runtime verification
Roadmap Status of every tiny-AI item (shipped, planned, deferred)
vmaf-train CLI Reference for every vmaf-train subcommand

Models

Page What you get
Predictor Per-codec ONNX predictors used by vmaf-tune
Predictor v2 real-corpus training Ship gate and runbook for the real-corpus predictor retrain
Conformal VQA Distribution-free prediction intervals on top of any predictor (split conformal and CV+, ADR-0393)
FR-from-NR adapter Use an NR model where an FR score is expected
Hardware capability priors Per-architecture capability vectors for predictors
U2NetP mirror Hosting and licensing of the U2NetP saliency checkpoint
Extractor template Add a tiny-AI feature extractor in C

Model cards

One page per shipped checkpoint. Overview groups them by capability.

Group Cards
VMAF fusion (C1) vmaf_tiny_v2, vmaf_tiny_v3, vmaf_tiny_v4, vmaf_tiny_v1, vmaf_tiny_v1_medium
FR regressors (C1) fr_regressor_v1, fr_regressor_v2, fr_regressor_v2 codec-aware, fr_regressor_v2 probabilistic, fr_regressor_v3
No-reference (C2) nr_metric_v1, konvid_mos_head_v1
Filters (C3) learned_filter_v1, fastdvdnet_pre
Perceptual distance lpips_sq, lpips_sq_v1, dists_sq
Saliency and shots saliency_student_v1, saliency_student_v2, mobilesal, u2netp_mirror, transnet_v2
CI smoke fixtures smoke_v0, smoke_v0_symbolic_batch, smoke_fp16_v0, smoke_multi_output_v0

Quantisation

Page What you get
Quantisation Produce and load int8 models (PTQ, QAT), gates and wire formats
PTQ across execution providers Measured int8 PLCC drop on CPU, CUDA and OpenVINO

Data and corpora

Page What you get
Training data Local Netflix corpus layout and loaders
MOS corpora Index of the MOS corpora, adapters and the KonViD MOS head
Multi-corpus aggregation Merge corpora onto one MOS scale
MOS label materializer Join subjective labels onto feature tables
Saliency feature materializer Add saliency columns to feature tables
Second-opinion features Join out-of-tree scorer outputs into feature tables
Signal-mix audit Coverage, redundancy and blind-spot reports for feature tables
Run provenance The run_provenance block and which script writes which report
Environment variables Variables read by the ai/ scripts

Corpus ingestion

Page Corpus
KonViD-1k KonViD-1k to MOS-corpus JSONL
KonViD-150k KonViD-150k to MOS-corpus JSONL
K150K-A feature extraction KonViD-150k-A feature extraction
LSVQ LSVQ to MOS-corpus JSONL
YouTube UGC YouTube UGC to MOS-corpus JSONL
Waterloo IVC 4K-VQA Waterloo IVC 4K-VQA to MOS-corpus JSONL
LIVE-VQC LIVE-VQC ingestion
CHUG UGC-HDR Local-only CHUG HDR ingestion
BVI-DVC BVI-DVC ingestion for fr_regressor_v2

Evaluation

Page What you get
Benchmarks Accuracy snapshot of shipped models and how to measure
LOSO evaluation Leave-one-source-out harness for the tiny MLP family
Bisect model quality Find the first checkpoint that regresses (also a nightly CI gate)
External benchmark wrappers Compare fork predictors with x264-pVMAF and DOVER-Mobile
CHUG HDR held-out validator Gate for the CHUG HDR MOS head
Saliency per-block evaluation Block-level IoU for saliency masks

Retraining and operations

Page What you get
v1.0.16 teacher retrain runbook The one-shot retrain (epic #1246)
Ensemble v2 real-corpus runbook Promote or hold the ensemble weights
Ensemble training kit Portable scripts to run the ensemble pipeline on another machine
Local sidecar training Per-host residual correction for vmaf-tune predictors
Online sidecar training Streaming trainer service (not wired into a deployment yet)
Tiny blob storage Where model blobs live and how the fetcher works
Per-PR documentation bar What a tiny-AI PR must document