This repository contains the code implementation for the fast analytical deep image priors (ADP) method presented in the paper "Fast Inexact Bilevel Optimization for Analytical Deep Image Priors" (M. S. Salehi, T. A. Bubba, Y. Korolev), accepted for presentation at the 10th International Conference on Scale Space and Variational Methods in Computer Vision (SSVM). This method leverages an analytical, explainable framework for Deep Image Priors (DIP) as a black box. It addresses the issue of extensive computations and slow behavior of traditional ADP by using the Method of Adaptive Inexact Descent (MAID) to solve the corresponding bilevel problem adaptively and cost-efficiently.
Fast Inexact Bilevel Optimization for Analytical Deep Image Priors (Accepted for presentation at SSVM 2025)
Mohammad Sadegh Salehi, Tatiana A. Bubba, Yury Korolev,
The code implements the Analytical Deep Priors (ADP) approach for deblurring and semi-blind deblurring of coloured images. This framework involves solving a bilevel optimisation problem, where the lower level represents variational regularisation, and the upper level incorporates MSE and Sobolev regularisation. We use Total Variation (TV) as the lower-level regulariser and model the parameters as convolutional kernels. To compare the efficiency with the pure ADP method (Arndt, 2022), we also provide 1D examples.
-
Clone the repository:
git clone git@github.com:MohammadSadeghSalehi/Analytical-Deep-Priors.git cd Analytical-Deep-Priors
-
Install the necessary dependencies:
pip install numpy matplotlib scikit-image torch deepinv tqdm
- Note: Ensure you have Python 3.6 or higher installed.
- The following dependencies are required:
torch
,deepinv
,numpy
,matplotlib
,scikit-image
,PIL
,tqdm
.
-
Running the main script:
python ADP.py
-
Modifying parameters:
-
The
ADP.py
script contains parameters that can be adjusted to control the reconstruction process. These include:noise_level
: The level of noise in the input image.size_x
andsize_y
: The size of the input image.channels
: Determines if the image is coloured or grayscale.iterations
: The number of iterations for the reconstruction.upper_iter
: Upper-level optimisation iterationsalpha
: step sizeeps0
: Starting accuracy of MAIDsetting
: Type of blur (motion, Gaussian, disc)threshold
: Stopping criterion of MAID
-
Adjust these parameters within the
ADP.py
file to experiment with different reconstruction settings.
-
-
Input Images:
- The images are located in the image directory and are indexed once you run ADP.py. Replace this file with your desired input image index.
-
Output images:
- The reconstructed images are saved in the same directory as the script.
How to cite
@misc{salehi2025fastinexactbileveloptimization,
title={Fast Inexact Bilevel Optimization for Analytical Deep Image Priors},
author={Mohammad Sadegh Salehi and Tatiana A. Bubba and Yury Korolev},
year={2025},
eprint={2502.09758},
archivePrefix={arXiv},
primaryClass={math.OC},
url={https://arxiv.org/abs/2502.09758}