[CVPR 2021] Unsupervised Degradation Representation Learning for Blind Super-Resolution

Related tags

Deep Learning DASR
Overview

DASR

Pytorch implementation of "Unsupervised Degradation Representation Learning for Blind Super-Resolution", CVPR 2021

[arXiv]

Overview

Requirements

  • Python 3.6
  • PyTorch == 1.1.0
  • numpy
  • skimage
  • imageio
  • matplotlib
  • cv2

Train

1. Prepare training data

1.1 Download the DIV2K dataset and the Flickr2K dataset.

1.2 Combine the HR images from these two datasets in your_data_path/DF2K/HR to build the DF2K dataset.

2. Begin to train

Run ./main.sh to train on the DF2K dataset. Please update dir_data in the bash file as your_data_path.

Test

1. Prepare test data

Download benchmark datasets (e.g., Set5, Set14 and other test sets) and prepare HR/LR images in your_data_path/benchmark.

2. Begin to test

Run ./test.sh to test on benchmark datasets. Please update dir_data in the bash file as your_data_path.

Visualization of Degradation Representations

Comparative Results

Noise-Free Degradations with Isotropic Gaussian Kernels

General Degradations with Anisotropic Gaussian Kernels and Noises

Unseen Degradations

Real Degradations (AIM real-world SR challenge)

Citation

@InProceedings{Wang2021Unsupervised,
  author    = {Wang, Longguang and Wang, Yingqian and Dong, Xiaoyu and Xu, Qingyu and Yang, Jungang and An, Wei and Guo, Yulan},
  title     = {Unsupervised Degradation Representation Learning for Blind Super-Resolution},
  booktitle = {CVPR},
  year      = {2021},
}

Acknowledgements

This code is built on EDSR (PyTorch), IKC and MoCo. We thank the authors for sharing the codes.

