English | 简体中文
[TOC]
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
torch:average_NIQE=2.174
paddle:average_NIQE=2.132
pretrain GAN
Address:Baidu cloud disk Extraction code:f35u
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
scipy==1.2.1
paddlepaddle==2.1.2
numpy==1.20.1
# clone this repo
git https://github.com/Martion-z/Paddle-PULSE.git
cd Paddle-PULSE-main
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
python3 run.py
Just wait for the results. The output result (1024x1024) is stored in the output1024 folder.
./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
Parameters | Default | Explanation |
---|---|---|
input_dir | input | The path of the input |
output_dir | Output1024 | The path of the output |
batch_size | 1 | Batchsize |
seed | 0 | Random seed |
eps | 2e-3 | Optimizer |
opt_name | adam | The class of Optimizer |
steps | 100 | The number of iterations to find the best picture |
Field | Content |
---|---|
Author | 皮蛋瘦肉周 |
Date | 2021.08 |
Framework version | paddlepaddle 2.1.2 |
Application scenarios | Image Supper-Resolution |
Supported hardware | CPU、GPU |