Commit abf11adb authored by Rayyyyy's avatar Rayyyyy
Browse files

Update README

parent 09cac702
# Contributors
None
\ No newline at end of file
......@@ -6,7 +6,7 @@
生成网络: 采用ESRGAN的生成网络, 对于x4倍的超分辨, 网络完全按照ESRGAN的生成器执行;对x2和x1倍的超分辨, 网络先进行pixel-unshuffle(pixel-shuffl的反操作, pixel-shuffle可理解为通过压缩图像通道而对图像尺寸进行放大), 以降低图像分辨率为前提, 对图像通道数进行扩充, 然后将处理后的图像输入网络进行超分辨重建。
<div align=center>
<img src="./doc/ESRGAN.png"/>
<img src="./doc/ESRGAN.png" width=2000 height=500/>
</div>
对抗网络: 由于使用的复杂的构建数据集的方式, 所以需要使用更先进的判别器对生成图像进行判别。使用U-Net判别器可以在像素角度, 对单个生成的像素进行真假判断, 这能够在保证生成图像整体真实的情况下, 注重生成图像细节。
......@@ -17,14 +17,13 @@
## 算法原理
通过使用更实用的退化过程合成训练对, 扩展强大的ESRGAN以恢复一般的真实世界LR图像。
<div align=center>
<img src="./doc/High-order的pipeline.png"/>
<img src="./doc/pipeline.png" width=2000 height=750/>
</div>
## 环境配置
-v 路径、docker_name和imageID根据实际情况修改
### Docker(方法一)
```bash
docker pull image.sourcefind.cn:5000/dcu/admin/base/pytorch:1.13.1-centos7.6-dtk-23.04.1-py38-latest
......@@ -36,7 +35,6 @@ python setup.py develop
```
### Dockerfile(方法二)
```bash
cd ./docker
......@@ -99,7 +97,7 @@ python gen_20k_val.py --root_path /path/of/ADE20K_2021_17_01 --save_path dataset
│ └── meta_info # 生成的
│ ├── OST
│ ├── train_HR # 将OST的HR图像放于这里
│ ├── train_HR_sub
│ ├── train_HR_sub
│ ├── ADE20K_2021_17_01
│ ├── images
│ ├── objects.txt
......@@ -214,15 +212,15 @@ train:
1. 下载预训练模型到 `experiments/pretrained_models` 目录下:
- *RealESRGAN_x4plus.pth*:
```bash
wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth -P experiments/pretrained_models
```
+ *RealESRGAN_x4plus.pth*:
```bash
wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth -P experiments/pretrained_models
```
- *RealESRGAN_x4plus_netD.pth*:
```bash
wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.2.3/RealESRGAN_x4plus_netD.pth -P experiments/pretrained_models
```
+ *RealESRGAN_x4plus_netD.pth*:
```bash
wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.2.3/RealESRGAN_x4plus_netD.pth -P experiments/pretrained_models
```
2. 修改选项文件 [options/finetune_realesrgan_x4plus.yml](options/finetune_realesrgan_x4plus.yml), 特别是 `datasets` 部分:
......@@ -301,7 +299,7 @@ bash run_train_multi.sh
## 推理
下载预训练模型[RealESRGAN_x4plus.pth](https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth), 将其放入 weights 文件夹下, 测试结果默认保存在results文件夹下。
```bash
```
# 下载预训练模型
wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth -P weights
# 执行推理
......@@ -316,7 +314,7 @@ Model: RealESRGAN_x4plus
</div>
### 精度
本项目基于ADE20K公开数据集的val数据进行效果验证,需先要对ADE20K val数据进行推理,得到推理后的结果(默认在results下).
本项目基于ADE20K公开数据集的val数据进行效果验证,需先要对ADE20K val数据进行推理,得到推理后的结果(默认在results下)计算 `NIQE` 得分。
```bash
# 执行推理
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment