Colorizing Video Where the Model Is Surprised: Self-Triggered Keyframes for Cheap, Stable Chrominance

Turning black-and-white video into color is a dense generation problem: every frame must come out colored, and neighboring frames must agree, or the result flickers. The best fast systems today run the same expensive feature extractor on every frame. ColorMNet, for example, pairs a large pretrained vision model (DINOv2) with a ResNet50 for every frame and reads colors from a memory of past frames. This spends the same effort on a static shot of a wall as on a frame where a new person walks in. We propose a colorizer that runs the expensive semantic encoder only when its own cheap pathway finds the current frame poorly explained by what it already remembers. A frame promoted this way becomes a new "keyframe" in memory. Every other frame is colored by a low-resolution chroma pathway guided by the full-resolution grayscale.

The two-sentence version is this. Most frames of a video are already explained by colors the model has seen, so the model should pay for heavy semantic features only on frames that surprise it, and should decide pixel by pixel whether to trust long-term memory, the previous frame, or the reference image. If this works, one mechanism covers three things that are currently handled separately: compute, anchor placement, and drift after scene cuts.

Core Claim

Our claim is that allocating heavy computation along the time axis, triggered by the colorizer's own memory-read failure, gives a better quality-versus-compute trade-off than two alternatives. The first is fixed-stride keyframing. The second is simply shrinking spatial resolution. Fixed stride fails because the moments that break propagation are irregular: fast motion, occlusions, new objects, and cuts. Temporal Consistent Automatic Video Colorization via Semantic Correspondence documents that a first-frame anchor becomes useless after a scene cut. Temporally consistent video colorization with deep feature propagation and self-regularization learning (TCVC) uses fixed first and last anchors per interval and inherits the same weakness.

The second ingredient is a gate that weights three sources of color evidence per pixel: the user's exemplar image, long-term keyframe memory, and short-range propagation from the previous frame. The gate is regularized to change smoothly over time. This addresses the known failure of per-frame dynamic weighting, which is that weights jitter between adjacent frames and inject flicker.

Relation to Prior Work

Three lines of work motivate the design, and one supplies most of the machinery.

Machinery. ColorMNet is our backbone. It replaced optical-flow propagation with attention over a memory bank, uses top-$M$ memory selection, and reports 35.77 dB PSNR on DAVIS at 0.07 s/frame and 1.9 GB on long NVCC2023 sequences. Every frame still passes through its full semantic estimator, and memory entries are added by schedule rather than by need.

Temporal fusion. BiSTNet weights forward and backward features by temporal distance to reference frames. That is a fixed, distance-based weighting. Our gate is instead content-dependent and smoothed over time. BiSTNet's bidirectional storage (34.9 GB on NVCC2023, as reported by ColorMNet) also constrains us: we stay causal and memory-based.

Frame selection for video reasoning. Flexible Frame Selection learns which frames a question-answering model needs, cutting downstream FLOPs 13.5x on NExT-QA. Adaptive Keyframe Sampling balances relevance against diversity. Both select from a candidate pool that is already encoded, and both then throw the unselected frames away. Neither assumption holds for colorization, where every frame must be output and there is no query. Our trigger is causal, needs no candidate pool, and uses the reconstruction model's own read error rather than question relevance.

Asymmetric pathways. SlowFast-LLaVA showed that a dense-in-time, coarse-in-space pathway can track motion while a sparse, high-resolution pathway carries semantics. We borrow that asymmetry. It is better justified here than in question answering, because the grayscale input already supplies all high-frequency structure and chrominance is low-frequency.

Dynamic weighting. SE-style re-weighting in CASIA-SURF (96.7% vs. 89.1% TPR for naive concatenation) and hierarchical gating in Low-Rank HOCA show that instance-specific weights beat static fusion. Both compute weights per sample with no temporal coupling. That is exactly the jitter problem we must avoid in a generative video setting.

Diffusion colorizers. VanGogh and ColorDiffuser are the multimodal alternative. ColorDiffuser runs about 6 s/frame on an RTX 3090, and VanGogh is limited to roughly 60 frames with hand-set text/exemplar scales. They show the value of multiple guidance sources, but they sit in a different compute regime, so we treat them as quality references rather than competitors.

Research Program

Architecture

The system has two pathways.

Cheap pathway (every frame). It encodes the grayscale frame with a small CNN. It predicts chrominance (the $a,b$ channels in Lab space) at 1/4 resolution by reading from keyframe memory and from the previous frame's chroma. It then upsamples the chroma with a luminance-guided upsampler, so edges come from the grayscale. The luminance channel is copied through unchanged.

Expensive pathway (keyframes only). On keyframes it runs ColorMNet's full DINOv2 plus ResNet50 feature estimation, colors the frame at full resolution, and writes the result into memory.

The keyframe trigger

The trigger is the memory-miss score of the cheap pathway. For frame $t$ with cheap query features $q_{t,p}$ at spatial location $p$ and memory keys $k_j$, we define

$$s_t = 1 - \frac{1}{|P|}\sum_{p \in P} \max_j \cos(q_{t,p}, k_j),$$

where $P$ is the set of spatial locations. A frame is promoted to a keyframe when $s_t > \tau$. The threshold $\tau$ sets the operating point on the compute curve.

We will compare this hand-defined score with a small learned trigger. The learned trigger is trained with a straight-through estimator in the style of FFS, with a penalty on keyframe rate. The hand-defined score has the advantage that its failure modes are interpretable.

The evidence gate

