Skip to content
JustJoyfulPublic

About

A reproducible no-reference video quality benchmark comparing ResNet-50/DINOv2 features, temporal architectures, and cross-dataset generalization.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

Testcard

Where does the quality signal live? Cached features versus temporal heads for no-reference video quality.

A controlled comparison of four temporal heads and a ridge baseline on frozen, cached backbone features for no-reference video quality assessment (NR-VQA). The models were trained on KoNViD-1k and tested on LIVE-VQC, and a small CPU demo scores an uploaded clip.

Try it without cloning. Anyone with Docker can run the exact gated demo image; no clone, Git LFS or build is needed:

docker run --rm -p 127.0.0.1:8001:8000 ghcr.io/justjoyful/testcard@sha256:cea6b009c05a18522c44889df72407a916b020cbec51086e859f4dcf9907b4ef

Then open http://127.0.0.1:8001/. The model checkpoint and its card are on Hugging Face: JustJoyful/testcard-r50-ridge.

The demo after scoring a clip from the real Docker build

TL;DR

  • Question. For NR-VQA on cached features, does the choice of temporal head (mean pooling, Bi-GRU, Transformer, Mamba) matter, or does the feature representation carry the signal?
  • Heads. On KoNViD-1k with ResNet-50 features, no head beats another by more than the margin, so the four heads tie. Of 6 head pairs, 2 showed a detectable difference not shown to exceed the ±0.01 SRCC margin, and 4 showed no detectable difference. Ridge regression on mean-pooled features was numerically above every neural head, without a practically meaningful margin.
  • Features. ResNet-50 beats the DINOv2 last-layer representation for 5 of 5 heads, by the paired bootstrap and the ±0.01 margin rule.
  • Layers (post-hoc, exploratory, unadjusted). Patch statistics from DINOv2 block 6 beat the ResNet-50 ridge (Δ SRCC +0.0592, 95% CI [+0.0406, +0.0787]). This was robust under a predeclared check with the ridge alpha grid extended to 1e6. The DINOv2 deficit was specific to the last layer used in the declared protocol.
  • Cross-dataset. Trained on KoNViD-1k and tested on LIVE-VQC, 6 of 6 head pairs show no detectable difference on LIVE-VQC. The deployed ridge reached SRCC 0.644 on LIVE-VQC.
  • SOTA. These cached-feature regressors sit below end-to-end trained models; published end-to-end models report KoNViD-1k SRCC up to 0.909 under their own protocols, against 0.780 here.

Contents

  1. Question
  2. Method
  3. Results: head comparison
  4. Results: feature ablation
  5. Results: cross-dataset (LIVE-VQC)
  6. Results: length extrapolation
  7. Post-hoc analysis: why DINOv2 lost to ResNet-50
  8. Gap to published SOTA
  9. Validity and audit trail
  10. Limitations
  11. Demo
  12. Quickstart and reproduction
  13. Repository layout
  14. Datasets and licenses
  15. Citation
  16. Acknowledgements

Question

No-reference video quality models predict a mean opinion score (MOS) from a video alone. Many recent models pair a pretrained image backbone with a temporal module, and papers often credit the temporal module, lately state-space (Mamba-style) layers, for their gains. When the backbone and the head change together, the contribution of each is hard to separate. This project froze the backbones, cached their per-frame features once, and compared heads under one fixed protocol. That way, head and feature effects could be measured separately and with confidence intervals.

The research questions were fixed before training:

  • RQ1. Does temporal ordering matter at all, comparing mean pooling with sequence models on the same features? Answered in the head comparison.
  • RQ2. Does Mamba beat Bi-GRU and Transformer within KoNViD-1k (5-fold cross-validation)? Answered in the head comparison.
  • RQ3. How much does the feature representation matter, comparing ResNet-50 with the fixed DINOv2 last-layer representation? Answered in the feature ablation, and extended by a post-hoc, exploratory, unadjusted layer analysis.
  • RQ4. Do the heads generalize from KoNViD-1k to LIVE-VQC? Answered in the cross-dataset results.
  • RQ5. Length extrapolation on YouTube-UGC. Not answered: cut from the 10-day scope (see length extrapolation).

Method

flowchart LR
    V[Video] --> D[Shared decoder<br/>src/preprocess.py]
    D --> S[Frames at fixed fps,<br/>resize and center crop]
    S --> B1[ResNet-50 pooled]
    S --> B2[DINOv2 ViT-B/14<br/>CLS + patch statistics]
    B1 --> C[(Feature cache<br/>fp16, checksummed)]
    B2 --> C
    C --> H1[Mean-pool MLP]
    C --> H2[Bi-GRU]
    C --> H3[Transformer]
    C --> H4[Mamba, bidirectional]
    C --> R[Ridge on mean-pooled features]
    H1 & H2 & H3 & H4 & R --> E[Out-of-fold predictions<br/>metrics and paired bootstrap]