Comments
  • blur kernels in Tab.3

    blur kernels in Tab.3

    Hi. I'm sorry to bothering you. Does this paper contain information about eigen values and rotate angles of the blur kernels in Tab.3 ? I can see just shapes.

    opened by sujyQ 4
  • PSNR and SSIM

    PSNR and SSIM

    Hi, author. Thank you for your excellent work. But I'm a little confused about the code which calculate PSNR and SSIM metric. For PSNR, why the diff is multipide by a convert coefficient and shave the border when benchmarch is set to True. For SSIM, why not directly use api from skimage? Waiting for your response, sincerely.

    opened by wangchust 2
  • Possibilty training on another training set

    Possibilty training on another training set

    Hi,

    I am highly interested in your work and code. I am trying to use another training dataset (SiblingsDB) to train your DASR model. However, when I tried to run the main.sh file for training after I changed the dir_data to my _data_path and put my dataset in my_data_path/DF2K/HR, the following error occurs in line 65 of multiscalesrdata.py: "self.repeat = args.test_every // (len(self.images_hr) // args.batch_size) ERROR: ZeroDivisionError: integer division or modulo by zero".

    Do you know what the problem is?

    Thank you in advance.

    opened by shyranok 0
  • About convergence

    About convergence

    Hi, thank you for this impressive work!

    May I ask to which range will the converged loss value fall when training the representation network? (e.g., based on parameters in your paper, the ultimately converged loss value is less than 5, or less than 1, or 0.1 ? ) This can be helpful during training.

    Thank you a lot!

    opened by runjia0124 0
  • Issue about resume

    Issue about resume

    作者您好!我今天想继续训练,bash文件如下所示 python main.py --dir_data='./dataset'
    --model='blindsr'
    --scale='2'
    --blur_type='iso_gaussian'
    --noise=0.0
    --sig_min=0.2
    --sig_max=2.0
    --save='bldsr_repro2'
    --resume=319 但是输出文件显示从epoch1重新开始训练了。我找不到bug在哪里,请问这是为什么呢

    opened by lbc12345 0
  • Quiktest problem

    Quiktest problem

    RuntimeError: CUDA out of memory. Tried to allocate 4.46 GiB (GPU 0; 11.00 GiB total capacity; 6.78 GiB already allocated; 2.39 GiB free; 6.79 GiB reserved in total by PyTorch) By 'nvidia-smi', my GPU memory is shown below. 微信截图_20221114160404 Why this issue happened?

    opened by Irina51244 0
  • ValueError: Cannot load file containing pickled data when allow_pickle=False

    ValueError: Cannot load file containing pickled data when allow_pickle=False

    I got this error while training the model using my own dataset:

    F:\DASR-main\dataset\benchmark\Set14\HR F:\DASR-main\dataset\benchmark\Set14\LR_bicubic Making model... Preparing loss function: 1.000 * L1 [Epoch 1] Learning rate: 1.00e-3 Traceback (most recent call last): File "main.py", line 19, in t.train() File "F:\DASR-main\trainer.py", line 63, in train for batch, (hr, _, idx_scale) in enumerate(self.loader_train): File "C:\Users\anaconda3\envs\DASR\lib\site-packages\torch\utils\data\dataloader.py", line 582, in next return self._process_next_batch(batch) File "C:\Users\anaconda3\envs\DASR\lib\site-packages\torch\utils\data\dataloader.py", line 608, in _process_next_batch raise batch.exc_type(batch.exc_msg) ValueError: Traceback (most recent call last): File "F:\DASR-main\dataloader.py", line 38, in _ms_loop samples = collate_fn([dataset[i] for i in batch_indices]) File "F:\DASR-main\dataloader.py", line 38, in samples = collate_fn([dataset[i] for i in batch_indices]) File "F:\DASR-main\data\multiscalesrdata.py", line 120, in getitem hr, filename = self._load_file(idx) File "F:\DASR-main\data\multiscalesrdata.py", line 154, in _load_file hr = np.load(_f)[0]['image'] File "C:\Users\anaconda3\envs\DASR\lib\site-packages\numpy\lib\npyio.py", line 444, in load raise ValueError("Cannot load file containing pickled data " ValueError: Cannot load file containing pickled data when allow_pickle=False

    opened by Kamin90 0
  • We reproduce your code and PSNR is far lower than your paper claimed.

    We reproduce your code and PSNR is far lower than your paper claimed.

    Hi, Longguang! Thanks for your interesting work and sharing your code! As we reproduce your code, the best PSNR results on Set14 as sigma=3.6 is 27.01 dB while what your paper claimed is 27.45 dB! I know your model can perform well as sigma is small. However, as the sigma become large, there is a big performance gap between our reproduced results and your paper giving results. My colleague also reproduce your code many times, but the same problems still exists!

    image image

    The same problems seems proposed in the https://github.com/The-Learning-And-Vision-Atelier-LAVA/DASR/issues/38. So can your tell me the error of our training command, shown as below? If there is no problem, for your academic reputation, I hope you reproduce your code again and evaluate your model on 4x Set14! Thanks!

    training: python main.py --dir_data='/media/datasets'
    --model='blindsr'
    --scale='4'
    --blur_type='iso_gaussian'
    --noise=0.0
    --sig_min=0.2
    --sig_max=4.0
    --sig 3.6
    --n_GPUs 2 test: python test.py --test_only
    --dir_data='/media/datasets'
    --data_test='Set14'
    --model='blindsr'
    --scale='4'
    --resume=600
    --n_GPUs=1
    --save 'test'
    --blur_type='iso_gaussian'
    --sig=3.6

    opened by aabb-cc 1
Owner
Longguang Wang
Longguang Wang
Official implementation of the paper 'Efficient and Degradation-Adaptive Network for Real-World Image Super-Resolution'

DASR Paper Efficient and Degradation-Adaptive Network for Real-World Image Super-Resolution Jie Liang, Hui Zeng, and Lei Zhang. In arxiv preprint. Abs

null 81 Dec 28, 2022
Official PyTorch implementation of the paper "Deep Constrained Least Squares for Blind Image Super-Resolution", CVPR 2022.

Deep Constrained Least Squares for Blind Image Super-Resolution [Paper] This is the official implementation of 'Deep Constrained Least Squares for Bli

MEGVII Research 141 Dec 30, 2022
DAN: Unfolding the Alternating Optimization for Blind Super Resolution

DAN-Basd-on-Openmmlab DAN: Unfolding the Alternating Optimization for Blind Super Resolution We reproduce DAN via mmediting based on open-sourced code

AlexZou 72 Dec 13, 2022
Official PyTorch code for Mutual Affine Network for Spatially Variant Kernel Estimation in Blind Image Super-Resolution (MANet, ICCV2021)

Mutual Affine Network for Spatially Variant Kernel Estimation in Blind Image Super-Resolution (MANet, ICCV2021) This repository is the official PyTorc

Jingyun Liang 139 Dec 29, 2022
Real-ESRGAN: Training Real-World Blind Super-Resolution with Pure Synthetic Data

Real-ESRGAN Real-ESRGAN: Training Real-World Blind Super-Resolution with Pure Synthetic Data Ported from https://github.com/xinntao/Real-ESRGAN Depend

Holy Wu 44 Dec 27, 2022
Official implementation of Unfolded Deep Kernel Estimation for Blind Image Super-resolution.

Unfolded Deep Kernel Estimation for Blind Image Super-resolution Hongyi Zheng, Hongwei Yong, Lei Zhang, "Unfolded Deep Kernel Estimation for Blind Ima

Z80 15 Dec 26, 2022
Code for Blind Image Decomposition (BID) and Blind Image Decomposition network (BIDeN).

arXiv, porject page, paper Blind Image Decomposition (BID) Blind Image Decomposition is a novel task. The task requires separating a superimposed imag

null 64 Dec 20, 2022
A python software that can help blind people find things like laptops, phones, etc the same way a guide dog guides a blind person in finding his way.

GuidEye A python software that can help blind people find things like laptops, phones, etc the same way a guide dog guides a blind person in finding h

Munal Jain 0 Aug 9, 2022
pytorch implementation of "Contrastive Multiview Coding", "Momentum Contrast for Unsupervised Visual Representation Learning", and "Unsupervised Feature Learning via Non-Parametric Instance-level Discrimination"

Unofficial implementation: MoCo: Momentum Contrast for Unsupervised Visual Representation Learning (Paper) InsDis: Unsupervised Feature Learning via N

Zhiqiang Shen 16 Nov 4, 2020
Propagate Yourself: Exploring Pixel-Level Consistency for Unsupervised Visual Representation Learning, CVPR 2021

Propagate Yourself: Exploring Pixel-Level Consistency for Unsupervised Visual Representation Learning By Zhenda Xie*, Yutong Lin*, Zheng Zhang, Yue Ca

Zhenda Xie 293 Dec 20, 2022
This is the code for CVPR 2021 oral paper: Jigsaw Clustering for Unsupervised Visual Representation Learning

JigsawClustering Jigsaw Clustering for Unsupervised Visual Representation Learning Pengguang Chen, Shu Liu, Jiaya Jia Introduction This project provid

DV Lab 73 Sep 18, 2022
CVPR 2021 Challenge on Super-Resolution Space

Learning the Super-Resolution Space Challenge NTIRE 2021 at CVPR Learning the Super-Resolution Space challenge is held as a part of the 6th edition of

andreas 104 Oct 26, 2022
Repository for "Exploring Sparsity in Image Super-Resolution for Efficient Inference", CVPR 2021

SMSR Reposity for "Exploring Sparsity in Image Super-Resolution for Efficient Inference" [arXiv] Highlights Locate and skip redundant computation in S

Longguang Wang 225 Dec 26, 2022
Implementation of CVPR 2020 Dual Super-Resolution Learning for Semantic Segmentation

Dual super-resolution learning for semantic segmentation 2021-01-02 Subpixel Update Happy new year! The 2020-12-29 update of SISR with subpixel conv p

Sam 79 Nov 24, 2022
Official implementation of the paper 'Details or Artifacts: A Locally Discriminative Learning Approach to Realistic Image Super-Resolution' in CVPR 2022

LDL Paper | Supplementary Material Details or Artifacts: A Locally Discriminative Learning Approach to Realistic Image Super-Resolution Jie Liang*, Hu

null 150 Dec 26, 2022
git《Investigating Loss Functions for Extreme Super-Resolution》(CVPR 2020) GitHub:

Investigating Loss Functions for Extreme Super-Resolution NTIRE 2020 Perceptual Extreme Super-Resolution Submission. Our method ranked first and secon

Sejong Yang 0 Oct 17, 2022
The official pytorch implemention of the CVPR paper "Temporal Modulation Network for Controllable Space-Time Video Super-Resolution".

This is the official PyTorch implementation of TMNet in the CVPR 2021 paper "Temporal Modulation Network for Controllable Space-Time VideoSuper-Resolu

Gang Xu 95 Oct 24, 2022
[CVPR 2022] Official PyTorch Implementation for "Reference-based Video Super-Resolution Using Multi-Camera Video Triplets"

Reference-based Video Super-Resolution (RefVSR) Official PyTorch Implementation of the CVPR 2022 Paper Project | arXiv | RealMCVSR Dataset This repo c

Junyong Lee 151 Dec 30, 2022
Code repo for "RBSRICNN: Raw Burst Super-Resolution through Iterative Convolutional Neural Network" (Machine Learning and the Physical Sciences workshop in NeurIPS 2021).

RBSRICNN: Raw Burst Super-Resolution through Iterative Convolutional Neural Network An official PyTorch implementation of the RBSRICNN network as desc

Rao Muhammad Umer 6 Nov 14, 2022