百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

AdaDSR

> 编程语言
开源

用于单张图像超分辨率的深度自适应推理网络

99 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

用于单张图像超分辨率的深度自适应推理网络

AdaDSR (ECCV 2020 AIM workshop)

PyTorch implementation of Deep Adaptive Inference Networks for Single Image Super-Resolution

Overall structure of our AdaDSR.

Results

SISR results on Set5. More results please refer to the paper.

An exemplar visualization of the SR results and depth map.

Preparation

  • Prerequisites
    • PyTorch (v1.2)
    • Python 3.x, with OpenCV, Numpy, Pillow, tqdm and matplotlib, and tensorboardX is used for visualization
    • [optional] Make sure that matlab is in your PATH, if you want to calculate the PSNR/SSIM indices and use the argument --matlab True
    • [Sparse Conv] cd masked_conv2d; python setup.py install. Note that currently we provide a version modified from open-mmlab/mmdetection, which supports inference with 3x3 sparse convolution layer. We will provide a more general version in the future.
  • Dataset
    • Training
      • DIV2K is used for training, you can download the dataset from ETH_CVL or SNU_CVLab.
      • The data should be organized as DIV2K_ROOT/DIV2K_train_HR/*.png, DIV2K_ROOT/DIV2K_train_LR_bicubic/X[234]/*.png, which is identical to the official format.
    • Testing
      • Set5, Set14, B100, Urban100 and Manga109 are used for test.
      • You can download these datasets (~300MB) from Google Drive or Baidu Yun (43qz), and run Prepare_TestData_HR_LR.m in matlab, you can get two folders named HR and LR. Place these two folders in BENCHMARK_ROOT.
    • Models
      • Download the pre-trained models (~2.2GB) from Google Drive or Baidu Yun (cyps), and put the two folders in the root folder.

Quick Start

We show some exemplar commands here for better introduction, and more useful scripts are given in the scripts folder.

Testing

  • AdaEDSR

    bash
    python test.py --model adaedsr --name adaedsr_x2 --scale 2 --load_path ./ckpt/adaedsr_x2/AdaEDSR_model.pth --dataset_name set5 set14 b100 urban100 manga109 --depth 32 --chop True --sparse_conv True --matlab True --gpu_ids 0
  • AdaRCAN

    bash
    python test.py --model adarcan --name adarcan_x2 --scale 2 --load_path ./ckpt/adarcan_x2/AdaRCAN_model.pth --dataset_name set5 set14 b100 urban100 manga109 --depth 20 --chop True --sparse_conv True --matlab True --gpu_ids 0

Training

  • AdaEDSR (Load pre-trained EDSR model for more stable training)

    bash
    python train.py --model adaedsr --name adaedsr_x2 --scale 2 --load_path ./pretrained/EDSR_official_32_x${scale}.pth
  • AdaRCAN (Load pre-trained RCAN model for more stable training)

    bash
    python train.py --model adarcan --name adarcan_x2 --scale 2 --load_path ./pretrained/RCAN_BIX2.pth

Note

  • You should set data root by --dataroot DIV2K_ROOT (train) or --dataroot BENCHMARK_ROOT (test), or you can add your own path in the rootlist of div2k_dataset or benchmark_dataset.
  • You can specify which GPU to use by --gpu_ids, e.g., --gpu_ids 0,1, --gpu_ids 3, --gpu_ids -1 (for CPU mode). In the default setting, all GPUs are used.
  • You can refer to options for more arguments.

Citation

If you find AdaDSR useful in your research, please consider citing:

@inproceedings{AdaDSR,
    title={Deep Adaptive Inference Networks for Single Image Super-Resolution},
    author={Liu, Ming and Zhang, Zhilu and Hou, Liya and Zuo, Wangmeng and Zhang, Lei},
    booktitle={European Conference on Computer Vision Workshops},
    year={2020}
}

Acknowledgement

This repo is built upon the framework of CycleGAN, and we borrow some code from DPSR, mmdetection, EDSR, RCAN and SAN, thanks for their excellent work!

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言