Learning Scene-Dependent Camera Degradations from Renderer Counterfactuals

Super-resolution models, which turn a small blurry photo into a larger sharp one, are almost always trained on made-up pairs: take a clean high-resolution photo, degrade it with a hand-written recipe of blur, resizing, noise and compression, and teach the network to undo it. The recipe treats every pixel the same. Real cameras do not. A background wall is defocused while the subject is sharp, and a moving car is smeared while the road beside it is not. Both effects follow directly from scene depth and motion. Clean training pairs that contain these depth- and motion-dependent effects cannot be captured with a real camera, because two physical cameras can never share one viewpoint. A 3D renderer can produce them easily. It can render the same frame once through an ideal pinhole and once through a thin lens with a finite shutter, with pixel-exact alignment, and it can export the depth and motion of every pixel along with the images.

We propose to use such renderer pairs as supervision for a small, single-pass degradation network. The network takes a clean image plus a depth map and a motion map and outputs a realistically degraded low-resolution version. After training, it is applied on the fly to real high-resolution photographs, using depth and motion estimated from those photographs, to produce training pairs for any super-resolution model. The renderer supplies ground truth that real capture cannot. The super-resolution model still trains on real photographic content, which avoids the "plastic" look of game assets. Because degradation takes one forward pass, there is none of the per-sample cost of generative degradation models. The central question the experiments answer is whether geometry-dependent degradation closes a measurable part of the gap between synthetic training and real-world testing, and whether learning it from renders beats simply writing it down analytically.

Core Claim

Current degradation pipelines for real-world super-resolution fall into two families, and both handle scene geometry poorly. The first family is hand-built and spatially uniform. Real-ESRGAN applies blur, resize, noise and JPEG twice and adds sinc filters to imitate ringing. It is the de facto standard, but one kernel is applied to the whole frame. The second family is learned from unpaired real images. The high-to-low GAN of Bulat et al., the nested cycles of CinCGAN, and the latent flow-matching trajectories of DegFlow fall here. These models can in principle learn non-uniform effects, but they have no access to the depth or motion that causes them. They pay for adversarial or multi-step training and sampling. They can also hallucinate, and Bulat et al. report failures on extreme poses and blurs. DegFlow still needs a separate bicubic downsampling step after generating degradation appearance.

The work closest to ours in spirit is Cheng et al.. They use depth as a scale prior and learn a degradation network inside a single image. That requires slow per-image optimization at test time and assumes the same textures recur at several depths.

Our claim is that degradation which depends on scene geometry can be learned once, from exactly aligned renderer pairs, as a cheap deterministic-plus-noise operator conditioned on depth and motion. Super-resolution models trained on real photographs degraded this way should then generalize better to real low-resolution captures than models trained on uniform recipes. The improvement should be concentrated in image regions where predicted defocus or motion is large.

Graphics buffers have been used before, but for other purposes. RDG feeds depth, normals and motion vectors from the renderer into a real-time upscaler for rendered frames and never confronts real cameras. Play and Learn and PUG harvest clean labels and images from game engines but render without camera degradations. As far as this file shows, no one has used renderer counterfactual pairs to teach a degradation model that is then transferred to real photographs.

Research Program

Paired data. We first build a paired corpus in Blender Cycles, using indoor and outdoor scenes of the kind in the Cycles render benchmark of RDG. For each camera pose we render three images. The first is a clean pinhole image at high resolution. The second is a degraded image at low resolution, rendered with randomized aperture, focus distance, focal length and shutter interval, so that defocus, occlusion-boundary bleeding and motion smear are physically correct rather than approximated. The third is a set of buffers: depth, per-pixel motion, and the sampled camera parameters.

The point of rendering rather than post-filtering is the edges. At depth discontinuities a defocused background partially leaks around a sharp foreground. Simple depth-indexed blur gets this wrong, and the renderer gets it right by construction. Sensor noise, image-signal-processor (ISP) tone mapping and compression are not simulated physically. They are appended afterwards by the existing Real-ESRGAN recipe, since rendering adds nothing there.

Degradation network. Next we train the network. Its inputs are the clean image, a depth map, a motion map and the camera parameters. Its output is the low-resolution degraded image, produced in a single forward pass with downsampling built into the network rather than added as a separate bicubic step. It is a small convolutional model, sized to cost a few milliseconds per image so that pairs can be generated inside the super-resolution training loop.

Two design choices guard against learning renderer quirks. First, the network predicts spatially varying blur kernels plus a residual, rather than raw pixels. This keeps its outputs close to physical blur and limits how much it can hallucinate. Second, during training the network sees estimated depth and motion, computed from the clean render by an off-the-shelf monocular depth and optical-flow estimator, as well as the exact buffers. It therefore learns to tolerate the noisy geometry it will receive on real photographs.

Transfer to real photographs. At transfer time, we take real high-resolution photographs from DIV2K and Flickr2K, the same sources Real-ESRGAN uses, and estimate depth for each. Because these are single stills, motion is either sampled from plausible camera-shake and object-motion fields or set to zero. We then degrade on the fly. The super-resolution model is fixed in architecture and loss, so the only variable is the degradation source.

Baselines

The naive reference point is the classical first-order bicubic pipeline, which every challenge since NTIRE 2017 has shown to fail on real photos. We include it to place all other results on a scale.