Loading

Datasets. The table describes both datasets as recorded in the committed manifests. The T column is the sequence length the heads see.

Dataset Videos MOS scale Duration s, median [min–max] Most common resolution Sampled frames T, median [min–max] Role
KoNViD-1k 1200 1-5 8.0 [7.5–8.0] 960×540 (1200 of 1200) 33 [31–33] training, 5-fold CV
LIVE-VQC 585 0-100 10.0 [9.6–10.1] 1280×720 (316 of 585) 41 [39–41] cross-dataset test only

Preprocessing. Offline extraction and serving share one frozen policy (src/preprocess.py, src/features.py). The decoder applied rotation metadata and sampled frames at 4 fps. Each frame was resized (bicubic, antialiased), center-cropped to 448×448 and normalized with ImageNet statistics. Offline extraction ran with cuda_autocast_fp16; serving runs the same code in CPU fp32, and a parity check bounds the difference.

Features. The two backbones were ResNet-50 (torchvision IMAGENET1K_V2, global-pooled, 2048-d) and DINOv2 ViT-B/14. The declared DINOv2 representation was the last-layer CLS token plus the block-12 patch mean (1536-d). Patch means and standard deviations from blocks 6, 9 and 12 were also cached. Per the scope decision, they were not evaluated as separate variants until the post-hoc analysis.

Heads. Every neural head shares one front end (a linear projection with normalization) and differs only in its temporal module. Head-only trainable parameters were matched across heads; the table shows both counts. Every head masks padding, and bidirectional heads reverse each sequence within its valid length. A padding-invariance test covers every head.

Features Head Shared front end Head only Total trainable
ResNet-50 Mean-pool MLP 528,640 412,285 940,925
ResNet-50 Bi-GRU 528,640 407,601 936,241
ResNet-50 Transformer 528,640 412,289 940,929
ResNet-50 Mamba 528,640 410,837 939,477
DINOv2 Mean-pool MLP 396,544 412,285 808,829
DINOv2 Bi-GRU 396,544 407,601 804,145
DINOv2 Transformer 396,544 412,289 808,833
DINOv2 Mamba 396,544 410,837 807,381

The largest head-only count was 1.2% above the smallest.

Training and tuning.

  • Loss: L1 on z-scored MOS plus a pairwise rank term with one shared weight (0.1).
  • Tuning: done once, on fold 0 with its inner-validation split, and on the DINOv2 representation only. The rank weight was tuned first, with the mean-pool head, then 10 candidates per head. The frozen configurations were reused on ResNet-50 without re-tuning.
  • Training runs: each neural head ran 5 outer folds × 5 seeds, with early stopping on the inner-validation split (at most 200 epochs, patience 15).
  • Baseline 0: ridge regression on mean-pooled features ran once per fold, with alpha chosen on inner validation from {0.001, 0.01, 0.1, 1, 10, 100, 1000}.
  • Control: a shuffled-label control accompanied each pipeline (see validity).

Statistics.

  • Headline number: the mean and SD of per-fold SRCC across fold × seed runs. Ridge is deterministic, so for ridge it is the mean and SD across folds.
  • Comparisons: a paired bootstrap over videos (10,000 draws, seed 0) on pooled out-of-fold predictions, averaged across seeds. Each difference is classified against a ±0.01 SRCC margin, checking in this order: equivalent within margin; practically meaningful; detectable but not shown to exceed the margin; no detectable difference.
  • Families: the six head pairs form the primary family on each dataset, with Holm-adjusted p-values. All other comparisons are secondary and unadjusted.
  • What the intervals cover: the bootstrap captures test-set sampling noise only, not fold or training variance, so the intervals are optimistic. They describe the seed-averaged ensemble, not the headline mean.
  • PLCC: reported after a 4-parameter logistic fit, and never bootstrapped.

Results: head comparison

The head comparison used ResNet-50 features, chosen on inner-validation SRCC (see feature ablation). The table gives each head's headline accuracy. Read differences from the pairwise table below rather than by comparing rows.

