Paper commentary
Deep Image Prior
Deep image prior restores images without any training on image datasets
- Problem Convolutional networks are usually credited with learning image priors from large datasets, but that explanation is incomplete.
- Method Deep image prior fits a randomly initialized generator to one degraded image, not a dataset. The random input stays fixed, and early stopping limits the fit.
- Results On inpainting with random masks dropping 50% of pixels, it scores 39.16 on House versus 34.58 for convolutional sparse coding.
Learned priors versus network structure
Convolutional networks are now the usual choice for denoising, single-image super-resolution and several other reconstruction problems. The common explanation is that such networks learn realistic image statistics from large collections of example images. That explanation is incomplete, since a classifier that generalizes well on natural images can also fit the same images when their labels are randomized, which suggests that the network structure must match the structure of the data.
The question taken up here is narrower: how much of the image statistics needed for restoration is already present in the structure of a generator network before any parameter has been trained. Restoration is a useful test because the degraded observation leaves information missing, so some prior has to supply it.
Fitting a generator to one degraded image
A generator network is treated as a parametric map from a code to an image, and here the code is a fixed random tensor, so the image is determined by the weights alone. No network weight is trained on a dataset; the weights start from random values and are fitted to one observed image.
The method replaces an explicit regularizer in an energy minimization problem with the network parametrization. The observed image enters only through the data term, so the task supplies the observation model while the prior comes from the architecture.
Optimization runs gradient descent from random initial parameters, and the fitting uses the ADAM optimizer implemented in PyTorch. Each fitting run needs repeated forward and backward passes through a deep network, so one image takes several minutes. Since the observed image is the only empirical input to the process, the restored image depends on that input and on the network design.
Most experiments use a U-Net-like hourglass network with skip connections, in which the code and the output share spatial dimensions and the network has several million parameters. The code z is kept fixed in these experiments, although optimizing it is possible. The authors regard the fixed network as a handcrafted prior, and the fitted network as a parametrization that carries low-level image statistics without any dataset-based training.
Why the structure resists noise
A network with several million parameters can in principle fit any image, including random noise, so the architecture would seem to impose no restriction. The authors argue that the architecture changes how gradient descent moves through the solution space, and that the path favors natural-looking images.
To test this, the network is fitted to four targets with the squared error data term: a natural image, the same image with added noise, the image with randomly permuted pixels, and white noise. The energy falls quickly for the first two targets and slowly for the other two. Although the network can eventually fit noise, it does so reluctantly, so the authors describe it as resisting noise while passing signal easily.
Because of this behavior, the fitting can be stopped early. Limiting the number of iterations keeps the weights close to their random start, so the output is restricted to the images such a network reaches from there. For noisy targets the optimization path may pass close to the clean image before the noise is fitted, so stopping at that point can recover a good result.
Denoising results
The denoising formulation reuses the squared error data term against the noisy image, and no noise model is supplied. Averaging the restored images from the last iterations with an exponential sliding window raised the score to 30.43, and averaging over two optimization runs raised it to 31.00. CBM3D and non-local means, which need no pretraining, scored 31.42 and 30.26 on the same benchmark.
For real-world non-Gaussian noise, a benchmark from prior work is used with the architecture and hyper-parameters of the JPEG setting.
The sigma 25 scores and the real-noise scores come from different benchmarks, so they should not be compared directly.
Super-resolution results
Many high-resolution images reduce to the same low-resolution image, so the prior is needed to choose a plausible one among them. The downsampling operator combines a Lanczos2 low-pass filter with resampling, implemented as a fixed convolution, so gradients flow through it.
The learned methods keep higher averages in these tables, while the method scores above the non-trained bicubic and TV baselines. Visually the authors judge the results close to learned methods trained with an MSE loss, but the method cannot hallucinate fine high-resolution detail, since it uses no high-resolution images. Compared with no prior and with the TV prior, the deep prior avoids ringing and the cartoon effect.
Inpainting results
In inpainting the data term is restricted to observed pixels through a binary mask:\n\\[ E(x;x_0)=\\|(x-x_0)\\odot m\\|^2 \\] This energy does not depend on the missing pixels, so optimizing pixel values directly would leave them at their initial values, and the generator parametrization is what fills them.
For random masks that drop 50% of pixels, the method is compared with convolutional sparse coding, whose run used the high-frequency part of the corrupted image and a dictionary built from that input. The House column gives 34.58 for the comparison row and 39.16 for the method, and Montage gives 28.05 and 34.54. The authors' visual comparison shows that the method keeps more accurate fine detail.
For large holes the method is compared with the learning-based Global-Local GAN of [28]. On text removal the method is compared with Shepard networks [47], and the authors report that its results have no halo artifacts.
Natural pre-images and activation maximization
The natural pre-image method asks which natural images a network maps to the same representation as a given image. Restricting the search to natural images needs a prior, which the original method takes to be the TV norm, while learned inverters from [15] are trained on examples and may be biased. The deep image prior replaces the TV term without learning from data, and the authors say it is handcrafted in the same way.
On AlexNet layers from conv1 to fc8, the reconstructions are compared with the TV prior and with the learned inverter of [15]. For fc6 and fc7 the TV reconstructions remain noisy, while the deep prior gives images that are often still interpretable. The authors also invert VGG-19 layers and report an improvement over the TV prior there.
Activation maximization searches for an image that maximizes a chosen output of the network:\n\\[ x^* = \\arg\\max_x \\Phi(x)_m \\] For the fc8 layer of AlexNet, the deep image prior gives more natural and interpretable images than the TV prior, while for VGG-16 the difference is less clear. Figure 18 shows the same method applied to many ILSVRC class labels on AlexNet.
How architecture and inputs change the prior
In the inpainting comparison, deeper random encoder-decoders gave better results than shallow ones. The authors suggest that skip connections, which help recognition tasks such as semantic segmentation, are detrimental for the deep image prior in these comparisons. This is a suggestion drawn from the authors' comparisons rather than a tested general rule.
The meshgrid input helped large-hole inpainting but not the other tasks. Noise added to the input during fitting was found to slow optimization, but the network still reached zero loss given enough steps.
Optimization sometimes destabilizes, with a sharp loss increase and blur, and the method returns to the parameters of the previous iteration when the loss change exceeds a threshold. The default super-resolution network uses five levels with 128 filters each, and the 8x setting changes the input noise and the iteration count.
Enhancement and flash–no-flash restoration
For enhancement the fitting targets the noisy image itself and is stopped at a chosen iteration to give a coarse image. Early in the fitting the coarse image misses object shapes, and later it adds unwanted high-frequency detail, so the stopping time matters.
For a flash and no-flash pair, the denoising formulation is used with the flash image as the input in place of the random code. The authors describe the result as a non-linear generalization of guided image filtering, and they say it avoids leaks of lighting patterns from the flash image better than joint bilateral filtering.
Limitations
The authors name slowness and the inability to match problem-specific methods as the two main practical limitations. Each image needs its own fitting run of several minutes, while a feed-forward network trained for a given application would be faster and often better.
Continued optimization eventually overfits the degraded input, as the 50K iteration result of the JPEG example shows, so the iteration count acts as a regularizer. The fixed iteration counts per task, such as 1800 for denoising and 2000 for the default super-resolution network, are part of each setup.
The validation covers blind denoising of nine colored images at sigma 25, one real-noise benchmark, super-resolution on Set5 and Set14, and inpainting of 50% of pixels. For highly semantic large-hole inpainting such as faces, the authors do not expect the method to work. Against learned methods such as LapSRN on Set5 and Set14, the averages favor the trained networks.
What the results suggest about priors
The authors argue that convolution imposes self-similarity on generated images, since the same filters act across the whole visual field. Hourglass networks with skip connections impose self-similarity at several scales, which the authors believe suits natural images.
The authors conclude that hand-crafted architectures can correspond to good hand-crafted priors, and that learning builds on this basis. Inverse scale-space methods are driven by TV, while this prior is not, and the zero-shot super-resolution method of [1] exploits self-similarity across scales, whereas the deep prior works within a scale.
Paper info
- Authors
- Dmitry Ulyanov, Andrea Vedaldi, Victor Lempitsky
- Venue
- arXiv · Preprint
- First published
- 2017-11-29
- Added
- 2026-11-13
- Updated
- 2020-5-17
- Version
- v4
- arXiv
- 1711.10925
- DOI
- 10.1007/s11263-020-01303-4
- Category
- cs.CV · stat.ML
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Dmitry Ulyanov, Andrea Vedaldi, Victor Lempitsky (2017). Deep Image Prior. arXiv:1711.10925v4. https://doi.org/10.1007/s11263-020-01303-4
BibTeX
@article{ulyanov2017deep,
title = {{Deep Image Prior}},
author = {Dmitry Ulyanov and Andrea Vedaldi and Victor Lempitsky},
year = {2017},
eprint = {1711.10925},
archivePrefix = {arXiv},
doi = {10.1007/s11263-020-01303-4},
url = {https://arxiv.org/abs/1711.10925v4}
}