Damonfruit / SRCNN-PyTorch

Pytorch framework can easily implement srcnn algorithm with excellent performance

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SRCNN-PyTorch

Overview

This repository contains an op-for-op PyTorch reimplementation of Image Super-Resolution Using Deep Convolutional Networks.

Table of contents

About Image Super-Resolution Using Deep Convolutional Networks

If you're new to SRCNN, here's an abstract straight from the paper:

We propose a deep learning method for single image super-resolution (SR). Our method directly learns an end-to-end mapping between the low/high-resolution images. The mapping is represented as a deep convolutional neural network (CNN) that takes the low-resolution image as the input and outputs the high-resolution one. We further show that traditional sparse-coding-based SR methods can also be viewed as a deep convolutional network. But unlike traditional methods that handle each component separately, our method jointly optimizes all layers. Our deep CNN has a lightweight structure, yet demonstrates state-of-the-art restoration quality, and achieves fast speed for practical on-line usage. We explore different network structures and parameter settings to achieve trade-offs between performance and speed. Moreover, we extend our network to cope with three color channels simultaneously, and show better overall reconstruction quality.

Download weights

Download datasets

Download train dataset

T91

Download valid dataset

Set5

Set14

BSD100

Test

Modify the contents of the file as follows.

  • line 24: upscale_factor change to the magnification you need to enlarge.
  • line 25: mode change Set to valid mode.
  • line 77: model_path change weight address after training.

Train

Modify the contents of the file as follows.

  • line 24: upscale_factor change to the magnification you need to enlarge.
  • line 25: mode change Set to train mode.

If you want to load weights that you've trained before, modify the contents of the file as follows.

  • line 47: resume change to True.
  • line 48: strict Transfer learning is set to False, incremental learning is set to True.
  • line 49: start_epoch change number of training iterations in the previous round.
  • line 50: resume_weight the weight address that needs to be loaded.

Result

Source of original paper results: https://arxiv.org/pdf/1501.00092v3.pdf

In the following table, the value in () indicates the result of the project, and - indicates no test.

Dataset Scale PSNR
Set5 2 36.34(36.31)
Set5 3 32.39(32.31)
Set5 4 30.09(29.95)

Low Resolution / Super Resolution / High Resolution

Credit

Image Super-Resolution Using Deep Convolutional Networks

Chao Dong, Chen Change Loy, Kaiming He, Xiaoou Tang

Abstract
We propose a deep learning method for single image super-resolution (SR). Our method directly learns an end-to-end mapping between the low/high-resolution images. The mapping is represented as a deep convolutional neural network (CNN) that takes the low-resolution image as the input and outputs the high-resolution one. We further show that traditional sparse-coding-based SR methods can also be viewed as a deep convolutional network. But unlike traditional methods that handle each component separately, our method jointly optimizes all layers. Our deep CNN has a lightweight structure, yet demonstrates state-of-the-art restoration quality, and achieves fast speed for practical on-line usage. We explore different network structures and parameter settings to achieve trade-offs between performance and speed. Moreover, we extend our network to cope with three color channels simultaneously, and show better overall reconstruction quality.

[Paper] [Author's implements(Caffe)]

@misc{dong2014image,
    title={Image Super-Resolution Using Deep Convolutional Networks},
    author={Chao Dong and Chen Change Loy and Kaiming He and Xiaoou Tang},
    year={2014},
    eprint={1501.00092},
    archivePrefix={arXiv},
    primaryClass={cs.CV}
}

About

Pytorch framework can easily implement srcnn algorithm with excellent performance

License:Apache License 2.0


Languages

Language:Python 100.0%