DAN: Unfolding the Alternating Optimization for Blind Super Resolution

Overview

DAN-Basd-on-Openmmlab

DAN: Unfolding the Alternating Optimization for Blind Super Resolution

We reproduce DAN via mmediting based on open-sourced code.

Requirements

  • PyTorch >= 1.3
  • mmediting >= 0.9

DataSets

We use DIV2K and Flickr2K as our training datasets. For evaluation of Setting 2, we use DIV2KRK datasets,

Usages

How to run this repo: copy the file to the mmediting workspace and run the program directly based on the commands in mmediting

  1. Copy files to MMEditing workspace.
cd DAN-Basd-on-Openmmlab/
mv ./mmedit/models/restorers/dan.py ${mmediting_workspace}/mmedit/models/restorers/
mv ./mmedit/models/backbones/sr_backbones/dan_net.py ${mmediting_workspace}/mmedit/models/backbones/sr_backbones/
mv ./mmedit/models/common/DANpreprocess.py ${mmediting_workspace}/mmedit/models/common
mv ./configs/restorers/dan ${mmediting_workspace}/configs/restorers/
mv ./tools/data/super-resolution/dan_datasets ${mmediting_workspace}/tools/data/super-resolution/
  1. Modify the configuration file as follows:
pca_matrix_path='${mmediting_workspace}/tools/data/super-resolution/div2k/pca_matrix/pca_aniso_matrix_x4.pth' # your pca_matrix path
# Training
gt_folder='${dataset_workspace}/dataset/DF2K_train_HR_sub' # your train data path
# Testing
lq_folder='${dataset_workspace}/dataset/DIV2KRK/lr_x4' # your test data LR path
gt_folder='${dataset_workspace}/dataset/DIV2KRK/gt' # your test data HR path
  1. Add script to init file, as follows:
  • modify the mmedit/models/backbones/sr_backbones/__init__.py:
from .dan_net import DAN
# add DAN into __all__ list.
  • modify the mmedit/models/commons/__init__.py:
from .dan_preprocess import SRMDPreprocessing
# add SRMDreprocessing into __all__ list.
  • modify the mmedit/models/restorers/__init__.py:
from .dan import DAN
# add DAN into __all__ list.
  1. Training/Test

Before using it, please download and process the dataset and set the path in the configuration file.

  • Train
# Single GPU
python tools/train.py configs/restorers/dan/dan_setting2.py --work_dir ${YOUR_WORK_DIR}

# Multiple GPUs
./tools/dist_train.sh configs/restorers/dan/dan_setting2.py ${GPU_NUM} --work_dir ${YOUR_WORK_DIR}
  • Test
# Single GPU
python tools/test.py configs/restorers/dan/dan_setting2.py ${CHECKPOINT_FILE} [--metrics ${METRICS}] [--out ${RESULT_FILE}]

# Multiple GPUs
./tools/dist_test.sh configs/restorers/dan/dan_setting2.py ${CHECKPOINT_FILE} ${GPU_NUM} [--metrics ${METRICS}] [--out ${RESULT_FILE}]

Result

DIV2KRK

The passwds of download links are all 'ta2o'

Method scale Datasets PSNR Download
DAN x4 DIV2KRK 27.41 model / test_pkl

Owner
AlexZou
AlexZou
Neural Point-Based Graphics

Neural Point-Based Graphics Project   Video   Paper Neural Point-Based Graphics Kara-Ali Aliev1 Artem Sevastopolsky1,2 Maria Kolos1,2 Dmitry Ulyanov3

Ali Aliev 252 Dec 13, 2022
Qcover is an open source effort to help exploring combinatorial optimization problems in Noisy Intermediate-scale Quantum(NISQ) processor.

Qcover is an open source effort to help exploring combinatorial optimization problems in Noisy Intermediate-scale Quantum(NISQ) processor. It is devel

33 Nov 11, 2022
The Surprising Effectiveness of Visual Odometry Techniques for Embodied PointGoal Navigation

PointNav-VO The Surprising Effectiveness of Visual Odometry Techniques for Embodied PointGoal Navigation Project Page | Paper Table of Contents Setup

Xiaoming Zhao 41 Dec 15, 2022
wgan, wgan2(improved, gp), infogan, and dcgan implementation in lasagne, keras, pytorch

Generative Adversarial Notebooks Collection of my Generative Adversarial Network implementations Most codes are for python3, most notebooks works on C