The strongest practical competitor is the second-order Real-ESRGAN pipeline applied to the same DIV2K and Flickr2K photos. It is the standard for training models on purely synthetic data. On RealSR-Canon at ×4 it reports a NIQE of 4.53, against 6.77 for ESRGAN. We retrain it ourselves rather than copying numbers, using the same generator, iteration count and tuning budget as our method. Beating it means lower NIQE and higher MANIQA and CLIPIQA on RealSR and on the KwaiSR wild split. It also means higher PSNR and SSIM on the paired RealSR test images, with the full-reference gain localized in high-defocus regions.

As the strongest learned degradation model we use DegFlow. It reports nearly 0.5 dB PSNR over the previous best method on RealArbiSR at ×3.5. We found no reported absolute PSNR or generation runtime for it on Lacuna, so we will measure both under identical conditions. To show that our gains survive a stronger restorer, we also train MeanSR, a one-step model, with our degradations in place of its default Real-ESRGAN pipeline. It reports a MANIQA of 0.5486 on RealSR against 0.4574 for CTMSR, at 26.39 ms per image. Beating MeanSR means exceeding 0.5486 with an unchanged MeanSR architecture.

Three ablations isolate the key ingredients. In the first, an analytic geometry-aware pipeline replaces the learned network with layered thin-lens blur indexed by estimated depth plus motion blur along sampled flow, followed by the Real-ESRGAN noise and JPEG stages. This tests whether learning from renders adds anything beyond physics written by hand. In the second, a render-content variant trains the super-resolution model directly on degraded renders. This tests whether keeping real photographic content matters. The third ablation removes the depth input. It tests whether geometry is doing the work, or whether the network merely learned a better uniform kernel.

Why not just…?

Why not just run Real-ESRGAN's pipeline on clean renders, or on real photos as now? Its degradations are uniform across the frame, so they cannot produce sharp-subject, blurred-background images. Cheng et al. show that depth-dependent scale is exploitable even within one image: at ×2 on NYU Depth V2 they report a NIQE of 4.824 versus 5.868 for RCAN. That evidence is indirect. The direct test is our comparison binned by predicted defocus. If Real-ESRGAN matches us in high-defocus regions of RealSR, our premise is wrong.

Why not just write depth-dependent blur analytically, with no renderer and no learning? This is the most serious threat, and we treat it as a co-equal hypothesis rather than a straw man. Analytic layered blur is cheap and may capture most of the benefit. Its known weakness is occlusion boundaries and the errors of estimated depth, both of which the renderer pairs model explicitly. The analytic ablation decides the question. If it matches the learned operator within noise on RealSR and KwaiSR wild, we will report that geometry-aware degradation is what matters and that the renderer was unnecessary. That is still a useful finding about the source of the gap.

Why not just learn degradation from unpaired real images with a GAN or flow model? These models learn the real distribution directly, which is attractive. However, Bulat et al. report about a 10% failure rate and hallucinated features. CinCGAN assumes uniform degradation across the dataset. DegFlow requires training an autoencoder and solving an ordinary differential equation for every sample. Without depth, none of them can tell defocus from texture. We compare against DegFlow on fidelity and on degradation cost per pair. We also measure the realism of the generated low-resolution images directly, with Fréchet Inception Distance (FID) to real RealSR low-resolution crops, as Bulat et al. did on Widerface.

Why not just fine-tune on real paired data such as the RealSR training split? Where real pairs exist this is a strong option, and we include it as an upper reference. But real pairs come from a few cameras and are limited by parallax and alignment, as Real-ESRGAN argues. The cross-camera tests below check whether a model fine-tuned on one camera transfers worse than ours.

Proposed Experiments

The first experiment compares degradation sources on real benchmarks. Every source trains the same generator on DIV2K and Flickr2K under an identical budget. We evaluate on RealSR at ×2, ×3 and ×4, using PSNR and SSIM on its optical-zoom pairs and NIQE and MANIQA without reference. We evaluate on the KwaiSR wild split with MUSIQ and CLIPIQA; OSEDiff reports 68.77 MUSIQ there in the NTIRE 2025 KwaiSR study, which serves as an upper anchor from a much larger model. We evaluate on RealArbiSR at non-integer scales against DegFlow. Because no-reference scores are known to disagree with fidelity and perception, as the KwaiSR study and MeanSR both document, we draw no conclusion from no-reference scores alone.

The decisive mechanistic check bins RealSR test pixels by predicted defocus, using estimated depth and the recorded focus setting, and reports the PSNR gain over Real-ESRGAN in each bin. The method predicts gains that grow with defocus and vanish in in-focus regions. A uniform gain would mean we merely found a better global kernel. A second check uses NYU Depth V2, where sensor depth is available, to compare transfer with measured versus estimated depth. This shows how much depth-estimation error costs. A third check holds out two of the Cycles test scenes to measure how well the degradation network generalizes across scenes before it ever sees a real photo.

On overhead, we report milliseconds and memory per generated pair for our network, the Real-ESRGAN pipeline, and DegFlow, all on the same GPU. We also report the one-time rendering cost. PUG reports about one second per 512×512 frame for its Unreal Engine pipeline, so a corpus of tens of thousands of frames is a bounded, one-off cost. That contrasts with recurring generative synthesis such as the 62 hours on 8 GPUs that GC-DDPM needed for its character data.

The proposal fails cleanly if three conditions hold together: the analytic ablation matches the learned operator, the defocus-binned gains are flat, and RealSR fidelity does not beat retrained Real-ESRGAN. Each of these outcomes is informative about where the synthetic-to-real gap actually lives.