arXiv:2611.03729eess.IVNov 2026

Manuscript Offprint

arXiv:2611.03729

Learning to read residual images for single-pixel photography

Hongjun An, Shuaizhe An, Tong Tian, Zhe Sun

Abstract

Continuous video scales in cost with camera count, resolution and recording duration, yet many monitoring tasks seek events rather than complete images and can operate on a compact single-pixel measurement stream. Recovering a chosen interval as video is then desirable, but at 0.24% of the pixel count the scene correlation image looks like noise and per-clip optimization takes minutes. Correlating the residual of an estimate with the coding patterns nevertheless gives a residual image, the gradient of a centered measurement loss. Lifted through a pretrained video decoder, its agreement with the true error exceeds that of control decoders. Video-latent inversion (VLI) then outperforms frame-wise image-latent reconstruction at 1,000 bucket values. Measurement-Gradient-Conditioned Video Flow (MGV-Flow), trained once to read the lifted residual image with preceding frames, reconstructs five frames in 1.55 s at 22.9 dB median PSNR, against 398 s and 18.1 dB for VLI, with the largest gains in high-motion scenes. Directional fidelity ranks 30 coding configurations and selects one needing a third fewer bucket values. On a physical system, MGV-Flow outperforms per-frame reconstruction without retraining. A sliding window over the bucket-value stream yields 3.2 frames per second on one RTX 4090 and, in theory, 20 frames per second on a data-centre accelerator. Demonstrations are available at https://cavedweller509.github.io/MGV-Flow.

Keywords: Single-pixel photography, Single-pixel imaging, Residual image, Video latent, Flow matching, Optical sensing

1 Introduction

Recording the world as continuous video becomes costly at scale, because every additional camera, every gain in spatial resolution, and every additional hour of operation adds to the data that must be transmitted and stored. Many monitoring and autonomous tasks, however, seek events, states, or anomalies rather than complete images and can operate directly on compressed or single-pixel optical measurements [1–6], so a sensing system can keep a compact measurement stream during routine operation and recover a chosen interval of video only when a person needs to inspect it (Fig. 1a).

Single-pixel imaging records such a stream by modulating the light from a scene with a sequence of known spatial patterns and integrating the modulated light on one detector into a single number per pattern, termed a bucket value [7–10]. Compressive sensing, deterministic coding, and learned reconstruction have extended recovery under restricted budgets [11–17], and dynamic systems have carried single-pixel acquisition from static scenes to video [18–22]. In the setting studied here, a five-frame clip at 856×480856 \times 480 pixels is recorded with 1,000 bucket values per frame, about 0.24% of the pixel count, and at this rate correlation imaging, which weights each pattern with its mean-subtracted bucket value and sums the weighted patterns [23–25], yields a map that looks like noise (Fig. 2b, second column). The scene must therefore be recovered from measurements that cannot reveal it, and quickly enough that reconstruction does not cancel the benefit of recording so little.

Although the measurements cannot show the scene, they can test any estimate of it. For an estimated video x^\hat{x}, the known patterns define a linear forward operator AA, and the measurement residual r=Ax^−yr = A\hat{x} - y between the predicted and acquired bucket values is directly computable. Under the noiseless model y=Ax∗y = Ax^{*} considered here, r=−A(x∗−x^)r = -A(x^{*} - \hat{x}) is the projection into measurement space of the true error x∗−x^x^{*} - \hat{x}, which is the correction that the estimate needs. Applying the same correlation to the residual instead of the bucket values carries this projection back to image space, and we call the result the residual image (Fig. 2a). With the normalization given in Methods, Section 4.1, it is

(gx)t=1TMHW∑m=1Mr~t,mPm,(1)(g_{x})_{t}=\frac{1}{T M H W}\sum_{m=1}^{M}\tilde{r}_{t,m}P_{m}, \tag{1}

where (gx)t(g_x)_{t} is the map for frame tt, TT is the number of frames, MM the number of patterns per frame, HH and WW the frame dimensions, PmP_m the mmth pattern, and r~t,m\tilde{r}_{t,m} the residual of frame tt and pattern mm after subtraction of the mean residual of that frame. For the linear model, gxg_x is exactly the gradient of the mean-centered squared measurement residual with respect to the estimated frames, a relation that has driven iterative X-ray single-pixel tomography [26] and links correlation with gradient descent in correlation imaging [27]. Like the scene correlation image, however, the residual image looks like noise (Fig. 2b, third column).

As a weighted sum of the M patterns, the residual image varies within each frame along at most M of the HW pixel directions, so the remaining components of the true a Single-pixel recording

Figure

b Reading residual images

One bucket value per coding pattern 1,000 coding patterns per frame 0.24% of the 410,880 pixels of a frame

c Key results

Figure

Fig. 1 Reading residual images for single-pixel photography. a, A digital micromirror device (DMD) displays binary coding patterns on the image of the scene, and a single-pixel detector records one bucket value per pattern. At 1,000 bucket values per frame, 0.24% of the pixel count, traditional correlation imaging (TCI) gives a noise-like scene correlation image (rendered schematic). b, The measurement residual rr between the bucket values Ax^A\hat{x} predicted from the current estimate x^\hat{x} by the forward operator AA and the acquired values yy, centered within each frame (tilde) and correlated with the coding patterns PmP_m, is the residual image gxg_x. The transposed Jacobian of a pretrained video decoder DD lifts it to gzg_z, whose decoder response resembles the true error. Measurement-Gradient-Conditioned Video Flow (MGV-Flow) reads it with the history frames for five Euler steps. Badges 1 to 3 mark the three contributions. c, Key results. (1) Peak signal-to-noise ratio (PSNR) of a pixel-space U-Net (UNet), frame-wise image-latent reconstruction (GILM) and video-latent inversion (VLI). (2) Time per five-frame clip. (3) Directional fidelity against PSNR for 30 coding configurations.