tjwei 1.5k Dec 16, 2022
PyTorch implementation for SDEdit: Image Synthesis and Editing with Stochastic Differential Equations

SDEdit: Image Synthesis and Editing with Stochastic Differential Equations Project | Paper | Colab PyTorch implementation of SDEdit: Image Synthesis a

536 Jan 05, 2023
SSD-based Object Detection in PyTorch

SSD-based Object Detection in PyTorch 서강대학교 현대모비스 SW 프로그램에서 진행한 인공지능 프로젝트입니다. Jetson nano를 이용해 pre-trained network를 fine tuning시켜 차량 및 신호등 인식을 구현하였습니다

Haneul Kim 1 Nov 16, 2021
Self-attentive task GAN for space domain awareness data augmentation.

SATGAN TODO: update the article URL once published. Article about this implemention The self-attentive task generative adversarial network (SATGAN) le

Nathan 2 Mar 24, 2022
Multimodal commodity image retrieval 多模态商品图像检索

Multimodal commodity image retrieval 多模态商品图像检索 Not finished yet... introduce explain:The specific description of the project and the product image dat

hongjie 8 Nov 25, 2022
PyTorch Implementation of Temporal Output Discrepancy for Active Learning, ICCV 2021

Temporal Output Discrepancy for Active Learning PyTorch implementation of Semi-Supervised Active Learning with Temporal Output Discrepancy, ICCV 2021.

Siyu Huang 33 Dec 06, 2022
Non-Imaging Transient Reconstruction And TEmporal Search (NITRATES)

Non-Imaging Transient Reconstruction And TEmporal Search (NITRATES) This repo contains the full NITRATES pipeline for maximum likelihood-driven discov

13 Nov 08, 2022
ACL'2021: LM-BFF: Better Few-shot Fine-tuning of Language Models

LM-BFF (Better Few-shot Fine-tuning of Language Models) This is the implementation of the paper Making Pre-trained Language Models Better Few-shot Lea

Princeton Natural Language Processing 607 Jan 07, 2023
Convolutional Neural Network to detect deforestation in the Amazon Rainforest

Convolutional Neural Network to detect deforestation in the Amazon Rainforest This project is part of my final work as an Aerospace Engineering studen

5 Feb 17, 2022
Python scripts form performing stereo depth estimation using the HITNET model in ONNX.

ONNX-HITNET-Stereo-Depth-estimation Python scripts form performing stereo depth estimation using the HITNET model in ONNX. Stereo depth estimation on

Ibai Gorordo 30 Nov 08, 2022
VSR-Transformer - This paper proposes a new Transformer for video super-resolution (called VSR-Transformer).

VSR-Transformer By Jiezhang Cao, Yawei Li, Kai Zhang, Luc Van Gool This paper proposes a new Transformer for video super-resolution (called VSR-Transf

Jiezhang Cao 225 Nov 13, 2022
This package is for running the semantic SLAM algorithm using extracted planar surfaces from the received detection

Semantic SLAM This package can perform optimization of pose estimated from VO/VIO methods which tend to drift over time. It uses planar surfaces extra

Hriday Bavle 125 Dec 02, 2022
Research code for the paper "Variational Gibbs inference for statistical estimation from incomplete data".

Variational Gibbs inference (VGI) This repository contains the research code for Simkus, V., Rhodes, B., Gutmann, M. U., 2021. Variational Gibbs infer

Vaidotas Šimkus 1 Apr 08, 2022
PyTorch implementation of Constrained Policy Optimization

PyTorch implementation of Constrained Policy Optimization (CPO) This repository has a simple to understand and use implementation of CPO in PyTorch. A

Sapana Chaudhary 25 Dec 08, 2022
Code for "Typilus: Neural Type Hints" PLDI 2020

Typilus A deep learning algorithm for predicting types in Python. Please find a preprint here. This repository contains its implementation (src/) and

47 Nov 08, 2022
A comprehensive and up-to-date developer education platform for Urbit.

curriculum A comprehensive and up-to-date developer education platform for Urbit. This project organizes developer capabilities into a hierarchy of co

Sigilante 36 Oct 04, 2022
Source code of D-HAN: Dynamic News Recommendation with Hierarchical Attention Network

D-HAN The source code of D-HAN This is the source code of D-HAN: Dynamic News Recommendation with Hierarchical Attention Network. However, only the co

30 Sep 22, 2022