DVPApplied Creative AI Engineering

Search this course

Search lesson and reference material.

↑ ↓ to choose · Enter to open · Esc to close

Case study

A learned temporal detector, and the heuristics that beat it

Trained on six synthetic scenes, evaluated on two it never saw, and benchmarked against hand-written measurements on exactly the same clips.

NVIDIA GeForce RTX 4080 SUPER40 epochs · 3.158sseed 1234

Problem

CineQC scores video defects in the browser with hand-written measurements. The open question is whether a small learned model does better. The only way to answer it is to build one and compare the two on the same held-out data, through the same metric function, and publish whichever answer comes out.

Baseline

The baseline is the Artifact Lab heuristics: five measurements with thresholds calibrated on labelled fixtures. For this comparison they were recalibrated on the training and validation scenes only. Their published thresholds are fitted on all 48 clips, which include the 12 held out here — comparing against those would hand the baseline a look at the test set that the model never got, and the headline would mean nothing.

Data

48 synthetic clips: 8 scenes × 6 variants, one clean and five each carrying exactly one controlled defect. Split by whole scene, never by clip or window — variants of a scene share its background and windows overlap in time, so any finer split lets a model score well by recognising content it already trained on. Held out: scene-a, scene-h. Provenance and limits: dataset card.

Model and system

Three 3D convolution blocks into concatenated max and mean pooling, about 29k parameters, trained in 3.158s on an NVIDIA GeForce RTX 4080 SUPER with PyTorch 2.13.0+cu126 and CUDA 12.6. Two choices carry it: the input is each window stacked with its own temporal first difference, and pooling is max as well as mean. An earlier version used average pooling alone and predicted "defective" for every held-out window — it had learned the 5:1 class prior rather than the defects. Details: model card.

Evaluation

Both systems scored at clip level on the same 12 held-out clips, through the same recompute_classification_metrics over saved predictions. The threshold came from validation only.

SystemPrecisionRecallF1Accuracy
Artifact Lab heuristics1.001.001.001.00
Learned detector0.900.900.900.83

The heuristics win outright, 1.00 against 0.90 — and they are faster, need no GPU, and say which defect they found. Where defects are synthetic, isolated, and known in advance, that is the expected result, and it is the reason to keep a heuristic layer rather than replace it. The argument for the learned path is the opposite case: heuristics only catch artifacts somebody thought to write a measurement for.

At window level the model scores F1 0.83 across 60 windows (precision 0.886, recall 0.78). Confusion matrix · every decision.

16 window errors at threshold 0.4975, by defect family:

detail-collapse is the weakest family: progressive blur reads as ordinary softness once a window is downsampled to 128×72. The errors on clean windows are the model's remaining bias towards the defect class. Full list: error-gallery.json.

Limitations

Next steps

Repository and reproduction

Package, cards, and the committed run: temporal-detector.

uv run --project creative-ai-engineering/capstones/temporal-detector python -m temporal_detector.train --out runs/local-rtx4080 --device cudauv run --project creative-ai-engineering/capstones/temporal-detector python -m temporal_detector.benchmark --run runs/local-rtx4080

--device cuda exits non-zero when CUDA is unavailable rather than falling back, so a CPU run can never be filed as GPU evidence. Config hash a7fc6fac6152, dataset hash 0cc7863a34af, checkpoint 62976b372a69.

Defence

The result worth being asked about is the one where my model loses. I would keep it. The comparison was only worth running because it could come out this way, and the honest reading is that a hand-written measurement is the right tool for a defect you can define, while a learned model earns its place on the defects nobody wrote a measurement for. Publishing only the flattering half would have made the whole exercise decorative.