Elamur Research

Learning from One Continuous Video Stream

Paper · 2024 · João Carreira, Michael C. King, Viorica Pătrăucean et al.

Summary

A camera moving through a room may spend a long time looking at the same objects. For a system that learns from that camera, the next observation will frequently reinforce the last one. That can help it adjust to the room, but it can also make a local pattern seem more important than it is. Learning from One Continuous Video Stream asks whether a vision system can learn under these conditions, taking observations in arrival order, and still make useful predictions in settings it has never seen. The authors compare this way of learning with the usual practice of sampling examples from different videos in random order.

The experiments use a stream assembled from first-person recordings of daily life and another assembled from footage of indoor spaces. The system takes a short run of camera frames and predicts another run of images. Depending on the task, those images show future camera pixels, the categories of objects and surfaces, or their distance from the camera. Representing all of these targets as color images lets the authors keep the same output format and training loss when they change tasks. They measure performance during learning on the incoming stream, then periodically pause learning and test the current network on held-out footage. The first score captures the practical benefit of adapting to where the camera is now. The second asks how much of what was learned carries over.

Several training choices help. Successive gradients, the directions used to adjust the network, tend to be closely aligned on consecutive video inputs. An optimizer that carries forward an average of earlier gradient directions performs poorly at its usual settings, and reducing that contribution helps. Waiting longer between weight updates generally improves performance on held-out footage at a cost to performance on the ongoing stream. Preparing the network in advance on shuffled video clips also helps. The strongest preparation the authors try uses a future prediction task in which some patches of the input are replaced with glimpses of the corresponding future image.

Together, these choices make ordered learning competitive with a conventional shuffled baseline that also processes a single example at a time. The comparison depends on what must be predicted. For ScanNet-stream segmentation at a displacement of 1 timestep, the continuous approach reaches mean per-frame intersection over union of .463 during learning and .312 on held-out footage, compared with .376 and .302 for that baseline. For Ego4D-stream pixel prediction at a displacement of 4 timesteps, the continuous approach has lower error during learning and higher error on held-out footage. The experiments show how much chronological training can recover without replaying old examples, and why an improvement on the current video needs a separate test of transfer.

Deep dive: Learning from One Continuous Video Stream

Learning from One Continuous Video Stream tests how video prediction can adapt to a changing scene and transfer to unseen footage. · about 34 minutes to read

The problem and its context

What changes when observations arrive in order

In a conventional video training run, an example can be a short sequence with a perfectly ordinary internal order. The camera moves, a person reaches for something, and the frames record each stage. The next example in the training run can come from an completely different recording. The system learns from motion inside individual examples while the training procedure breaks the continuity between them. The paper changes that second part. The next input is the next group of frames the camera would have supplied.

This difference matters most when a view changes slowly. After seeing several examples from a fixed scene, a network may have accumulated considerable evidence about the appearance of that scene and relatively little evidence about how the same objects appear elsewhere. The paper illustrates the distinction with a chair. Features of its legs may help identify chairs in other rooms. Its color may be an excellent clue in the current room if everything else there is a different color. Both clues can improve the same prediction. An evaluation that stays in the room has limited ability to tell them apart.

The immediate question is whether ordinary training procedures can use such a stream efficiently. The authors describe the online phase as a single-example setting, with no shuffle across the stream and no batch of independent examples available to average together. Batch size 1 means one training example at a time, and an example still contains several video frames. If those frames show a view almost identical to the previous example, processing another example does little to diversify the evidence. A succession of such examples can last far longer than the short input window.

The paper's comparison is with sampling intended to approximate independent and identically distributed data, abbreviated IID. In this context, that means drawing input and target windows from randomized videos and time positions rather than stepping forward through one ordered input. The definition concerns how training examples are chosen. The input and target within an example still belong together, even in the shuffled condition. Random sampling breaks the link between successive examples, while preserving the relationships that make each example a video prediction problem.

This creates a distinction between the amount of footage supplied and the sequence of evidence seen by the optimizer. Two runs can use the same source collection and process the same number of frames but encounter quite different patterns of repetition. The shuffled run can see several environments early. The chronological run may spend its early updates in one environment. The challenge is to preserve the value of familiarity with the current scene while acquiring knowledge that lasts beyond it.

Why learning the current stream is a separate question

The authors situate the paper in continual learning, where the system keeps training as its data change. Much of the work they describe organizes this change as a sequence of defined tasks or classes. A learner might receive examples of a new class and have to retain its ability to recognize earlier classes. The loss of earlier abilities is called catastrophic forgetting. Elastic weight consolidation is an example of a technique designed to protect earlier capabilities as training continues. Overcoming catastrophic forgetting in neural networks

A video stream poses a prior question. The learner needs to make progress while its inputs are still part of the same ongoing experience. New viewpoints and events can arrive gradually, without an explicit signal that one task has ended and another has begun. In the class-by-class example discussed by the paper, images within one class can still vary widely in composition and detail. Consecutive camera views can have similar edges, textures, lighting, and layout all at once. The authors therefore treat the ability to learn from the stream as the first question, with retention across an explicit sequence of earlier tasks left open.

Online continual learning is closer to their setting because it also considers a stream that is visited once. The paper points to a difficulty in evaluating that kind of learning. A system can exploit a pattern in recently revealed labels, or a feature that happens to correlate with the labels for a while, and do well on the next example. A good score may accurately reflect short-term prediction while giving little evidence that the underlying feature will transfer. Much of the work the authors discuss used collections of still images. Video makes the shortcut especially plausible because both the inputs and their targets can persist from moment to moment.