For each pixel, three chroma predictions are combined: $c^{\text{ex}}$ from the exemplar, $c^{\text{mem}}$ from keyframe memory, and $c^{\text{prev}}$ from the warped-by-attention previous frame. The combination uses softmax weights $\alpha_{t,p}$ computed from the three read confidences and the luminance features. Training minimizes

$$\mathcal{L} = \mathcal{L}_{\text{color}} + \lambda_1 \sum_{t,p}\lVert \alpha_{t,p} - \alpha_{t-1,\,\pi(p)} \rVert_1 + \lambda_2\, r_{\text{key}}.$$

Here $\mathcal{L}_{\text{color}}$ is ColorMNet's reconstruction loss. $\pi(p)$ is the attention-matched location of $p$ in the previous frame. $r_{\text{key}}$ is the keyframe rate, which enters only for the learned trigger. The gate-smoothness term is what separates this gate from per-frame SE or HOCA gating.

Analysis questions

Beyond the headline results, we will ask two things. Where do the triggered keyframes land relative to shot boundaries and motion peaks? When does the gate shift weight toward the exemplar? We expect this after cuts, when memory becomes stale.

Baselines

Do-nothing reference: stock ColorMNet. This is ColorMNet run unmodified with its released settings, using the full encoder on every frame. It is the strongest existing method on this exact task and compute class, reporting 35.77 dB PSNR on DAVIS, 0.07 s/frame, and 1.9 GB on NVCC2023. No absolute CDC value for ColorMNet appears on Lacuna in our file, so we will measure it ourselves. Beating it means one of two things: matching its PSNR within 0.2 dB and its measured CDC at half or less of its per-frame FLOPs, or exceeding it on the scene-cut stress set at equal FLOPs.

Fixed-stride keyframing. This is ColorMNet's full encoder run every $k$-th frame, with our cheap pathway everywhere else. $k$ is swept to match our FLOPs at each operating point. This baseline isolates the trigger.

Low-resolution ColorMNet. This is ColorMNet run on every frame at reduced input resolution, followed by the same luminance-guided chroma upsampling. Resolution is swept to match FLOPs. It isolates temporal allocation from spatial reduction.

Random keyframes at the same rate. This ablation separates "where" keyframes are placed from "how many" there are.

Oracle keyframes. Keyframes are chosen with hindsight at the frames where the cheap pathway's error is highest. This gives an upper bound on the trigger.

Gate ablations. These replace the gate with fixed equal weights, and with a dynamic gate trained without the smoothness term.

Fairness conditions. All learned variants share ColorMNet's training data and schedule, use the same exemplar protocol, and receive the same tuning budget of a single sweep over $\tau$ or $k$. FLOPs and wall-clock time are measured on one GPU type.

BiSTNet reference. BiSTNet's reported 34.02 dB DAVIS PSNR (from ColorMNet's comparison) is included for context only.

Why not just…?

Why not just run ColorMNet at lower resolution and upsample the chroma? This is the most serious threat. Chrominance is low-frequency, so spatial reduction alone may capture most of the savings. We will not argue around it: it is a FLOPs-matched baseline. If low-resolution ColorMNet sits on or above our Pareto curve on DAVIS and Videvo20, the temporal-allocation claim is false. In that case the contribution reduces to the stress-set behavior, or to nothing. Our reason to expect a gap is that resolution reduction degrades every frame's semantic matching equally. Triggered keyframing keeps full semantics exactly at the frames where matching is hardest.

Why not just use a shot-boundary detector to place anchors? Cuts are only one cause of propagation failure. Fast motion, occlusion, and newly visible objects within a shot are not cuts, and flow-based methods like TCVC and Fully Automatic Video Colorization With Self-Regularization and Diversity break precisely there. We will add a detector-plus-fixed-stride baseline. If it matches the memory-miss trigger on the unspliced DAVIS and Videvo20 sets, the simpler design wins and we will report that.

Why not just smooth independently colored frames afterward? Lei and Chen found that single-image colorizers with temporal post-processing lose in blind tests to integrated methods: their method was preferred 80% of the time on DAVIS and 88.8% on Videvo. TCVC also shows that post-hoc smoothing trades flicker for blur and desaturation. We include one such pipeline only as a lower bound.

Why not just use a video diffusion colorizer? At about 6 s/frame for ColorDiffuser and a roughly 60-frame limit for VanGogh, these models answer a different question. We report their published numbers as quality references and do not claim to match their colorfulness.

Proposed Experiments

Standard benchmarks. We evaluate on DAVIS (using DAVIS30 where prior numbers use it), Videvo20, and NVCC2023. Metrics are PSNR, SSIM, LPIPS, and CDC (color distribution consistency across frames). For cost we report per-frame FLOPs, wall-clock time, and peak memory. The main figure plots PSNR and CDC against FLOPs for every baseline.

Scene-cut stress set. We build this by splicing DAVIS clips with abrupt cuts, providing a separate exemplar per segment only at the start. This directly tests anchor staleness.

High-motion subset. We take the DAVIS clips in the top quartile of mean flow magnitude, measured with an off-the-shelf flow network for selection only.

Qualitative test. Historical footage used in prior work serves as a qualitative check without ground truth.

Decisive checks. There are three.

  1. The memory-miss trigger should beat random and fixed-stride keyframes at equal rate. It should close a meaningful fraction of the gap to the oracle. It should sit above low-resolution ColorMNet on the Pareto plot for at least the scene-cut and high-motion sets.
  2. Removing the gate-smoothness term should measurably worsen CDC while leaving PSNR roughly unchanged. That pattern would confirm that per-frame dynamic weighting injects flicker.
  3. Triggered keyframes should cluster at cuts and motion peaks. If they fire uniformly, the mechanism is not doing what we claim, regardless of the aggregate numbers.