https://github.com/mathiasgruber/srgan-keras
Implementation of SRGAN in Keras. Try at: www.fixmyphoto.ai
https://github.com/mathiasgruber/srgan-keras
Last synced: 3 months ago
JSON representation
Implementation of SRGAN in Keras. Try at: www.fixmyphoto.ai
- Host: GitHub
- URL: https://github.com/mathiasgruber/srgan-keras
- Owner: MathiasGruber
- License: mit
- Created: 2018-04-08T13:19:38.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-10T19:31:20.000Z (over 6 years ago)
- Last Synced: 2025-03-17T00:01:41.234Z (3 months ago)
- Language: Jupyter Notebook
- Homepage:
- Size: 74.8 MB
- Stars: 81
- Watchers: 6
- Forks: 37
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SRGAN-Keras
Keras implementation of ["Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network"](https://arxiv.org/abs/1609.04802)## 1. Architecture
The generator creates a high-resolution (HR) image (4x upscaled) from a corresponding low-resolution (LR) image. The discriminator distinguishes the generated (fake) HR images from the original HR images.### 1.1. Generator & Discriminator
[Figure 4 from paper](https://arxiv.org/abs/1609.04802): Architecture of Generator and Discriminator Network with corresponding kernel size (k), number of feature maps
(n) and stride (s) indicated for each convolutional layer.### 1.2. Overview of input / outputs
**Code Overview**: Overview of the three networks; generator, discriminator, and VGG19. Generator create SR image from LR, discriminator predicts whether it's a SR or original HR, and VGG19 extracts features from generated SR and original HR images.
## 2. Content & Adversarial Loss
**Losses Overview**: The perceptual loss is a combination of content loss (based on VGG19 features) and adversarial loss. Equations are taken directly from ["original paper"](https://arxiv.org/abs/1609.04802).
## 3. Using this repository
### 3.1. Training
A command-line interface can be found in `train.py`. To train run e.g.:
```
python train.py \
--train \
--validation \
--scale 4 \
--test_path images/samples_4X \
--stage all
```### 3.2. Testing
Check the example_usage notebook: [example_usage.ipynb](./Example_Usage.ipynb)