Simple image to upscaling images and videos in by Real-ESRGAN
- 将图片或视频放入
data/input
文件夹 - 在
docker-compose.yml
可以自定义输入输出文件夹,均从data/
目录进行,输入文件夹默认为data/input
,输出文件夹为data/output
- 使用以下命令启动
sudo docker-compose up
Usage: python inference_realesrgan.py -n RealESRGAN_x4plus -i infile -o outfile [options]...
A common command: python inference_realesrgan.py -n RealESRGAN_x4plus -i infile --outscale 3.5 --face_enhance
-h show this help
-i --input Input image or folder. Default: inputs
-o --output Output folder. Default: results
-n --model_name Model name. Default: RealESRGAN_x4plus
-s, --outscale The final upsampling scale of the image. Default: 4
--suffix Suffix of the restored image. Default: out
-t, --tile Tile size, 0 for no tile during testing. Default: 0
--face_enhance Whether to use GFPGAN to enhance face. Default: False
--fp32 Use fp32 precision during inference. Default: fp16 (half precision).
--ext Image extension. Options: auto | jpg | png, auto means using the same extension as inputs. Default: auto
本库为简化版本,只有输入输出和模型自定义,暂未开放其他参数,可以自行到scripts/start.sh
修改
由于与官方环境有出入,docker 选择了带有 torch 的镜像,我对requirements.txt
进行了修改,无需重复安装 torch 和 torchvision
这一改就是三天两夜,终于跑通了。
@InProceedings{wang2021realesrgan,
author = {Xintao Wang and Liangbin Xie and Chao Dong and Ying Shan},
title = {Real-ESRGAN: Training Real-World Blind Super-Resolution with Pure Synthetic Data},
booktitle = {International Conference on Computer Vision Workshops (ICCVW)},
date = {2021}
}