error leave no trace in the bucket values and can only be supplied by prior knowledge of what natural video looks like. Latent representations hold such knowledge in a compact variable and a decoder [28–30], and they have been used to impose single-pixel measurements on image latents in GILM [17], to couple optical acquisition with a learned latent space [31], and to recover evolving physical fields from single-pixel data [32]. For a video decoded as x^=D(z)\hat{x} = D(z) from a latent variable zz, the chain rule lifts the residual image into the latent space as the lifted residual image gz=JD(z)⊤gxg_z = J_D(z)^\top g_x, where JD(z)J_D(z) is the Jacobian of the decoder DD (Fig. 2a). The change that a step along −gz-g_z produces in the decoded video, the decoder response JD(z)(−gz)J_D(z)(-g_z), is spatially structured where the residual image is not (Fig. 2b, fourth column), and comparisons within spatial-frequency bands against decoders with re-initialized or shuffled weights show that this structure comes from the pretrained weights rather than from smoothing, with a mean band coherence with the true error of 0.076 against 0.029 for the residual image and at most 0.021 for the control decoders (Fig. 2c). The decoder response adds no information beyond the measurements and the current estimate, since it is the measurement-derived direction reshaped by the local Jacobian of the pretrained decoder, and its closer agreement with the true error indicates empirically that this reshaping favors the kinds of change that natural video exhibits in the components the measurements leave undetermined. On this basis we formulate joint video-latent single-pixel reconstruction, which recovers the frames of a clip together rather than one by one, and refer to it as video-latent inversion (VLI).

Like other untrained and per-instance methods [17, 33–36], VLI fits the measurements anew for every clip, and at about 80 s per frame a 100-frame interval would take more than two hours. At 0.24% sampling, many videos also agree with the measurements almost equally well, so a closer fit to them does not identify the scene. Flow-matching and temporal models learn video dynamics from data and generate a video by integrating a learned velocity field from noise in a few steps [20, 32, 37–39], posterior-guidance methods insert the measurement gradient into diffusion or flow sampling as a prescribed correction at every step, also in latent spaces and for video [40–46], diffusion priors have begun to enter single-pixel imaging [47], amortized conditional flow models have been trained once to solve entire families of inverse problems without per-instance optimisation [48, 49], and learned inverse solvers have shown that measurement gradients can serve as network inputs [50, 51]. We introduce Measurement-Gradient-Conditioned Video Flow (MGV-Flow, Fig. 1b), a video-latent flow model that reads the lifted residual image together with the frames preceding the target interval, so that the preceding frames indicate what kind of video is plausible while the residual image indicates what was actually measured. Because the model predicts the complete velocity instead of adding the feedback with a fixed weight, it is trained once and reconstructs each new clip in a few integration steps.

When a model reads a direction, the value of a coding pattern lies in how accurately the resulting feedback points toward the true latent correction. Pattern families, scales, and acquisition orders have been chosen, adapted, and learned to improve image recovery [13, 14, 52–58], and measurements have been selected by reducing speckle redundancy or by expected information gain [59, 60], but these criteria concern the image rather than the feedback read in a latent representation. We therefore propose directional fidelity, the cosine of the angle between −gz-g_z and the direction from the current latent to the latent of the ground-truth video (Fig. 2d), and examine how pattern family, grain size (the width of one pattern cell), measurement count, and latent representation shape it and whether it predicts reconstruction quality. Because it requires the ground truth, directional fidelity is an offline criterion for choosing coding configurations, and we test it by calibrating on some video clips and evaluating on disjoint ones.

Here we show that a single-pixel photography system can learn to read residual images (Fig. 1c). Joint inversion of a clip in the video latent space outperforms frame-wise image-latent reconstruction at low measurement counts and needs less computation and memory. MGV-Flow reconstructs a five-frame clip in about a second instead of minutes and with higher quality than per-clip inversion, even though inversion fits the measurements more closely, and measurements of another video lower its quality, so the model uses the measured scene. Run as a sliding window over the continuous stream of bucket values, it sustains 3.2 frames per second on one RTX 4090 with a reconstruction delay of 1.55 s, and in theory a single data-centre accelerator would reach 20 frames per second with a delay of about a quarter of a second. Its average benefit over a flow model given only the preceding frames is small, however, and the measurements help mainly in high-motion scenes, where the preceding frames leave the future most uncertain. Directional fidelity ranks coding configurations by the quality of physics-only steps without running it and selects a configuration that needs one third fewer measurements than a median-ranked one. These analyses use simulated measurements, and on a physical single-pixel system with an accurate video history, MGV-Flow runs without retraining and outperforms per-frame reconstruction of the same frames. Correlation imaging forms an image at normal sampling rates, but at extreme compression the same correlation applied to the residual returns instead as feedback that a generative model learns to read.

References (70)