[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
  • 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 0
  • 关于dataloader无法读取测试图片的问题

    关于dataloader无法读取测试图片的问题

    首先非常感谢您的开源工作!我在使用您的开源项目进行测试时,发生了dataloader无法读取到测试集的图片的问题。具体表现为len(self.loader_test)始终为0。 image

    我推测是我测试文件夹的结构或是名称不符合要求,我的测试文件夹和图像是这样设置和命名的: image image

    我的输入参数是这样设置的: image

    不知能否麻烦您分享一下文件夹和args的详细设置?谢谢

    opened by AaronZhang16 0
  • Excluding Degradation Representation Learning

    Excluding Degradation Representation Learning

    Hi,

    I am highly interested in your work and code. I want to exclude Degradation Representation Learning for training the network without it. Could you point me in the right direction on which code I need to modify?

    Thank you in advance.

    Kind regards, Shyrano

    opened by shyranok 0
  • 关于对比试验的问题

    关于对比试验的问题

    非常感谢您的工作,我们对此非常感兴趣,不知您在对于non-blind SR methods中,使用IKC中的预测子网络来估计退化,能否指导一下,或者您方便的话,代码可否提供一下,打算学习着进行利用几个其他的non-blind SR method进行对比试验。非常感谢您的帮助,这对于我们的工作将会有很大的帮助,万分感谢。

    opened by Ziyang6 0
  • 'IndexError: too many indices for array: array is 2-dimensional, but 3 were indexed'您好,我用自己的数据训练时出现这个错误

    'IndexError: too many indices for array: array is 2-dimensional, but 3 were indexed'您好,我用自己的数据训练时出现这个错误

    非常感谢您的分享,但是我在测试自己的训练集时遇到一个问题,我的数据集是灰度图片,猜测应该是矩阵维数错误,可是我没有找到读取图片的代码在哪里,应该如何修改代码?感谢!

    (DASR) # ./main.sh ./data_set/benchmark/Set14/HR ./data_set/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 "/home/jovyan/sr/DASR-main/trainer.py", line 63, in train for batch, (hr, _, idx_scale) in enumerate(self.loader_train): File "/home/jovyan/sr/DASR/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 582, in next return self._process_next_batch(batch) File "/home/jovyan/sr/DASR/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 608, in _process_next_batch raise batch.exc_type(batch.exc_msg) IndexError: Traceback (most recent call last): File "/home/jovyan/sr/DASR-main/dataloader.py", line 38, in _ms_loop samples = collate_fn([dataset[i] for i in batch_indices]) File "/home/jovyan/sr/DASR-main/dataloader.py", line 38, in samples = collate_fn([dataset[i] for i in batch_indices]) File "/home/jovyan/sr/DASR-main/data/multiscalesrdata.py", line 123, in getitem hr = self.get_patch(hr) File "/home/jovyan/sr/DASR-main/data/multiscalesrdata.py", line 164, in get_patch hr = common.augment(hr) if not self.args.no_augment else hr File "/home/jovyan/sr/DASR-main/data/common.py", line 44, in augment if hflip: img = img[:, ::-1, :] IndexError: too many indices for array: array is 2-dimensional, but 3 were indexed

    opened by gwp2021 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 71 Sep 23, 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 111 Sep 23, 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 73 Sep 14, 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 127 Sep 7, 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 34 Sep 26, 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 13 Aug 30, 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 48 Sep 16, 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
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 103 May 30, 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 211 Sep 7, 2022
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 288 Sep 22, 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
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 77 Sep 14, 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 131 Sep 27, 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 105 Sep 2, 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 91 Sep 21, 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 127 Sep 17, 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 May 19, 2022