Skip to content

ArSrNa/Real-ESRGAN-Docker

Repository files navigation

badge badge badge

Real-ESRGAN-docker

Simple image to upscaling images and videos in by Real-ESRGAN

准备数据

  1. 将图片或视频放入data/input文件夹
  2. docker-compose.yml可以自定义输入输出文件夹,均从data/目录进行,输入文件夹默认为data/input,输出文件夹为data/output
  3. 使用以下命令启动
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修改

python 环境修改

由于与官方环境有出入,docker 选择了带有 torch 的镜像,我对requirements.txt进行了修改,无需重复安装 torch 和 torchvision

这一改就是三天两夜,终于跑通了。

BibTeX

@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}
}

About

支持GPU的Real-ESRGAN docker镜像

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published