Head SRCC PLCC (logistic-mapped) KRCC SD across
Mean-pool MLP 0.749 ± 0.029 0.769 ± 0.026 0.558 ± 0.028 25 fold × seed runs
Bi-GRU 0.753 ± 0.028 0.770 ± 0.023 0.563 ± 0.026 25 fold × seed runs
Transformer 0.760 ± 0.028 0.778 ± 0.022 0.570 ± 0.026 25 fold × seed runs
Mamba 0.754 ± 0.028 0.773 ± 0.023 0.564 ± 0.027 25 fold × seed runs
Ridge (Baseline 0) 0.780 ± 0.041 0.796 ± 0.031 0.589 ± 0.038 5 folds (one deterministic fit each)

The pairwise table classifies each A − B difference on pooled out-of-fold predictions; the ridge rows are secondary comparisons.

A − B Δ SRCC 95% CI Holm p Classification (±0.01)
Mean-pool MLP − Bi-GRU -0.0046 [-0.0145, +0.0052] 0.725 no detectable difference (inconclusive at this sample size)
Mean-pool MLP − Transformer -0.0098 [-0.0181, -0.0016] 0.102 detectable difference, not shown to exceed the margin
Mean-pool MLP − Mamba +0.0021 [-0.0058, +0.0100] 0.725 no detectable difference (inconclusive at this sample size)
Bi-GRU − Transformer -0.0052 [-0.0135, +0.0028] 0.633 no detectable difference (inconclusive at this sample size)
Bi-GRU − Mamba +0.0066 [-0.0024, +0.0155] 0.569 no detectable difference (inconclusive at this sample size)
Transformer − Mamba +0.0119 [+0.0039, +0.0201] 0.024 detectable difference, not shown to exceed the margin
Ridge (Baseline 0) − Mean-pool MLP +0.0145 [+0.0018, +0.0275] secondary, unadjusted detectable difference, not shown to exceed the margin
Ridge (Baseline 0) − Bi-GRU +0.0100 [-0.0039, +0.0245] secondary, unadjusted no detectable difference (inconclusive at this sample size)
Ridge (Baseline 0) − Transformer +0.0047 [-0.0073, +0.0173] secondary, unadjusted no detectable difference (inconclusive at this sample size)
Ridge (Baseline 0) − Mamba +0.0166 [+0.0029, +0.0308] secondary, unadjusted detectable difference, not shown to exceed the margin

Head-pair differences with 95% CIs

None of the 6 primary head pairs reached the practically meaningful category, and 0 were equivalent within the margin. The detectable differences were: Transformer higher than Mean-pool MLP, detectable but not shown to exceed the margin (Δ 0.0098); Transformer higher than Mamba, detectable but not shown to exceed the margin (Δ 0.0119). The remaining 4 pairs showed no detectable difference. So the sequence heads did not beat mean pooling by more than the margin (RQ1), and Mamba did not beat the Bi-GRU or the Transformer by more than the margin (RQ2). Ridge was numerically higher than every neural head; the difference was detectable but not shown to exceed the margin for 2 of 4 heads, and not detectable for the others. On these cached features, temporal modelling added nothing measurable over mean pooling, and no trained head beat a linear model on pooled features.

Results: feature ablation

Feature selection used inner-validation SRCC: the mean was 0.7158 for DINOv2 and 0.7636 for ResNet-50, so ResNet-50 was selected. The inner-validation videos came from the same KoNViD-1k videos as the head comparison. Each fold validated on 144 videos (720 validation rows across folds). In total, 591 of 1200 videos (49.2%) were used for inner-validation selection while also being held-out test videos in another fold (inner_val_overlap.json). The selection never used held-out scores, but it did use the same videos.

The table compares each head on the two feature sets; the classification column gives the effect of the features alone.

Head DINOv2 SRCC ResNet-50 SRCC Δ (DINOv2 − ResNet-50) 95% CI Classification
Mean-pool MLP 0.685 ± 0.026 0.749 ± 0.029 -0.0610 [-0.0884, -0.0336] B better than A (practically meaningful)
Bi-GRU 0.689 ± 0.022 0.753 ± 0.028 -0.0602 [-0.0881, -0.0316] B better than A (practically meaningful)
Transformer 0.693 ± 0.023 0.760 ± 0.028 -0.0611 [-0.0879, -0.0338] B better than A (practically meaningful)
Mamba 0.689 ± 0.033 0.754 ± 0.028 -0.0549 [-0.0815, -0.0280] B better than A (practically meaningful)
Ridge (Baseline 0) 0.735 ± 0.022 0.780 ± 0.041 -0.0437 [-0.0697, -0.0178] B better than A (practically meaningful)

Per-fold SRCC by head and feature set

