Coder Social home page Coder Social logo

graph-super-resolution's Introduction

Learning Graph Regularisation for Guided Super-Resolution

This is the official implementation of the paper:

"Learning Graph Regularisation for Guided Super-Resolution" (CVPR 2022)

Riccardo de Lutio*, Alexander Becker*, Stefano D'Aronco, Stefania Russo, Jan Dirk Wegner and Konrad Schindler (*equal contribution)

[Paper]  |  [5 minute explainer video]

Teaser Teaser

Abstract

We introduce a novel formulation for guided super-resolution. Its core is a differentiable optimisation layer that operates on a learned affinity graph. The learned graph potentials make it possible to leverage rich contextual information from the guide image, while the explicit graph optimisation within the architecture guarantees rigorous fidelity of the high-resolution target to the low-resolution source. With the decision to employ the source as a constraint rather than only as an input to the prediction, our method differs from state-of-the-art deep architectures for guided super-resolution, which produce targets that, when downsampled, will only approximately reproduce the source. This is not only theoretically appealing, but also produces crisper, more natural-looking images. A key property of our method is that, although the graph connectivity is restricted to the pixel lattice, the associated edge potentials are learned with a deep feature extractor and can encode rich context information over large receptive fields. By taking advantage of the sparse graph connectivity, it becomes possible to propagate gradients through the optimisation layer and learn the edge potentials from data. We extensively evaluate our method on several datasets, and consistently outperform recent baselines in terms of quantitative reconstruction errors, while also delivering visually sharper outputs. Moreover, we demonstrate that our method generalises particularly well to new datasets not seen during training.

Setup

Dependencies

We recommend creating a new conda environment with all required dependencies by running

conda env create -f environment.yml
conda activate graph-sr

Data

To reproduce our results, create a data directory (e.g. ./data) with the three datasets:

  • NYUv2: Download the labeled dataset from [here] and place the nyu_depth_v2_labeled.mat in ./data/NYU Depth v2, along with our split indices file from [here].
  • Middlebury: Download the 2005-2014 scenes (full size, two-view) from [here] and place the extracted scenes in ./data/Middlebury/<year>/<scene>. For the 2005 dataset, make sure to only put the scenes for which ground truth is available. The data splits are defined in code.
  • DIML: Download the indoor data sample from [here] and extract it into ./data/DIML/{train,test} respectively. Then run python scripts/create_diml_npy.py ./data/DIML to create numpy binary files for faster data loading.

Checkpoints

Our pretrained model checkpoints which were used for the numbers in our paper, for all three datasets and upsampling factors, can be downloaded from [here].

Training

Run the training script via

python run_train.py --dataset <...> --data-dir <...> --save-dir <...>

Hyperparameter defaults are set to the values from the paper. Depending on the dataset, you have to adjust the number of epochs (--num-epochs) and the scheduler step size (--lr-step), see appendix A of the paper. You can see all available training options by running

python run_train.py -h

Evaluation

For test set evaluation, run

python run_eval.py --checkpoint <...> --dataset <...> --data-dir <...>

Again, you can query all available options by running

python run_train.py -h

Citation

@inproceedings{deLutio2022,
 author = {de Lutio, Riccardo and Becker, Alexander and D'Aronco, Stefano and Russo, Stefania and Wegner, Jan D. and Schindler, Konrad},
 title = {Learning Graph Regularisation for Guided Super-Resolution},
 booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
 year = {2022},
} 

graph-super-resolution's People

Contributors

alebeck avatar riccardodelutio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

graph-super-resolution's Issues

New Super-Resolution Benchmarks

Hello,

MSU Graphics & Media Lab Video Group has recently launched two new Super-Resolution Benchmarks.

If you are interested in participating, you can add your algorithm following the submission steps:

We would be grateful for your feedback on our work!

Details want to discuss

hi for the evaluation process

python run_eval.py --checkpoint <...> --dataset <...> --data-dir <...>

what is the difference between --dataset and --data-dir

and for example if I add --dataset DIML then what is for data-dir ?

Many thanks!

About evaluation results

I have downloaded the source code as well as dataset from the given links and tried to train for many times( I didn't modify any hyperparameters except for the dataset path and log path ). However, there's a large gap between my evaluation results and those in the paper.

So I would like to ask what is the problem and what should I try to get the results in the paper?

Thank you!

Inquiry about the visualization

Hi, Riccardo.
Thanks very much for your work. I am a new beginner for CV, and I am really interested in super-resolution. However, I have some confusion in reproducing your work.
I have trained NYUv2 and All I could get are args.csv, best_model.pth, events.out.tfevents.1708975026.UbuntuOS.38019.0 and last_model.pth in "graph-super-resolution/output/NYUv2/experiment3" .

How could I get the beautiful picture displayed in your paper? They are just some binary files and py_evaluation just gives me some number. I know my question is a bit stupid, Sorry for bothering you. Could you give me some keywords or hints?
image

How to extract the .egg file in DIML dataset?

Hello, thanks for sharing the code.
I downloaded the DIML dataset., but I cannot open the .egg format file. How did you decompress this file format?
I tried the unzip command, but it didn't work

about the visualization

Hello,dear author, I have some questions about visualization. for the residual plots, What should the percentil be set to for residual map visualization.So that I can achieve the same visual effects as presented in your paper. the following is my code.
vvmin = np.percentile(residual, 0.5, axis=(0, 1), keepdims=True)
vvmax = np.percentile(residual, 99.5, axis=(0, 1), keepdims=True)
if (-vvmin) > vvmax:
vvmax = -vvmin
else:
vvmin = -vvmax

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.