Skip to content

yunshihuang/unfoldedVBA

Repository files navigation

unfoldedVBA

Unrolled Variational Bayesian Algorithm for Image Blind Deconvolution

This repository contains the Pytorch implementation of the unrolled variational Bayesian algorithm [1] applied to the problem of image blind deconvolution for grayscale or color images corrupted by unknown stationnary blur and additive Gaussian noise with unknown variance.

Herebelow is an example that displays the degraded image (left), the groundtruth image with the groundtruth blur (middle) and the restored image and estimated blur from unfoldedVBA (right), respectively.

Dependencies

Python version 3.6.10
Pytorch 1.7.0
CUDA 11.0
opencv-python 3.4.1.15 numpy 1.19.5

if you have errors like ImportError: libGL.so.1: cannot open shared object file: No such file or directory when import cv2, please use the following code to fix it

sudo apt update
sudo apt install libgl1-mesa-glx

Datasets

The datasets are in Datasets. Please download this folder and put it in the main folder unfoldedVBA. The subfolder Testsets contains the grayscale testsets and the subfolder Testsets_RGB contains the color testsets.

Training

To save the time during the trainings, we share some useful constant variables in the .mat file useful_tools.mat. Please download this file and put it in the subfolder Model_files. Please download the .txt file in KmtK0_dict and put it in the main folder unfoldedVBA.

Test

The learned models are in Trainings. Please download this folder and put it in the main folder unfoldedVBA. The subfolder Gaussian contains the saved models for grayscale images and the subfolder Mixed contains the saved models for color images.

Demo file

demo_unfoldedVBA.ipynb: shows how to test and train unfoldedVBA for grayscale images
demo_unfoldedVBA_RGB.ipynb: shows how to test and train unfoldedVBA for color images

Authors

Yunshi Huang - e-mail: yunshi.huang@centralesupelec.fr - PhD Student
Emilie Chouzenoux -website
Jean-Christophe Pesquet -website

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published