ResNet-50 beats the DINOv2 last-layer representation for 5 of 5 heads, by a larger margin than any head difference: the representation mattered much more than the temporal head. A DINOv2 layer comparison was not part of the predeclared protocol. It is reported separately in the post-hoc analysis and labelled post-hoc, exploratory and unadjusted.

Results: cross-dataset (LIVE-VQC)

After the KoNViD configuration was frozen, every model was refit on all of KoNViD-1k and evaluated once on all 585 LIVE-VQC videos. SRCC and KRCC are computed on raw predictions; PLCC is computed after a 4-parameter logistic fit to the LIVE-VQC labels. Neural rows are means over seeds, and ridge rows are single deterministic fits.

Features Head Analysis Fits SRCC KRCC PLCC (logistic-mapped)
ResNet-50 Mean-pool MLP primary 5 seeds 0.631 ± 0.020 0.453 ± 0.017 0.704 ± 0.014
ResNet-50 Bi-GRU primary 5 seeds 0.624 ± 0.017 0.446 ± 0.014 0.687 ± 0.009
ResNet-50 Transformer primary 5 seeds 0.622 ± 0.024 0.444 ± 0.019 0.697 ± 0.008
ResNet-50 Mamba primary 5 seeds 0.625 ± 0.023 0.446 ± 0.019 0.694 ± 0.014
ResNet-50 Ridge (Baseline 0) secondary single deterministic fit 0.644 0.460 0.706
DINOv2 (last layer) Mean-pool MLP secondary 5 seeds 0.609 ± 0.006 0.436 ± 0.005 0.710 ± 0.006
DINOv2 (last layer) Bi-GRU secondary 5 seeds 0.579 ± 0.037 0.410 ± 0.030 0.701 ± 0.020
DINOv2 (last layer) Transformer secondary 5 seeds 0.608 ± 0.014 0.436 ± 0.011 0.716 ± 0.007
DINOv2 (last layer) Mamba secondary 5 seeds 0.591 ± 0.013 0.422 ± 0.009 0.701 ± 0.004
DINOv2 (last layer) Ridge (Baseline 0) secondary single deterministic fit 0.658 0.476 0.743

The primary family compares the ResNet-50 heads on LIVE-VQC; read it like the KoNViD pairwise table.

A − B Δ SRCC 95% CI Holm p Classification
Mean-pool MLP − Bi-GRU +0.0016 [-0.0224, +0.0258] 1.000 no detectable difference (inconclusive at this sample size)
Mean-pool MLP − Transformer +0.0059 [-0.0137, +0.0256] 1.000 no detectable difference (inconclusive at this sample size)
Mean-pool MLP − Mamba +0.0050 [-0.0107, +0.0207] 1.000 no detectable difference (inconclusive at this sample size)
Bi-GRU − Transformer +0.0043 [-0.0138, +0.0214] 1.000 no detectable difference (inconclusive at this sample size)
Bi-GRU − Mamba +0.0034 [-0.0203, +0.0267] 1.000 no detectable difference (inconclusive at this sample size)
Transformer − Mamba -0.0009 [-0.0187, +0.0160] 1.000 no detectable difference (inconclusive at this sample size)

On LIVE-VQC, 6 of 6 head pairs show no detectable difference on LIVE-VQC, so the head conclusions carried over. Accuracy fell from KoNViD-1k to LIVE-VQC: the deployed ridge scored 0.780 mean per-fold SRCC within KoNViD-1k and 0.644 SRCC on LIVE-VQC (PLCC 0.706 after mapping). These are different quantities: a cross-validation mean and a single transfer evaluation. The model fell short because LIVE-VQC has more varied devices, more portrait video and longer sampled sequences. The center crop also discards more of each portrait frame.

Results: length extrapolation

Not done. YouTube-UGC, and with it RQ5 (length extrapolation), was cut from the 10-day scope; see the scope entries in DECISIONS.md. No length-generalization claim is made.

Post-hoc analysis: why DINOv2 lost to ResNet-50

Everything in this section is post-hoc, exploratory and unadjusted, chosen after the Phase 1–3 results were known. Both parts were predeclared in DECISIONS.md before any computation: the layer analysis in commit cc19a24 and the alpha-grid follow-up in commit 72c5eaa. Nothing here changed the deployed model or any phase result, because choosing a model from these held-out results would be test-set selection.

Part A (post-hoc, exploratory, unadjusted). Five DINOv2 variants were fitted with the Phase 1/2 ridge protocol. Variant A0 reproduced the original DINOv2 ridge in every fold (maximum absolute SRCC difference 0), so the comparison is like-for-like. The table shows the five variants under the original alpha grid.

