SRGAN-master
所属分类:图形图像处理
开发工具:Python
文件大小:27834KB
下载次数:43
上传日期:2017-11-02 10:53:45
上 传 者:
lxy95
说明: 这是一个基于深度学习的超分辨率图像复原技术的例子
(This is a deep learning based super-resolution image restoration technology for example)
文件列表:
config.py (1048, 2017-09-04)
download_imagenet.py (2169, 2017-09-04)
img (0, 2017-09-04)
img\SRGAN Result.pptx (11568038, 2017-09-04)
img\SRGAN Result2.pptx (13720555, 2017-09-04)
img\SRGAN Result3.pptx (687184, 2017-09-04)
img\SRGAN_Result.png (505606, 2017-09-04)
img\SRGAN_Result2.png (485861, 2017-09-04)
img\SRGAN_Result3.png (1234580, 2017-09-04)
img\model.jpeg (287980, 2017-09-04)
main.py (16671, 2017-09-04)
model.py (23290, 2017-09-04)
tensorlayer (0, 2017-09-04)
tensorlayer\__init__.py (677, 2017-09-04)
tensorlayer\activation.py (3284, 2017-09-04)
tensorlayer\cost.py (22817, 2017-09-04)
tensorlayer\db.py (16624, 2017-09-04)
tensorlayer\files.py (33051, 2017-09-04)
tensorlayer\iterate.py (15994, 2017-09-04)
tensorlayer\layers.py (264811, 2017-09-04)
tensorlayer\nlp.py (32835, 2017-09-04)
tensorlayer\ops.py (5981, 2017-09-04)
tensorlayer\prepro.py (62978, 2017-09-04)
tensorlayer\rein.py (3359, 2017-09-04)
tensorlayer\utils.py (22312, 2017-09-04)
tensorlayer\visualize.py (12432, 2017-09-04)
utils.py (819, 2017-09-04)
## Super Resolution Examples
We run this script under [TensorFlow](https://www.tensorflow.org) 1.2 and the self-contained [TensorLayer](http://tensorlayer.readthedocs.io/en/latest/). If you got error, you may need to update TensorLayer.
This repo may be merged into [tensorlayer](https://github.com/zsdonghao/tensorlayer) soon.
### SRGAN Architecture
TensorFlow Implementation of ["Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network"](https://arxiv.org/abs/1609.04802)
### Results
### Prepare Data and Pre-trained VGG
- 1. You need to download the pretrained VGG19 model in [here](https://mega.nz/#!xZ8glS6J!MAnE91ND_WyfZ_8mvkuSa2YcA7q-1ehfSm-Q1fxOvvs) as [tutorial_vgg19.py](https://github.com/zsdonghao/tensorlayer/blob/master/example/tutorial_vgg19.py) show.
- 2. You need to have the high resolution images for training.
- In this experiment, I used images from [DIV2K - bicubic downscaling x4 competition](http://www.vision.ee.ethz.ch/ntire17/), so the hyper-paremeters in `config.py` (like number of epochs) are seleted basic on that dataset, if you change a larger dataset you can reduce the number of epochs.
- If you dont want to use DIV2K dataset, you can also use [Yahoo MirFlickr25k](http://press.liacs.nl/mirflickr/mirdownload.html), just simply download it using `train_hr_imgs = tl.files.load_flickr25k_dataset(tag=None)` in `main.py`.
- If you want to use your own images, you can set the path to your image folder via `config.TRAIN.hr_img_path` in `config.py`.
### Run
- Set your image folder in `config.py`, if you download [DIV2K - bicubic downscaling x4 competition](http://www.vision.ee.ethz.ch/ntire17/) dataset, you don't need to change it.
- Other links for DIV2K, in case you can't find it : [test\_LR\_bicubic_X4](https://data.vision.ee.ethz.ch/cvl/DIV2K/validation_release/DIV2K_test_LR_bicubic_X4.zip), [train_HR](https://data.vision.ee.ethz.ch/cvl/DIV2K/DIV2K_train_HR.zip), [train\_LR\_bicubic_X4](https://data.vision.ee.ethz.ch/cvl/DIV2K/DIV2K_train_LR_bicubic_X4.zip), [valid_HR](https://data.vision.ee.ethz.ch/cvl/DIV2K/validation_release/DIV2K_valid_HR.zip), [valid\_LR\_bicubic_X4](https://data.vision.ee.ethz.ch/cvl/DIV2K/DIV2K_valid_LR_bicubic_X4.zip).
```python
config.TRAIN.img_path = "your_image_folder/"
```
- Start training.
```bash
python main.py
```
- Start evaluation.
```bash
python main.py --mode=evaluate
```
### Reference
* [1] [Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network](https://arxiv.org/abs/1609.04802)
* [2] [Is the deconvolution layer the same as a convolutional layer ?](https://arxiv.org/abs/1609.07009)
### License
- For academic and non-commercial use only.
- For commercial use, please contact dhsig552@163.com.
近期下载者:
相关文件:
收藏者: