• Stars
    star
    981
  • Rank 46,671 (Top 1.0 %)
  • Language
    Python
  • License
    MIT License
  • Created about 7 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A PyTorch implementation of SRGAN based on CVPR 2017 paper "Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network"

SRGAN

A PyTorch implementation of SRGAN based on CVPR 2017 paper Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network.

Requirements

conda install pytorch torchvision -c pytorch
  • opencv
conda install opencv

Datasets

Train、Val Dataset

The train and val datasets are sampled from VOC2012. Train dataset has 16700 images and Val dataset has 425 images. Download the datasets from here(access code:5tzp), and then extract it into data directory.

Test Image Dataset

The test image dataset are sampled from | Set 5 | Bevilacqua et al. BMVC 2012 | Set 14 | Zeyde et al. LNCS 2010 | BSD 100 | Martin et al. ICCV 2001 | Sun-Hays 80 | Sun and Hays ICCP 2012 | Urban 100 | Huang et al. CVPR 2015. Download the image dataset from here(access code:xwhy), and then extract it into data directory.

Test Video Dataset

The test video dataset are three trailers. Download the video dataset from here(access code:956d).

Usage

Train

python train.py

optional arguments:
--crop_size                   training images crop size [default value is 88]
--upscale_factor              super resolution upscale factor [default value is 4](choices:[2, 4, 8])
--num_epochs                  train epoch number [default value is 100]

The output val super resolution images are on training_results directory.

Test Benchmark Datasets

python test_benchmark.py

optional arguments:
--upscale_factor              super resolution upscale factor [default value is 4]
--model_name                  generator model epoch name [default value is netG_epoch_4_100.pth]

The output super resolution images are on benchmark_results directory.

Test Single Image

python test_image.py

optional arguments:
--upscale_factor              super resolution upscale factor [default value is 4]
--test_mode                   using GPU or CPU [default value is 'GPU'](choices:['GPU', 'CPU'])
--image_name                  test low resolution image name
--model_name                  generator model epoch name [default value is netG_epoch_4_100.pth]

The output super resolution image are on the same directory.

Test Single Video

python test_video.py

optional arguments:
--upscale_factor              super resolution upscale factor [default value is 4]
--video_name                  test low resolution video name
--model_name                  generator model epoch name [default value is netG_epoch_4_100.pth]

The output super resolution video and compared video are on the same directory.

Benchmarks

Upscale Factor = 2

Epochs with batch size of 64 takes ~2 minute 30 seconds on a NVIDIA GTX 1080Ti GPU.

Image Results

The left is bicubic interpolation image, the middle is high resolution image, and the right is super resolution image(output of the SRGAN).

  • BSD100_070(PSNR:32.4517; SSIM:0.9191)

BSD100_070

  • Set14_005(PSNR:26.9171; SSIM:0.9119)

Set14_005

  • Set14_013(PSNR:30.8040; SSIM:0.9651)

Set14_013

  • Urban100_098(PSNR:24.3765; SSIM:0.7855)

Urban100_098

Video Results

The left is bicubic interpolation video, the right is super resolution video(output of the SRGAN).

Watch the video

Upscale Factor = 4

Epochs with batch size of 64 takes ~4 minute 30 seconds on a NVIDIA GTX 1080Ti GPU.

Image Results

The left is bicubic interpolation image, the middle is high resolution image, and the right is super resolution image(output of the SRGAN).

  • BSD100_035(PSNR:32.3980; SSIM:0.8512)

BSD100_035

  • Set14_011(PSNR:29.5944; SSIM:0.9044)

Set14_011

  • Set14_014(PSNR:25.1299; SSIM:0.7406)

Set14_014

  • Urban100_060(PSNR:20.7129; SSIM:0.5263)

Urban100_060

Video Results

The left is bicubic interpolation video, the right is super resolution video(output of the SRGAN).

Watch the video

Upscale Factor = 8

Epochs with batch size of 64 takes ~3 minute 30 seconds on a NVIDIA GTX 1080Ti GPU.

Image Results

The left is bicubic interpolation image, the middle is high resolution image, and the right is super resolution image(output of the SRGAN).

  • SunHays80_027(PSNR:29.4941; SSIM:0.8082)

SunHays80_027

  • SunHays80_035(PSNR:32.1546; SSIM:0.8449)

SunHays80_035

  • SunHays80_043(PSNR:30.9716; SSIM:0.8789)

SunHays80_043

  • SunHays80_078(PSNR:31.9351; SSIM:0.8381)

SunHays80_078

Video Results

The left is bicubic interpolation video, the right is super resolution video(output of the SRGAN).

Watch the video

The complete test results could be downloaded from here(access code:nkh9).

More Repositories

1

SimCLR

A PyTorch implementation of SimCLR based on ICML 2020 paper "A Simple Framework for Contrastive Learning of Visual Representations"
Python
481
star
2

ESPCN

A PyTorch implementation of ESPCN based on CVPR 2016 paper "Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network"
Python
472
star
3

CapsNet

A PyTorch implementation of CapsNet based on NIPS 2017 paper "Dynamic Routing Between Capsules"
Python
151
star
4

SlamBook

Learn 视觉slam十四讲
C++
138
star
5

SEGAN

A PyTorch implementation of SEGAN based on INTERSPEECH 2017 paper "SEGAN: Speech Enhancement Generative Adversarial Network"
Python
117
star
6

CGD

A PyTorch implementation of CGD based on the paper "Combination of Multiple Global Descriptors for Image Retrieval"
Python
102
star
7

ImageDeblurring

A Keras implementation of image deblurring based on ICCV 2017 paper "Deep Generative Filter for motion deblurring"
Python
84
star
8

R2Plus1D-C3D

A PyTorch implementation of R2Plus1D and C3D based on CVPR 2017 paper "A Closer Look at Spatiotemporal Convolutions for Action Recognition" and CVPR 2014 paper "Learning Spatiotemporal Features with 3D Convolutional Networks"
Python
58
star
9

DGCNN

A PyTorch implementation of DGCNN based on AAAI 2018 paper "An End-to-End Deep Learning Architecture for Graph Classification"
Python
56
star
10

CarLaneDetection

车道线检测
Python
54
star
11

CCCapsNet

A PyTorch implementation of Compositional Coding Capsule Network based on PRL 2022 paper "Compositional Coding Capsule Network with K-Means Routing for Text Classification"
Python
48
star
12

DrawingBoard

仿画图板——Android
Java
47
star
13

GradCAM

A PyTorch implementation of Grad-CAM based on ICCV 2017 paper "Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization"
Python
46
star
14

Restormer

A PyTorch implementation of Restormer based on CVPR 2022 paper "Restormer: Efficient Transformer for High-Resolution Image Restoration"
Python
44
star
15

CapsuleLayer

PyTorch Capsule Layer
Python
30
star
16

MoCo

A PyTorch implementation of MoCo based on CVPR 2020 paper "Momentum Contrast for Unsupervised Visual Representation Learning"
Python
30
star
17

GatedSCNN

A PyTorch implementation of Gated-SCNN based on ICCV 2019 paper "Gated-SCNN: Gated Shape CNNs for Semantic Segmentation"
Python
22
star
18

EMANet

A PyTorch implementation of EMANet based on ICCV 2019 paper "Expectation-Maximization Attention Networks for Semantic Segmentation"
Python
17
star
19

DeepMask

A Keras implementation of DeepMask based on NIPS 2015 paper "Learning to Segment Object Candidates"
Python
15
star
20

FastSCNN

A PyTorch implementation of Fast-SCNN based on BMVC 2019 paper "Fast-SCNN: Fast Semantic Segmentation Network"
Python
13
star
21

NPID

A PyTorch implementation of NPID based on CVPR 2018 paper "Unsupervised Feature Learning via Non-Parametric Instance Discrimination"
Python
13
star
22

PSCapsNet

A PyTorch implementation of Parameter-sharing Capsule Network based on the paper "Evaluating Generalization Ability of Convolutional Neural Networks and Capsule Networks for Image Classification via Top-2 Classification"
Python
13
star
23

ACRNet

A PyTorch implementation of ACRNet based on ICME 2023 paper "Weakly-supervised Temporal Action Localization with Adaptive Clustering and Refining Network"
Python
13
star
24

CARAFE

A PyTorch implementation of CARAFE based on ICCV 2019 paper “CARAFE: Content-Aware ReAssembly of FEatures”
Cuda
12
star
25

DANet

A PyTorch implementation of DANet based on CVPR 2019 paper "Dual Attention Network for Scene Segmentation"
Python
11
star
26

SimSiam

A PyTorch implementation of SimSiam based on CVPR 2021 paper "Exploring Simple Siamese Representation Learning"
Python
10
star
27

ProxyAnchor

A PyTorch implementation of Proxy Anchor Loss based on CVPR 2020 paper "Proxy Anchor Loss for Deep Metric Learning"
Python
9
star
28

Tutorials

This repertory contains some resources which I learn new technologies
DIGITAL Command Language
9
star
29

NormSoftmax

A PyTorch implementation of NormSoftmax based on BMVC 2019 paper "Classification is a Strong Baseline for Deep Metric Learning"
Python
8
star
30

SlowFast

A PyTorch implementation of SlowFast based on ICCV 2019 paper "SlowFast Networks for Video Recognition"
Python
8
star
31

DSTLDetection

DSTL remote sensing images detection
Python
7
star
32

MCDet

PyTorch Multiple Channel MMDetection Library, support multiple channel image loading and processing.
Python
6
star
33

DaCo

A PyTorch implementation of DaCo based on APIN 2023 paper "DaCo: Domain-Agnostic Contrastive Learning for Visual Place Recognition"
Python
6
star
34

Indoor

一个类似微信的android app,并且实现了多种功能扩展,需要在face++,高德地图,Bmob平台注册账号并作相关配置
Java
5
star
35

MCA

A PyTorch implementation of MCA based on PRICAI 2022 paper "Weakly-supervised Temporal Action Localization with Multi-head Cross-modal Attention"
Python
4
star
36

GPUView

A NVIDIA GPU monitor web tool
Python
4
star
37

DREML

A PyTorch implementation of DREML based on ECCV 2018 paper "Deep Randomized Ensembles for Metric Learning"
Python
3
star
38

ACNet

A PyTorch implementation of ACNet based on TCSVT 2023 paper "ACNet: Approaching-and-Centralizing Network for Zero-Shot Sketch-Based Image Retrieval"
Python
3
star
39

RCDNet

A PyTorch implementation of RCDNet based on CVPR 2020 paper "A Model-driven Deep Neural Network for Single Image Rain Removal"
Python
3
star
40

ClipPrompt

A PyTorch implementation of ClipPrompt based on CVPR 2023 paper "CLIP for All Things Zero-Shot Sketch-Based Image Retrieval, Fine-Grained or Not"
Python
3
star
41

IDIP

A PyTorch implementation of IDIP based on ECAI 2023 paper "Instance-aware Diffusion Implicit Process for Box-based Instance Segmentation"
Python
3
star
42

Templates

Some specific domains' templates, including Android App, Deep Learning and Web.
CSS
3
star
43

UM

A PyTorch implementation of UM based on AAAI 2021 paper "Weakly-supervised Temporal Action Localization by Uncertainty Modeling"
Python
2
star
44

Near

"附近"APP,利用AR进行附近场所的导航
Java
2
star
45

EGFF

A PyTorch implementation of EGFF based on NPL 2022 paper "Energy-Guided Feature Fusion for Zero-Shot Sketch-Based Image Retrieval"
Python
2
star
46

CycleGAN

A PyTorch implementation of CycleGAN based on ICCV 2017 paper "Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks"
Python
2
star
47

Olist

A Python implementation of our database project
HTML
1
star
48

Living

一个房屋推荐与观览的Android APP,具有良好的界面设计与简单的操作
Java
1
star
49

RSC

A PyTorch implementation of RSC based on MMM 2023 paper "Weakly-supervised Temporal Action Localization with Regional Similarity Consistency"
Python
1
star
50

FlappyBird

FlappyBird implemented by Haskell
Haskell
1
star