Variant SRCC mean ± SD (5 folds) Folds at the original grid edge
A0 0.735 ± 0.022 5
L6 0.824 ± 0.016 5
L9 0.786 ± 0.015 5
L12 0.721 ± 0.015 5
ALL 0.824 ± 0.014 5

In Part A, 25 of 25 variant-folds chose the top of the original alpha grid. That left open whether every DINOv2 ridge, including the original, was under-regularized.

Alpha-grid follow-up (post-hoc, exploratory, unadjusted). All variants and the ResNet-50 ridge were refit with the grid extended to 0.001, 0.01, 0.1, 1, 10, 100, 1000, 10000, 100000, 1e+06. The table shows the mean ± SD over five folds and each fold's chosen alpha.

Row SRCC mean ± SD KRCC mean ± SD Alphas by fold Folds at 1e6
A0 0.733 ± 0.025 0.546 ± 0.020 1000 1000 1000 10000 1000 0
L6 0.824 ± 0.016 0.636 ± 0.015 1000 1000 1000 1000 1000 0
L9 0.786 ± 0.015 0.596 ± 0.011 1000 1000 1000 1000 1000 0
L12 0.708 ± 0.017 0.523 ± 0.017 1000 10000 1000 1000 1000 0
ALL 0.820 ± 0.008 0.632 ± 0.007 1000 10000 1000 1000 1000 0
ResNet-50 0.771 ± 0.032 0.580 ± 0.030 1000 10000 1000 1000 1000 0

Post-hoc DINOv2 layer comparison

The predeclared robustness rule had two conditions: the L6 − ResNet-50 SRCC interval must exclude zero, and no row may choose the largest grid value in more than one of five folds.

  • L6 − ResNet-50 was +0.0592 (95% CI [+0.0406, +0.0787], A better than B (practically meaningful)).
  • The most folds any row placed at 1e6 was 0.

So the L6 finding was robust (post-hoc, exploratory, unadjusted). The original Phase 2 ResNet-50 ridge had also chosen the edge of the original grid in 5 of 5 folds. On LIVE-VQC (post-hoc, exploratory, unadjusted, never fed back), L6 scored SRCC 0.727, ALL scored 0.737, and the extended-grid ResNet-50 ridge scored 0.644.

Part B, descriptive only (post-hoc, exploratory, unadjusted). Frames were blurred, noised and JPEG-compressed, and each branch's feature change was measured relative to the variation between clean frames:

  • ResNet-50 reacted most (mean ratio 0.259).
  • DINOv2 block-6 patch means reacted less (0.164).
  • Block-12 patch means reacted least (0.062).

ResNet-50 is the most distortion-sensitive, yet it loses to L6, so raw sensitivity is not the mechanism. The evidence from Part B is mixed.

Reading (post-hoc, exploratory, unadjusted). Quality information carried by the earlier DINOv2 layers was largely lost by the last layer, which is the only layer the original protocol used. The feature-ablation conclusion therefore holds for the declared DINOv2 representation, not for DINOv2 in general. Limitations: several variants and unadjusted comparisons, a follow-up chosen after seeing the grid-edge result, and intervals that cover test-set noise only. Full reports: layer analysis and alpha-grid follow-up.

Gap to published SOTA

Published numbers come only from the original papers, with their split and protocol, as listed in results/sota_citations.csv.