The paper identifies an earlier study of continuous self-supervised video learning that addressed near-duplicate observations with a replay buffer designed to retain diverse examples. A replay buffer stores past observations and draws training batches from them. It can expose the learner to a broader mix of recent experience, but processing those batches adds computation. The earlier study assessed its learned features on separate image classification tasks. Carreira and colleagues also want to know whether the learner gets better at predicting the experience it is currently receiving, so they give that performance its own measure.

The authors also draw a connection to test-time training, in which a system is allowed to adjust while processing new inputs, using a training signal obtainable at test time. The example they discuss aims to improve predictions on short incoming videos. Their own study extends learning across 24 hours of incoming footage in its reported runs and considers transfer at intervals along that trajectory. The extended horizon gives an update rule time to show both its immediate response to a scene and the cumulative consequences of repeating that response.

Why start with prior visual experience

Earlier experiments reviewed in the paper had obtained useful features from very small sources, including a single image or a long video. Those training setups could shuffle examples, transform them through augmentation, and feed them in large batches. They suggested that a limited source can contain substantial visual information. The present question is whether the information remains accessible when the learner does not get to arrange it for training.

The paper also draws on work suggesting that pretrained features can help learners cope with sequential data. Pretraining is an initial training phase whose weights serve as the starting point for a new phase. The authors describe several ways prior work built such features. Self-distillation methods train one representation using targets produced by another part or version of the system. The paper names BYOL and DINO as examples. BYOL and DINO

Contrastive approaches supply another route to a starting representation, and the paper includes CLIP among them. Masked autoencoding supplies a closer precedent for the experiments here. It hides part of the visual input and learns by reconstructing what is missing. Both image and video versions appear in the authors' account of prior work. This family offers an initialization learned through a pixel reconstruction task, and it also gives the authors a task design to vary by changing when the desired image occurs. CLIP · Masked Autoencoders Are Scalable Vision Learners · VideoMAE

Pretraining and continuous learning thus serve different purposes in the paper's design. The first phase can provide broad visual experience under favorable training conditions. The second tests what happens when further experience arrives in its own order. That distinction is important for the application that motivates the authors. A system intended to keep learning after deployment may receive observations from one camera, device, or user in real time, regardless of how its initial capabilities were acquired.

The method, step by step

A prediction before each opportunity to learn

At a given position in the video, the network receives a short window of consecutive camera frames. It produces an output window with the same shape. The experiment compares that prediction with the corresponding target before using the target to change the weights. This ordering makes the score interpretable as a prediction made with the experience available up to that point. The target can then influence the next prediction through the learning update.

A target window can consist of ordinary camera frames or of aligned annotations. When the task is future pixel prediction, the recording supplies the answer once the relevant time arrives. For future semantic segmentation, the answer assigns a category to each annotated position at that future time. For depth, it describes how far away the visible surfaces are. Those additional tasks use their own target streams, aligned to the camera video.

The same prediction and training loop can proceed at different rates. The learner can update after each example, or it can accumulate gradients over several consecutive examples before applying them. Meanwhile, selected checkpoints, which are saved states of the network, are evaluated separately on validation footage. The validation predictions leave the checkpoint's weights unchanged, allowing the authors to compare how much each saved state already knows.

Learning and evaluation along the video stream

The steps in order.

Learning and evaluation along the video streamStep 1: Take the next window of camera frames1. Take the next window of camera framesStep 2: Predict an RGB window at the target time2. Predict an RGB window at the target timeStep 3: Compare the prediction with its target3. Compare the prediction with its targetStep 4: Record the online score and compute gradients4. Record the online score and compute gradientsStep 5: Apply accumulated gradients at the scheduled update5. Apply accumulated gradients at the scheduled updateStep 6: Test saved checkpoints on held-out footage6. Test saved checkpoints on held-out footage

What the learner sees and what it predicts

The step in the learning loop uses n = 4 consecutive frames. Here n denotes the number of frames grouped as one input window. The network predicts the same number of target frames. To present a window to the network, the authors stack the color channels of its frames. That gives the input and output 12 channels apiece. Nearby frames provide some information about the direction in which a camera or object is moving, even though the network receives only the current window as explicit context.

The time displacement specifies how far ahead the target window lies. The timing relationship can be written as follows.

target time = t + Δ

Here t is the input timestep and Δ is the displacement measured in steps. The plus sign advances the time index by that displacement. “Target time” denotes the index of the output window that the network is asked to predict. The paper uses displacements of 0, 1, and 4 timesteps. With a displacement of 0, depth and segmentation describe the same frames supplied as input. For pixels at 0 displacement, the task amounts to reconstructing the input. The future pixel comparisons use positive offsets. A main-text illustration shows a pretraining displacement of 16 frames, reported as 0.64s. The pretraining sweep varies this displacement separately from the downstream comparisons.

The authors use two network backbones, the parts that transform the input into intermediate visual features. One is a UNet that processes the image at different resolutions and applies self-attention at the lowest resolution. Self-attention lets features at different positions contribute to how a position is represented. The UNet has 8M parameters and is trained from scratch in these experiments. Its supplement describes 4 resolutions, starting at 224x224, with 8 residual blocks and 64 channels at each resolution. The self-attention block operates at 28x28 and uses 4 heads, which let it form several sets of attention weights.

The other backbone is ViT-L, a larger Vision Transformer with 350M parameters. A Transformer processes representations of image patches by exchanging information through attention. ViT-L is the backbone used for the pretraining comparisons. When the initial weights come from an ImageNet checkpoint, the authors replicate the first layer's pretrained weights 4 times to accommodate the stacked input frames. This is the operation the paper calls inflation. The decoder uses a learned linear transformation to turn each output token, the feature vector for a patch, into a set of channel values. Reshaping those values puts them back into the spatial grid and frame channels of the prediction. Vision Transformer · Quo Vadis, Action Recognition?

The current short window is the learner's direct visual input throughout these experiments. Information about earlier windows can still persist in learned weights or in the optimizer's state. The principal streaming configuration leaves old examples out of later batches, and the authors test a replay buffer separately. This design makes changes in the trained parameters the main way the prediction benefits from extended exposure to the incoming video.

One output format across the tasks

Segmentation and depth would normally require different meanings for the values emitted at each pixel. A segmentation output identifies a category. A depth output estimates a distance. RGB footage already consists of color values. The paper gives all three the same interface by assigning a color to each semantic category and to each depth bin. The network always emits color values, and the target colors supply a common training signal.

ScanNet-stream uses the NYU40 palette for its 40 semantic classes. Each annotated pixel is painted in the color assigned to its category. For depth, the authors use Viridis with 256 colors. They set a maximum depth of 8 for the mapping and scale that value to 1 in the normalized representation. A predicted color can then be converted back to a depth by looking up its location on the palette and reversing the normalization. Camera pixels themselves need no analogous conversion.

The paper describes its common objective as an L2 pixel loss. At the level of the comparison made for one pixel, the operation described is the following.

dₚ = L₂(ŷₚ − yₚ)

Here p identifies a pixel position in the target window, including its frame, and the subscript ties each quantity to that position. ŷₚ is the predicted color vector, yₚ is the target color vector, and the minus sign takes their componentwise difference. L₂ denotes the paper's L2 comparison of color values, and dₚ denotes that pixel's contribution. For segmentation and depth, the authors mask unannotated positions out of both the loss and the evaluation. The paper describes the comparison and its averaging in words.

At evaluation time, the predicted color for a semantic or depth pixel can lie between palette entries. The authors decode it using the nearest available color. Written as a selection rule, that operation is as follows.

ĉₚ = argmin꜀∈C L₂(ŷₚ − c)

Here ĉₚ is the chosen palette color for pixel p, and ŷₚ is the predicted color there. C is the task's palette and c ∈ C means that c ranges over colors in that palette. argmin selects the candidate itself, using the smallest L₂ distance between the predicted color and the candidate. The selected color identifies a class for segmentation or a depth value for the depth task. Decoding applies after prediction, so the learner can train on the color loss even when the reported measure concerns class overlap or distance.

There are two reasons to keep the color encoding and the evaluation measure distinct. First, the color loss makes it possible to move a pretrained system from RGB forecast training to a different target without replacing its output layer. Second, what counts as an error for a task is best expressed in that task's terms. A segmentation pixel with a slightly inaccurate RGB prediction can still decode to the right class. A good color match alone has no interpretation as an overlap score until the predicted colors have been converted to categories.

Building a starting point from future video

The pretraining stage uses shuffled clips before the continuous phase begins. For each pretraining example, the authors take an input window and a later target window from the same recording. Their three objectives change the information available in the input while keeping the future target and the pixel prediction loss in place.

Vanilla future prediction gives the network the unmodified earlier window. To predict the later one, it must use cues such as appearance and movement available in the input. Guided future prediction replaces some input patches with patches from the same positions in the future window. These patches give the learner a partial view of the answer and reduce uncertainty about the rest. The setup still requires prediction at the locations for which no future pixels were supplied. Guided prediction belongs to the preparation phase. The downstream streaming protocol supplies the ordinary camera window as input.

Masked future prediction makes the input less informative. Selected patches are replaced by gray. The learner must forecast the later window while also dealing with missing information about the present. The paper relates this to video masked autoencoding. Its future objective uses separate input and output windows when there is a positive offset, while the usual reconstruction objective concerns the clip whose input was corrupted. Moving the forecast farther ahead changes the task even if the mask itself stays the same.

For both guidance and masking, the authors divide the frames into square, non-overlapping patches. The intervention has two settings to choose, the share of patches that are replaced and their size. The tested guidance fractions are 5% and 10%. The tested masking fractions are 50% and 75%. Patch sizes of 32x32 and 16x16 are compared. Vanilla prediction is the shared case in which none of the patches are replaced. The supplementary experiments vary temporal separation from 0.64s to 3.84s, so both the amount of visible evidence and the distance to the event being predicted can vary.

This preparation is run on Kinetics-700-2020, whose clips are 10s long. The authors initialize the ViT-L from ImageNet-MAE for all of the video pretraining variants, reporting that this makes optimization faster. They use shuffled batches of 1024 clips on 8x8 slices of TPU-v5-lite, and AdamW updates the weights at every training step. The supplementary description gives a learning rate of 2e-4, weight decay of 0.05, and 1000 steps of linear warmup, followed by a constant rate. The paper reports 150k steps for pretraining. Linear warmup here means gradually bringing the learning rate up to its working value early in training.

