Deep Image Prior

From HandWiki
Revision as of 11:35, 24 October 2022 by JOpenQuest (talk | contribs) (link)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Deep Image Prior is a type of convolutional neural network used to enhance a given image with no prior training data other than the image itself. A neural network is randomly initialized and used as prior to solve inverse problems such as noise reduction, super-resolution, and inpainting. Image statistics is captured by the structure of a convolutional image generator rather than by any previously learned capabilities.

Method

Background

Inverse problems such as noise reduction, super-resolution, and inpainting can be formulated as the optimization task [math]\displaystyle{ x^{*} = min_x E (x;x_0 )+R(x) }[/math], where [math]\displaystyle{ x }[/math] is an image, [math]\displaystyle{ x_0 }[/math] a corrupted representation of that image, [math]\displaystyle{ E(x;x_0 ) }[/math] is a task-dependent data term, and R(x) is the regularizer. This forms an energy minimization problem.

Deep neural networks learn a generator/decoder [math]\displaystyle{ x=f_\theta (z) }[/math] which maps a random code vector [math]\displaystyle{ z }[/math] to an image [math]\displaystyle{ x }[/math].

The image corruption method used to generate [math]\displaystyle{ x_0 }[/math] is selected for the specific application.

Specifics

In this approach, the [math]\displaystyle{ R(x) }[/math] prior is replaced with the implicit prior captured by the neural network (where [math]\displaystyle{ R(x)=0 }[/math] for images that can be produced by a deep neural networks and [math]\displaystyle{ R(x)=+\infin }[/math] otherwise). This yields the equation for the minimizer [math]\displaystyle{ \theta^* = argmin_\theta E(f_\theta(z);x_0) }[/math] and the result of the optimization process [math]\displaystyle{ x^* = f_{\theta^*}(z) }[/math].

The minimizer [math]\displaystyle{ \theta^* }[/math] (typically a gradient descent) starts from a randomly initialized parameters and descends into a local best result to yield the [math]\displaystyle{ x^* }[/math] restoration function.

Overfitting

A parameter θ may be used to recover any image, including its noise. However, the network is reluctant to pick up noise because it contains high impedance while useful signal offers low impedance. This results in the θ parameter approaching a good-looking local optimum so long as the number of iterations in the optimization process remains low enough not to overfit data.

Applications

Denoising

The principle of denoising is to recover an image [math]\displaystyle{ x }[/math] from a noisy observation [math]\displaystyle{ x_0 }[/math], where [math]\displaystyle{ x_0 = x + \epsilon }[/math]. The distribution [math]\displaystyle{ \epsilon }[/math] is sometimes known (e.g.: profiling sensor and photon noise[1]) and may optionally be incorporated into the model, though this process works well in blind denoising.

The quadratic energy function [math]\displaystyle{ E(x,x_0)=||x-x_0||^2 }[/math] is used as the data term, plugging it into the equation for [math]\displaystyle{ \theta^* }[/math] yields the optimization problem [math]\displaystyle{ min_\theta ||f_\theta (z)-x_0||^2 }[/math].

Super-resolution

Super-resolution is used to generate a higher resolution version of image x. The data term is set to [math]\displaystyle{ E(x;x_0)=||d(x)-x_0||^2 }[/math] where d(·) is a downsampling operator such as Lanczos that decimates the image by a factor t.

Inpainting

Inpainting is used to reconstruct a missing area in an image [math]\displaystyle{ x_0 }[/math]. These missing pixels are defined as the binary mask [math]\displaystyle{ m \in \{ 0,1 \} ^ {H \times V} }[/math]. The data term is defined as [math]\displaystyle{ E(x;x_0)=||(x-x_0) \odot m||^2 }[/math] (where [math]\displaystyle{ \odot }[/math] is the Hadamard product).

Flash-no-flash reconstruction

This approach may be extended to multiple images. A straightforward example mentioned by the author is the reconstruction of an image to obtain natural light and clarity from a flash-no-flash pair. Video reconstruction is possible but it requires optimizations to take into account the spatial differences.

Implementations

References

  • Ulyanov, Dmitry; Vedaldi, Andrea; Lempitsky, Victor (30 November 2017). "Deep Image Prior". arXiv:1711.10925v2 [cs.CV].