Model Dataset Protocol Metric Value Source
FAST-VQA KoNViD-1k trained end-to-end on LSVQ train; evaluated cross-dataset on the full target set (no target training) SRCC 0.859 Table 3, p. 9
FAST-VQA KoNViD-1k trained end-to-end on LSVQ train; evaluated cross-dataset on the full target set (no target training) PLCC 0.855 Table 3, p. 9
FAST-VQA LIVE-VQC trained end-to-end on LSVQ train; evaluated cross-dataset on the full target set (no target training) SRCC 0.823 Table 3, p. 9
FAST-VQA LIVE-VQC trained end-to-end on LSVQ train; evaluated cross-dataset on the full target set (no target training) PLCC 0.844 Table 3, p. 9
FAST-VQA KoNViD-1k pretrained on LSVQ; fine-tuned end-to-end on the target; average over 10 random train/test splits SRCC 0.891 Table 5, p. 11
FAST-VQA KoNViD-1k pretrained on LSVQ; fine-tuned end-to-end on the target; average over 10 random train/test splits PLCC 0.892 Table 5, p. 11
FAST-VQA LIVE-VQC pretrained on LSVQ; fine-tuned end-to-end on the target; average over 10 random train/test splits SRCC 0.849 Table 5, p. 11
FAST-VQA LIVE-VQC pretrained on LSVQ; fine-tuned end-to-end on the target; average over 10 random train/test splits PLCC 0.865 Table 5, p. 11
DOVER KoNViD-1k trained end-to-end on LSVQ train; evaluated cross-dataset on the full target set (no target training) SRCC 0.884 Table 4, p. 7
DOVER KoNViD-1k trained end-to-end on LSVQ train; evaluated cross-dataset on the full target set (no target training) PLCC 0.883 Table 4, p. 7
DOVER LIVE-VQC trained end-to-end on LSVQ train; evaluated cross-dataset on the full target set (no target training) SRCC 0.832 Table 4, p. 7
DOVER LIVE-VQC trained end-to-end on LSVQ train; evaluated cross-dataset on the full target set (no target training) PLCC 0.855 Table 4, p. 7
DOVER KoNViD-1k pretrained on LSVQ; fine-tuned end-to-end on the target; average over 10 random train/test splits SRCC 0.909 Table 5, p. 7
DOVER KoNViD-1k pretrained on LSVQ; fine-tuned end-to-end on the target; average over 10 random train/test splits PLCC 0.906 Table 5, p. 7
DOVER LIVE-VQC pretrained on LSVQ; fine-tuned end-to-end on the target; average over 10 random train/test splits SRCC 0.860 Table 5, p. 7
DOVER LIVE-VQC pretrained on LSVQ; fine-tuned end-to-end on the target; average over 10 random train/test splits PLCC 0.875 Table 5, p. 7

The published protocols differ from this project's: 5-fold cross-validation within KoNViD-1k, plus a single KoNViD→LIVE-VQC transfer. The comparison is therefore indicative rather than paired. There are four reasons for the gap:

  • Training data: the published models train end-to-end on the large LSVQ dataset, while this project regresses on frozen, cached features using KoNViD-1k alone.
  • Resolution: they sample fragments at native resolution, while this project resizes and center-crops, which removes edges and fine texture.
  • Temporal sampling: their temporal sampling and clip handling differ.
  • Model capacity: their backbones are video-specific and larger in effective capacity than a frozen image backbone with a small head.

Validity and audit trail

  • Shuffled-label control. In Phase 3 the shuffled-label control failed its predeclared rule, which requires its SRCC CI to include zero and |SRCC| to be below 0.15. The fixed-epoch neural ensemble scored SRCC -0.156. That result stands: the Phase 3 gate is passed with qualification, with control status failed.
  • Audits. Two audits of the label path found no mechanism that could carry held-out labels into training or selection (audit, independent audit).
  • Post-hoc permutation test. A matched neural permutation null used the control's own procedure: 200 permutations × 5 models. It gave a central 95% interval of [-0.234, +0.158], and the predeclared reading was "consistent with chance under the control’s own procedure" (report). A ridge surrogate with 1000 permutations gave [-0.183, +0.168] (report). This post-hoc evidence is weaker than a predeclared pass, and consistency with chance does not prove that no leak of any kind exists.
  • Decision log. DECISIONS.md records every plan change with a date. The post-hoc pre-declarations are hash-pinned appends, and src/serving_bundle.py rejects any unrecorded edit to the log.
  • Gates. Each phase wrote a gate, recomputed from saved outputs and written last. The Phase 4b gate is passed for image sha256:cea6b009c05a. It binds parity on 20 videos, latency, tests and accessibility (report).

Limitations

  • Training used one dataset, KoNViD-1k, and LIVE-VQC is the only out-of-dataset test.
  • The center crop loses frame edges, and it removes more of each portrait LIVE-VQC frame than of a landscape one.
  • Configurations were tuned on the DINOv2 representation and reused on ResNet-50 without re-tuning.
  • Bootstrap intervals capture test-set noise only, so they are optimistic.
  • Inner-validation selection used 591 of 1200 KoNViD videos that are also held-out test videos in other folds.
  • The DINOv2 layer analysis and the alpha-grid follow-up are post-hoc, exploratory and unadjusted.
  • The deployed model is a single deterministic ridge fit, so its intervals reflect test-set sampling only, with no seed variation.
  • The Phase 3 shuffled-label control failed its predeclared rule, as described above.
  • Some work was not done, by scope decision: YouTube-UGC and length extrapolation (RQ5), motion (SlowFast) features, cloud extraction, features at 8 fps, and per-second quality scores. Any per-frame score would be weakly supervised, because the datasets have only video-level MOS, and the demo shows none.

