一、Introduction

September 30, 2021 · View on GitHub

English | 简体中文

[TOC]

一、Introduction

An implementation of the SR models (PULSE) proposed in paper PULSE: Self-Supervised Photo Upsampling via Latent Space Exploration of Generative Models with PaddlePaddle. PULSE traverses the high-resolution natural image manifold, searching for images that downscale to the original LR image.This is formalized through the “down-scaling loss,” which guides exploration through the latent space of a generative model.

Reference Project:

- https://github.com/adamian98/pulse

AI Studio Project:

- notebook task:https://aistudio.baidu.com/aistudio/projectdetail/2255411

二、Accuracy

2.1 Visual Comparison

image

image

2.2 NIQE

torch:average_NIQE=2.174

image

paddle:average_NIQE=2.132

image

pretrain GAN

Address:Baidu cloud disk Extraction code:f35u

三、Dataset

The input picture needs to be placed in the input folder, which is the same as [original reference code]( https://github.com/adamian98/pulse )Consistent, the input image is 16 × 16 celabahq face dataset:

https://pan.baidu.com/s/1wGbZ4UxPDpQj2gV_Zq37pQ Extraction code: mo0s

四、Environment

scipy==1.2.1
paddlepaddle==2.1.2
numpy==1.20.1

五、Quick Start

Step1: Clone

# clone this repo
git https://github.com/Martion-z/Paddle-PULSE.git
cd Paddle-PULSE-main

Step2: Load pretrain GAN model

Before running, you need to download the weight of the pre training network in advance. Place the weight file(styleGan.pdparams) in the models/cache folder. The model address:

Baidu cloud disk Extraction code: f35u

Step3: Run

python3 run.py

Just wait for the results. The output result (1024x1024) is stored in the output1024 folder.

六、Code Structure and Explanation

6.1 Code Structure

./Paddle-Pulse
|-- images               
       |--input          #the path of input
       |--output1024		#the path of output
|-- models               
       |--cache 		#store the weight of model
       |--loss			#loss
       |--utils			#tool API
       |--pulse.py		#network of PULSE
       |--stylegan_paddle.py	#stylegan
|-- utils                #public tool API
|-- run.py					#main
|-- README.md            
|-- README_cn.md

6.2 Parameter Explanation

ParametersDefaultExplanation
input_dirinputThe path of the input
output_dirOutput1024The path of the output
batch_size1Batchsize
seed0Random seed
eps2e-3Optimizer
opt_nameadamThe class of Optimizer
steps100The number of iterations to find the best picture

七、Model Infomation

FieldContent
Author皮蛋瘦肉周
Date2021.08
Framework versionpaddlepaddle 2.1.2
Application scenariosImage Supper-Resolution
Supported hardwareCPU、GPU