During pretraining, the authors also monitor whether the learned features support action recognition. They place a linear classifier immediately before the decoder, above a stack of 4 self-attention layers on the ViT-L encoder. The classifier learns from action labels through cross-entropy, a loss that penalizes low predicted probability for the correct action. A stop-gradient blocks that classification loss from changing the backbone. Thus the action labels train the probe, while the pixel prediction objective trains the shared visual features the probe reads. The monitoring score can indicate which prediction task produces features that are readily classifiable, and downstream evaluation then checks whether the selected checkpoint helps on the online tasks.

Updating and scoring along the stream

During continuous learning, each set of frames is processed as it arrives. At an update interval longer than one step, the gradient from a new example can contribute to the pending weight update without immediately changing the weights used on the next example. This is gradient accumulation. The examples contributing to the update are still neighbors from the same stream. The procedure offers a way to vary how often the parameters move while keeping the input order fixed.

The two evaluation settings use scores with the same definitions. In-stream, the prediction is scored against the target associated with the incoming video before the learner can train on that target. The held-out check uses the validation stream and disables optimization. These measurements capture different aspects of performance, even though the same score, such as a segmentation overlap measure, can be computed in either setting. The incoming score can benefit from repeated exposure to the current surroundings. The validation score tests the weights acquired so far in unfamiliar footage.

The authors use a cumulative score to summarize each trajectory. A score from the end of a run would give no weight to how quickly performance improved. A simple average over raw observations would also be awkward to compare with a series of validation checks made only at checkpoints. The paper instead interpolates the performance curves and averages their values at evenly spaced positions. In notation, the described average is as follows.

S = meanⱼ s(uⱼ)

Here S is the cumulative score for one task and evaluation setting. uⱼ is the position of evaluation point j along the training trajectory. s(uⱼ) is the score interpolated at that position, and meanⱼ gives the points equal weight in the average. There are 10,000 evenly spaced points for each interpolated trajectory. This calculation turns the history of the run into a single comparison while retaining a contribution from early performance. The figures that show the original trajectories offer complementary information about when differences emerge.

Experiments and results

The source videos and evaluation measures

Ego4D-stream is assembled by concatenating raw first-person videos of daily activities. The recordings were made with cameras mounted on the head or glasses. The authors use ∼90% of the data for the training stream and ∼10% for validation. The dataset table lists 21,704 training videos, with 294M frames covering 3,265h, and 2302 validation videos, with 31M frames covering 348h. The maximum source video length is 1.95h and the median is 8.8 minutes. The Ego4D-stream experiments forecast future pixels, using the recording itself as the target and leaving annotations out of the task. Ego4D

ScanNet-stream is assembled from ScanNetV2 recordings in which a camera moves through indoor environments. Its dataset table lists 1,199 training videos, with 1.8M frames covering 20h, and 312 validation videos, with 0.5M frames covering 5.7h. Its longest source recording is 5.5 minutes and its median is 1 minute. In addition to camera frames, ScanNet supplies depth and segmentation annotations. The paper uses those annotations to check whether the learner predicts properties of the scene that a visually plausible RGB output might leave ambiguous.

The results section describes 24 hours of video for in-stream learning and 3h30 of video for out-of-stream measurements on saved checkpoints. The authors use 224x224 resolution. The dataset totals describe the source collections assembled for the framework. The run lengths describe how the results section reports experimental exposure and evaluation. In particular, the description of experimental duration should be read alongside the shorter ScanNet training total, an issue for interpreting the extent of the single-pass claim.

For pixels, the reported metric is average L2 pixelwise distance. Smaller values mean predicted colors are closer to the targets. For segmentation, the paper specifies mean per-frame intersection over union, or IoU, and recall. Intersection over union asks how much the predicted and true regions overlap, relative to their combined extent. Recall asks how much of the true region is recovered. The main comparisons shown in the paper report mean per-frame IoU, where higher is better. For depth, the paper reports logRMSE, which measures depth error on a logarithmic scale. Lower values are better. The main numbers are cumulative scores over the training trajectories as described above.

What changes with pretraining

The checkpoint comparison uses the same ViT-L architecture throughout. It covers training from scratch, ImageNet classification checkpoints, ImageNet masked autoencoding, and the selected guided future prediction checkpoint. Results for each task combine runs at displacements of 1 and 4 timesteps. The table gives an in-stream value and a held-out value for each checkpoint. The comparison asks which preparation lets a learner make the best use of later chronological experience.

The segmentation results illustrate why the two settings matter. Guided future prediction has the higher in-stream mean per-frame IoU, .390, compared with .360 for ImageNet masked autoencoding. On held-out footage, ImageNet masked autoencoding has .320 and guided future prediction has .313. The classification checkpoints are below both on the held-out segmentation measure, and training from scratch is lower still. The best starting point for rapidly fitting the observed scene consequently depends on whether the objective emphasizes adaptation or performance elsewhere.

Pretraining checkpoints on ScanNet-stream segmentation, held-out mean per-frame IoU

ImageNet masked autoencoding leads on held-out segmentation, with guided future prediction close behind.

Pretraining checkpoints on ScanNet-stream segmentation, held-out mean per-frame IoUTraining from scratch: .188Training from scratch.188ViT-L-I1K-CLS: .234ViT-L-I1K-CLS.234ViT-L-I21K-CLS: .192ViT-L-I21K-CLS.192ViT-L-I1K-MAE (this paper): .320ViT-L-I1K-MAE (this paper).320Guided Future Prediction: .313Guided Future Prediction.313
The numbers
System or settingmean per-frame IoU
Training from scratch.188
ViT-L-I1K-CLS.234
ViT-L-I21K-CLS.192
ViT-L-I1K-MAE (this paper).320
Guided Future Prediction.313

On Ego4D-stream pixel prediction, guided future prediction has average L2 distance of .036 in-stream and .043 out-of-stream. The corresponding values for ImageNet masked autoencoding are .040 and .044. Training from scratch yields .074 and .105. The video checkpoint helps on both sides of this comparison, and the difference between training from scratch and using either reconstruction-based checkpoint is more pronounced than the difference between those two checkpoints on held-out footage.

For ScanNet-stream pixel prediction, the guided checkpoint records .032 in-stream and .034 out-of-stream, with average L2 distance again the measure. ImageNet masked autoencoding records .037 and .038, and training from scratch records .083 and .083. In depth prediction on the same stream, the guided checkpoint attains logRMSE of 1.622 during learning and 1.990 on held-out footage. The ImageNet masked autoencoding checkpoint gives 1.806 and 2.045. The ImageNet classification checkpoint labeled ViT-L-I21K-CLS gives 1.735 and 2.013 for depth. That comparison shows that the relative position of the ImageNet checkpoints also depends on the target.

The guided checkpoint is produced by further training from an ImageNet-MAE initialization. The relevant improvement is therefore what the video preparation adds to that starting point. The paper's selection procedure uses action recognition during pretraining, then tests the chosen checkpoint on different video collections and tasks. A gain in stream prediction is a downstream result in its own right. The action score describes how the checkpoint was chosen.

Continuous learning against shuffled training

The authors name their combined continuous setup Baby Learning, abbreviated BL. It combines guided future prediction pretraining with the optimizer and update choices studied in the paper. Their conventional setup, STDL, uses the same ViT-L architecture, an ImageNet-MAE checkpoint, and AdamW with learning rate 1e-4 and first-moment momentum of 0.9. STDL updates after each batch. The shuffled baselines draw a random timestep and its matching target from a random source video. The comparison includes STDL at batch sizes 1 and 16.

The authors match the number of frames seen. Larger batches therefore use fewer learning steps. This makes the comparison meaningful in terms of visual exposure, while leaving the number of optimizer updates free to vary. It also makes the batch size 1 baseline particularly informative. It tests a familiar training recipe with equally small individual inputs, under much more randomized presentation. BL and STDL still differ in initialization and optimization in addition to the order of presentation, so the main comparison is between complete recipes.

For ScanNet-stream segmentation with a forecast displacement of 1 timestep, BL has in-stream mean per-frame IoU of .463, compared with .376 for shuffled STDL at batch size 1. On the validation stream, the scores are .312 and .302. The larger shuffled batch has .495 in-stream and .398 out-of-stream. Thus the continuous approach is competitive in the single-example comparison, while the larger shuffled baseline has the higher score in this case. At a displacement of 4 timesteps, BL gets .328 in-stream and .241 out-of-stream, versus .276 and .227 for shuffled STDL at batch size 1. The advantage for the continuous configuration carries over to the farther segmentation forecast in this particular comparison.

ScanNet-stream segmentation at 1 time step of displacement, held-out mean per-frame IoU

The continuous setup edges ahead of shuffled single-example training, while the larger shuffled batch leads.

ScanNet-stream segmentation at 1 time step of displacement, held-out mean per-frame IoUSTDL IID, batch size 1: .302STDL IID, batch size 1.302Baby Learning continuous, batch size 1 (this paper): .312Baby Learning continuous, batch size 1(this paper).312STDL IID, batch size 16: .398STDL IID, batch size 16.398
The numbers
System or settingmean per-frame IoU
STDL IID, batch size 1.302
Baby Learning continuous, batch size 1 (this paper).312
STDL IID, batch size 16.398

For Ego4D-stream pixels at a displacement of 1 timestep, BL has average L2 distance of .018 in-stream and .021 out-of-stream. The corresponding STDL batch size 1 values are .019 and .018. For the 4 time-step forecast, BL gets .055 in-stream and .066 out-of-stream, while STDL gets .057 and .056. The same direction of tradeoff appears at both horizons. The continuous learner has the smaller error on incoming footage, and the shuffled baseline has the smaller error on validation footage. The authors single out the farther Ego4D forecast as one of the weaker held-out cases for continuous learning.

The ScanNet-stream pixel results split differently. With a displacement of 1 timestep, BL has .011 in-stream and .012 out-of-stream. Shuffled STDL at batch size 1 has .010 and .013. Here the shuffled approach does slightly better during learning, and the continuous approach does slightly better on held-out footage. With a displacement of 4 timesteps, BL records .055 in-stream and .061 out-of-stream, and the shuffled baseline records .051 and .060. This is a case where shuffled training at the same batch size has lower pixel error in both settings.

On ScanNet-stream depth with a displacement of 1 timestep, BL has logRMSE of 1.595 in-stream and 2.038 out-of-stream. Shuffled STDL at batch size 1 has 1.722 and 2.012. At a displacement of 4 timesteps, the continuous configuration gets 1.655 and 2.097, while the shuffled baseline gets 1.759 and 2.034. The depth results favor the continuous learner during exposure to the training stream and the shuffled baseline on the validation stream. They illustrate how the paper's broad comparison can hold across a set of tasks while individual task and split combinations favor different recipes.

What a baseline can achieve from persistence alone

The paper also evaluates a blind baseline. This predictor receives no camera frames. It uses earlier targets to produce a running estimate for each pixel position, using mean values for pixels and depth and frequent colors for segmentation. Its purpose is to show how much prediction can be achieved by exploiting the persistence of answers along the observed stream. In a stable scene, recent targets can remain informative even if the predictor knows nothing about the incoming image.

For segmentation at a displacement of 1 timestep, the blind baseline scores .547 mean per-frame IoU in-stream on ScanNet. The continuous vision system has .463 in the same comparison. At a displacement of 4 timesteps, the blind baseline has .307 and the continuous system has .328. For ScanNet depth, the blind baseline obtains in-stream logRMSE of 1.256 at a displacement of 1 timestep and 1.649 at a displacement of 4 timesteps. BL's values under those conditions are 1.595 and 1.655. These scores show how strong target persistence can be, even for an output with more structure than raw pixel colors.

The blind predictor has no comparable access to the relevant recent targets during held-out evaluation. The paper describes its performance there as random and leaves the held-out entries blank. The comparison clarifies what the two evaluation settings contribute. Doing well on an incoming stream is valuable for prediction within that stream, and some of that value can come from simple persistence. Performance on new footage establishes whether a method has learned something useful once that immediate history is unavailable.

The authors also inspect the full training curves. The supplementary material includes out-of-stream curves without smoothing alongside smoothed plots. This matters because the cumulative scores combine periods that may have very different difficulty. An abrupt change of scene can alter the prediction error even if the learner has made steady progress in the long run. A single number captures competition across the full run. The curves show the timing and variation behind it.

What the ablations show

Gradient direction and the role of momentum

The authors begin with a diagnostic comparison of ordinary Adam training on continuous and shuffled input. They examine the gradients calculated on consecutive examples. The magnitude and variance of the gradients show little separation between the two data orders in their analysis. Their directions do. On the continuous stream, consecutive gradients are much more closely aligned. This appears in ScanNet-stream segmentation and, in a supplementary experiment, in Ego4D-stream pixel forecasting.

The paper measures alignment with cosine similarity. In notation, the comparison of gradients at consecutive steps is as follows.

cos(gₜ, gₜ₊₁) = (gₜ · gₜ₊₁) / (‖gₜ‖ ‖gₜ₊₁‖)

Here gₜ is the gradient at step t, and gₜ₊₁ is the gradient at the next step. The subscript t + 1 advances the step index. The dot denotes the inner product of the gradient vectors, and the double bars denote their lengths. The denominator multiplies those lengths, and division removes the effect of overall magnitude. cos is the resulting directional similarity. Greater alignment means that two examples are pushing the weights in similar directions, regardless of how large either gradient is.

The diagnostic suggests why an optimizer that accumulates a running direction might behave differently on video arriving in order. A long stretch with nearly unchanged content can repeatedly push the parameters toward a solution for the local scene. Carrying that direction forward may amplify the effect. The authors offer this as a possible mechanism. Their optimizer comparison tests the practical consequence by varying the training rule.

The sweep combines 8 settings spanning Ego4D-stream pixel forecasting and ScanNet-stream segmentation, the two backbones, and the two positive displacements. RMSprop, in the configuration used here without momentum on gradient direction, performs better in the aggregate than the tested Adam variants. AdamW does better when its momentum is reduced, recovering some of the performance of RMSprop. Because that comparison changes momentum within AdamW, it gives more direct evidence about the effect than comparing different optimizer families alone. RMSprop becomes the default for subsequent experiments and avoids storing an average of past gradient directions.

The Ego4D diagnostic qualifies the interpretation. Consecutive gradients there also align strongly on the continuous stream, but the accompanying loss is less affected than in the ScanNet segmentation example. Gradient similarity is evidence about the character of the data seen by the optimizer. How much the similarity changes end performance depends on the task. The supplement separates the optimizer results by backbone, dataset, and prediction displacement to expose some of that variation.

When to apply an update

The update-interval ablation holds the sequential input in place and changes how many steps contribute before an update. The paper compares intervals of 1, 4, 16, and 64 steps per update and averages over displacements of 1 and 4 prediction steps. More frequent updates generally help the network fit the ongoing scene. Longer intervals often help on validation footage. Because each accumulated set is drawn from contiguous video, the improvement in validation can occur even while nearby gradients remain correlated.

On ScanNet-stream segmentation, the in-stream mean per-frame IoU for ViT is .457 at 1 step per update and .232 at 64 steps per update. On the validation stream, the same network gets .251 at 1, rises to .280 at 16, and reaches .274 at 64. The UNet shows the same broad pattern in segmentation. Its in-stream IoU goes from .420 at 1 to .195 at 64, while its held-out IoU reaches .205 at 16 and .183 at 64. For both networks, the longest tested interval gives away additional adaptation without improving on the best held-out segmentation setting.

ViT update intervals on ScanNet-stream segmentation, held-out mean per-frame IoU

Lengthening the interval helps up to the intermediate setting, where the held-out score peaks.

ViT update intervals on ScanNet-stream segmentation, held-out mean per-frame IoU1 step per update: .2511 step per update.2514 steps per update: .2724 steps per update.27216 steps per update (this paper): .28016 steps per update (this paper).28064 steps per update: .27464 steps per update.274
The numbers
System or settingmean per-frame IoU
1 step per update.251
4 steps per update.272
16 steps per update (this paper).280
64 steps per update.274

For Ego4D-stream pixel prediction, the longest tested interval gives the lowest out-of-stream error for both backbones. The UNet goes from .095 to .042 in held-out average L2 pixelwise distance between 1 and 64 steps per update. Its in-stream values at those settings are .036 and .039. For ViT, the held-out values at the same settings are .076 and .044, while the in-stream values are .035 and .047. The evidence supports choosing an interval according to the balance wanted between the two scores. The methods discussion describes updating every 16 frames, or 0.64s, as a practical compromise across tasks. The numerical interval table reports its columns in steps per update, so its settings are best read in those units.

The paper also shows segmentation predictions for the same held-out clip from runs that differ in update cadence. Runs with frequent updates sometimes predict objects that are likely in the training scene yet absent from the validation view. The longer-interval example transfers better in that illustration. The qualitative comparison gives a concrete sense of what local specialization can look like in a prediction. A category can dominate for a while because it is a good expectation in the current scene, then appear in an unfamiliar scene where that expectation is misplaced.

Learning rate and elapsed time within a video

The paper tries several learning-rate schedules, including constant and decaying rates. The learning rate controls how strongly a gradient changes the weights. In the comparison highlighted by the authors, a cosine schedule with exponent 2.0 improves held-out performance more quickly but substantially hurts adaptation relative to a constant schedule. Both use a linear warmup of 1k steps. The authors favor the constant rate for subsequent experiments because they want the learner to keep responding to incoming experience.

Update interval and learning rate both affect how readily the weights can respond to recent observations. They change different parts of the procedure. Gradient accumulation changes which examples jointly determine a weight movement and how often that movement occurs. Learning-rate decay changes the size of the movement as the run progresses. The fact that both trade adaptation against generalization supports the authors' account of a tension between responsiveness and transfer. The separated plots in the supplement show how the effects vary across the tasks and displacements.

A separate analysis uses position within each source video instead of position within the full training stream. In one ScanNet-stream segmentation run, the authors align the videos by their beginnings and average in-stream IoU by time spent in the current video. Performance improves rapidly over the first minute. The analysis is consistent with the learner gaining useful scene familiarity soon after entering a recording. The authors also plot how many recordings are long enough to contribute at later times. The pool of videos therefore changes along the time axis, making the early rise easier to interpret than a comparison spanning all lengths.

Changing the pretraining objective and testing the input order

During video pretraining, the linear probe indicates that longer prediction displacements give better Kinetics action classification for all the tested objective families. That includes masked future prediction. At 0 displacement, the masked setup is a reconstruction task. A later target asks the features to support prediction beyond the frame in which the input evidence appears. The authors interpret the probe trend as evidence that increasing the offset can help representation learning over the tested range.

At the longest displacement, guided future prediction gives the best top-1 classification score reported for the tested variants. The leading guided setting uses 5% replacement instead of 10%. For masking, the supplementary comparisons favor 50% over 75%, including at longer displacements. Patches of 32x32 perform better than 16x16 for both guidance and masking. These are choices made within the objectives and ranges tested. The probe processes 4 frames, sometimes corrupted or guided, so the authors use it to rank pretraining variants under a shared protocol. Its absolute score has a different meaning from an action classifier evaluated using a full clip of 10s, described as 250 frames in the paper.

The supplementary experiments also run each training recipe with different data orderings. Standard training performs poorly on continuous input. BL with shuffled input can improve further, including in segmentation and depth at 0 displacement. These settings are useful because the standard image reconstruction checkpoint is closely aligned in time with a target at the same instant, yet the video-prepared recipe still helps. The comparison also separates two conclusions that can otherwise be confused. Changing the recipe makes ordered training viable, and giving a strong recipe shuffled examples can still improve its performance.

What replay, weight consolidation, and augmentation add

The replay experiment adds a circular buffer of 10,000 samples to a strong continuous configuration for ScanNet-stream segmentation at a displacement of 1 timestep. The setup writes samples in arrival order and draws them randomly for training. Over 11 hours of wall-clock training, a replay batch size of 4 reaches mean IoU reported as 2% superior to the run without a buffer. Increasing the replay batch size to 16 gives no improvement over the smaller replay batch in that trial. Extra sampled examples increase the training computation, so the authors keep the other experiments free of replay. The evidence concerns one task, one prediction horizon, and the tested compute budget.

The authors also try a simple L2 form of elastic weight consolidation. The learner periodically saves a copy of its weights and penalizes later movement away from that anchor. This helps configurations such as Adam with default momentum, but provides no additional benefit once the authors switch to RMSprop. The comparison suggests that a technique intended to restrain parameter drift can address some of the poor behavior of the original optimizer choice. Its measured value depends on the recipe to which it is added.

Finally, the authors try new random crops and flips at every step to disrupt the similarity between consecutive observations. They find no advantage over applying a consistent transform across a video in the tested case. That experiment is restricted to segmentation with displacement 0, where the target can be transformed in alignment with its input. For a forecast, independently transforming the future target would make part of the error depend on a random operation that the learner could not infer from the input. The result supports a modest conclusion about the augmentation they tested, and the authors leave open the effect of stronger transformations.

Limitations

Limits identified by the authors

The authors deliberately focus on whether a network can make progress under continuous exposure. Their evaluation measures adaptation to the ongoing input and transfer to a held-out stream. It does not track the retention of a defined set of earlier tasks as new ones arrive. A generalization curve can rise even if some abilities acquired in an earlier scene have weakened, because the validation score combines performance across footage. The paper's continual-learning contribution concerns learning under correlated input and the distinction between current fit and transfer.

The experiments also leave explicit memory largely open. The authors mention memory banks, recurrent cells, and longer input context as relevant directions. Their networks consume a short current window, with history carried mainly by weights and optimizer state. A limited replay experiment examines one way to revisit earlier inputs. This leaves the study able to compare update rules with a shared input context, but unable to establish how durable, directly accessible visual memory would affect the same tasks.

Stream construction is another stated constraint. The authors assemble their streams from existing recordings because suitable public footage with uninterrupted, very long duration is scarce. The resulting inputs contain natural continuity inside each original recording and joins between recordings. Long exposure in this benchmark therefore includes transitions between separately filmed experiences. The authors' motivation includes systems learning in daily interaction, but the study measures short-window predictions on prerecorded data.

The paper also acknowledges a remaining advantage for shuffled training. When the stronger recipe itself gets randomized inputs, it performs better in the supplementary comparisons. The headline result is competitive performance against standard shuffled training at batch size 1 on held-out footage, combined with frequently stronger adaptation. A stronger shuffled configuration and a larger randomized batch remain consequential comparison points. Matching one baseline does not close the gap between the two data regimes.

Limits visible in the experimental setup

The central comparison keeps the architecture fixed while changing several features of training together. BL differs from STDL in initialization, optimizer, update schedule, and the presentation of examples. That makes it a practical test of whether a specialized sequential recipe can compete with a familiar randomized recipe. The momentum and cadence studies isolate narrower choices, and the supplementary order comparisons show what happens when a recipe receives a different kind of stream. The headline performance numbers alone cannot assign a share of the improvement to each ingredient.

The amount of exposure that is genuinely new also needs care. The dataset table lists 20h for the ScanNet training stream, while the results section describes in-stream runs of 24 hours. The paper does not spell out how to reconcile those durations for ScanNet. That leaves uncertainty about whether all reported ScanNet exposure consisted of a single visit to each source frame. The distinction matters because a benchmark of never-revisited observations tests a stronger condition than a chronological run over a finite assembled collection.

Similarly, matching frames seen during the online comparison does not imply matching the total resources used to obtain each starting point. The guided checkpoint gets an additional video pretraining stage with large shuffled batches, beginning from ImageNet masked autoencoding. The reported gains describe how the prepared network learns from the stream. They do not measure how much visual competence could be acquired from that stream alone at the same total training cost. The scratch results offer a reference for that question, with a much weaker starting point under the tested setup.

The tasks also differ in what feedback a deployed learner could obtain. Future camera frames provide their own pixel targets as the recording progresses. Segmentation and depth use aligned labels supplied by ScanNet. Those targets let the authors probe distinct aspects of scene understanding with a common training loop. They leave open how a system would get equally dense feedback for annotating what it sees after deployment. The ability to update on an available target and the ability to obtain that target in everyday operation are separate questions.

Color encoding makes task changes straightforward, but it introduces a deliberate choice about the geometry of the loss. Two semantic classes can be close in RGB space because of the palette, irrespective of how similar they are as categories. Depth is represented by a finite set of colors and depends on the depth scaling used before lookup. The segmentation and depth metrics restore the task's own units after decoding. The training gradients still depend on the color mapping. The experiments establish the practicality of a unified interface, while leaving open how different encodings or specialized losses would affect the optimizer comparisons.

Finally, the held-out test measures transfer to unseen recordings from the source dataset. That is a stronger test than continued prediction within the same scene. It covers a narrower question than transfer to a different collection procedure, device, or task. The cumulative average also combines early and late performance, so it cannot tell the reader by itself how the network will behave after a particular change of scene. The paper's per-video analysis, visual examples, and validation trajectories help interpret this aggregate, and the proposed benefits for devices learning through natural interaction remain motivations for further work.

What came after

There are no documented follow-up studies to discuss here. The paper closes with several questions that it leaves to future work, including how longer context or explicit memory would affect learning, and how much of the remaining advantage of shuffled training can be recovered while preserving the order of experience.

Cite

Cite as João Carreira, Michael C. King, Viorica Pătrăucean, Dilara Gokay, Cătălin Ionescu, Yi Yang, Daniel Zoran, Joseph Heyward, Carl Doersch, Yusuf Aytar, Dima Damen and Andrew Zisserman. 2024. Learning from One Continuous Video Stream. IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings - IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.1109/cvpr52733.2024.02716 · arXiv 2312.00598

@inproceedings{carreira2024learning,
  title = {{Learning from One Continuous Video Stream}},
  author = {João Carreira, Michael C. King, Viorica Pătrăucean, Dilara Gokay, Cătălin Ionescu, Yi Yang, Daniel Zoran, Joseph Heyward, Carl Doersch, Yusuf Aytar, Dima Damen and Andrew Zisserman},
  booktitle = {IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings - IEEE Computer Society Conference on Computer Vision and Pattern Recognition/Proceedings},
  year = {2024},
  doi = {10.1109/cvpr52733.2024.02716},
  eprint = {2312.00598},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.1109/cvpr52733.2024.02716}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/carreira-2024-learning-one-continuous-video-stream/