Demo

The demo is a single-page app served by one FastAPI process from one Docker image. You insert a video "tape"; the page uploads it, polls the job and shows the predicted MOS on a TV screen. The score is rounded to two decimals and unclamped, on the KoNViD 1–5 scale. Below the score the page shows the analysis time, the verified model, weights and preprocessing hashes, and the full JSON result. The server processes one upload at a time and deletes the video after scoring, and the page makes no external requests. All 9 frontend acceptance items passed (acceptance).

Deployed model. testcard-r50-ridge (recorded in results as resnet50/ridge; checkpoint and model card on Hugging Face): ResNet-50 features and ridge regression with alpha 1000, fitted once on all of KoNViD-1k. It is a single deterministic fit, with no seed and no fold. The hashes below are truncated; the full values are in results/phase3/deployment.json, and the API logs them at startup.

Artifact SHA256 (prefix)
Ridge checkpoint 4c9782aefca4…
ResNet-50 weights 11ad3fa62ca7…
Preprocessing freeze acc2e85da8cc…

CPU latency. The table gives per-video latency on 20 committed KoNViD clips with 4 threads, on the host; extraction includes decoding, preprocessing and the backbone (latency.md).

Features Head Extraction s, median [IQR] Head ms, median Total s per 10 s of video
ResNet-50 Ridge (Baseline 0) (deployed) 5.25 [5.06–5.40] 0.114 6.56
ResNet-50 Mean-pool MLP 5.25 [5.06–5.40] 0.576 6.56
ResNet-50 Bi-GRU 5.25 [5.06–5.40] 1.332 6.56
ResNet-50 Transformer 5.25 [5.06–5.40] 0.729 6.56
ResNet-50 Mamba 5.25 [5.06–5.40] 3.382 6.56
DINOv2 (last layer) Ridge (Baseline 0) 19.88 [19.62–20.65] 0.121 24.83
DINOv2 (last layer) Mean-pool MLP 19.88 [19.62–20.65] 0.584 24.83
DINOv2 (last layer) Bi-GRU 19.88 [19.62–20.65] 1.434 24.83
DINOv2 (last layer) Transformer 19.88 [19.62–20.65] 0.765 24.83
DINOv2 (last layer) Mamba 19.88 [19.62–20.65] 3.518 24.83

The served container is slower than these host numbers. For the deployed configuration, median extraction took 5.25 s on the host (12 CPUs) and 7.16 s in the container, 26.6% higher. The same container took 7.47 s through the command line, so the gap follows the container's 4-CPU limit rather than the HTTP path: the decoder and the 4 torch threads share those CPUs. End to end through upload and polling, the served container took a median of 11.30 s per 10 s of video (maximum 13.86, against a budget of 120).

Quickstart and reproduction

Run the demo from the published image (recommended). The gated image is published on the GitHub Container Registry and pinned by digest, so this runs exactly what passed the Phase 4b gate, with the same resource caps:

docker run --rm --cpus=4 --memory=4g --pids-limit=128 --read-only --tmpfs /tmp:rw,nosuid,size=256m -p 127.0.0.1:8001:8000 ghcr.io/justjoyful/testcard@sha256:cea6b009c05a18522c44889df72407a916b020cbec51086e859f4dcf9907b4ef

The digest is recorded in results/phase4/hf_space.json; the tag ghcr.io/justjoyful/testcard:0.1.0 points to the same image. The image runs the API and the page in one process, logs the verified hashes at startup, and needs no other files.

Build from source. These are the exact commands from the clean-machine build, run in a fresh clone. Building is only needed to change the code or to reproduce the image.

git clone https://github.com/JustJoyful/Testcard.git
cd Testcard
git lfs install --local
git lfs pull --include=results/phase3/refit/resnet50/ridge/seedNone/model.npz
git lfs pull --include=results/phase3/**
uv venv --python 3.11.15 .venv-serving
uv pip sync --python .venv-serving/bin/python --require-hashes --index-url https://pypi.org/simple --extra-index-url https://download.pytorch.org/whl/cpu --index-strategy unsafe-best-match env/serving.lock
.venv-serving/bin/python -m scripts.12_prepare_serving --config configs/serving.yaml --output artifacts/serving
docker build --no-cache -t testcard:0.1.0 .
docker run -d --name testcard-demo --cpus=4 --memory=4g --pids-limit=128 --read-only --tmpfs /tmp:rw,nosuid,size=256m -p 127.0.0.1:8001:8000 testcard:0.1.0

The image tag is testcard:0.1.0; the gated build is aliased to the same tag without rebuilding (image sha256:cea6b009c05a, testcard_tag.json). Then open http://127.0.0.1:8001/. In the clean build, the image took 5.7 min to build and was 2.46 GB, and the test clip scored 3.4207 in 8.78 s.

Run without Docker. The same environment serves the API locally with .venv-serving/bin/uvicorn serving.app:create_app --factory --workers 1 --host 127.0.0.1 --port 8000. The command line scores a file with .venv-serving/bin/python -m src.predict clip.mp4 --json.

Regenerate every table from saved outputs. These commands need the research environment (python -m pip install -r env/requirements.lock into .venv) and the committed results; no training is repeated.

.venv/bin/python scripts/06_eval.py --config configs/protocol.yaml --results results/phase1 --features configs/features_v2.yaml   # Phase 1 tables
.venv/bin/python scripts/07_bootstrap.py --config configs/phase2.yaml --features configs/features_v2.yaml                         # Phase 2 bootstrap
.venv/bin/python scripts/13_make_tables.py --config configs/phase2.yaml --features configs/features_v2.yaml                       # Phase 2 tables
.venv/bin/python -m scripts.11_phase3_report --config configs/phase3.yaml                                                          # Phase 3 report
.venv/bin/python -m results.posthoc_dino.report                                                                                    # post-hoc report
.venv/bin/python -m results.posthoc_dino.grid_followup.run                                                                         # post-hoc grid follow-up
.venv-serving/bin/python -m scripts.16_cpu_latency --report-only                                                                   # latency table
.venv-serving/bin/python -m scripts.17_inner_val_overlap                                                                           # overlap count
.venv-serving/bin/python -m scripts.18_make_readme                                                                                 # this README

Hardware and time. Research ran on an NVIDIA GeForce RTX 3050 6GB Laptop GPU. The saved run records give 10.9 GPU job-hours for Phase 1 and 0.4 for Phase 2. Serving and all latency figures are CPU only.

Repository layout

configs/            frozen protocol, feature, phase and serving configs
data/
  manifests/        dataset manifests with MOS, checksums and metadata (committed)
  splits/           fold and inner-validation indices (committed)
  raw/              videos (not committed)
cache/              cached features (not committed)
env/                locked research and serving environments
scripts/            numbered pipeline stages, 00_timing.py to 18_make_readme.py
src/
  preprocess.py     shared decoder and frame policy (offline and serving)
  features.py       shared backbones (offline and serving)
  heads/            mean_pool, gru, transformer, mamba
  baselines.py      ridge regression
  metrics.py        correlations, logistic mapping, paired bootstrap, Holm
  predict.py        shared raw-video prediction (CLI and API)
  serving_bundle.py hash-checked serving bundle and decision-log verification
serving/
  app.py, jobs.py   FastAPI app with one in-process job at a time
  web/              vanilla JS frontend (Vite build served by FastAPI)
results/            per-video predictions, metrics, reports, gates, figures
Dockerfile          single CPU-only image
README.template.md  source of this README (generated by scripts/18_make_readme.py)

Datasets and licenses

KoNViD-1k and LIVE-VQC were used under their owners' terms, recorded in docs/dataset_licenses.md, checked against each dataset's page. This repository distributes no videos and no cached features, only manifests, fold indices, model artifacts and generated results.

License. The code is released under the MIT License. The trained ridge checkpoint (testcard-r50-ridge) is released under CC BY-NC 4.0, because its training clips carry their own Creative Commons terms.

Citation

@misc{testcard,
  title  = {Testcard: Where does the quality signal live? Cached features versus temporal heads for no-reference video quality},
  author = {Das, Joydeep},
  year   = {2026},
  url    = {https://github.com/JustJoyful/Testcard},
  note   = {Code and results}
}

Acknowledgements

  • KoNViD-1k was created by the Multimedia Signal Processing group at the University of Konstanz (Hosu et al., QoMEX 2017).
  • LIVE-VQC was created by the Laboratory for Image and Video Engineering at the University of Texas at Austin (Sinno and Bovik, IEEE TIP 2019).
  • The ResNet-50 weights come from torchvision, and DINOv2 is from Meta AI (Oquab et al., 2023).
  • FAST-VQA and DOVER (Wu et al.) are the published reference points.

About

A reproducible no-reference video quality benchmark comparing ResNet-50/DINOv2 features, temporal architectures, and cross-dataset generalization.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages