GithubHelp home page GithubHelp logo

sebaro / real-esrgan Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xinntao/real-esrgan

0.0 0.0 0.0 5.65 MB

Real-ESRGAN aims at developing Practical Algorithms for General Image/Video Restoration.

License: BSD 3-Clause "New" or "Revised" License

Python 92.00% C++ 3.21% Cuda 4.79%

real-esrgan's Introduction

General Image/Video Restoration

▶️ Real-ESRGAN

Face Restoration

▶️ GFPGAN
▶️ CodeFormer
▶️ RestoreFormer

Dependencies

Installation

  1. Clone repo

    git clone https://github.com/sebaro/Real-ESRGAN.git
    cd Real-ESRGAN
  2. Install dependent packages

    pip install -r requirements.txt

Inference

Usage: python inference_realesrgan.py -n RealESRGAN_x4plus -i infile -o outfile [options]...

  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        Input image or folder
  -o OUTPUT, --output OUTPUT
                        Output folder
  -n MODEL_NAME, --model_name MODEL_NAME
                        Model names: RealESRGAN_x4plus | RealESRNet_x4plus | RealESRGAN_x4plus_anime_6B | RealESRGAN_x2plus | realesr-animevideov3 |
                        realesr-general-x4v3. Default: RealESRGAN_x4plus
  -dn DENOISE_STRENGTH, --denoise_strength DENOISE_STRENGTH
                        Denoise strength. 0 for weak denoise (keep noise), 1 for strong denoise ability. Only used for the realesr-general-x4v3 model
  -s OUTSCALE, --outscale OUTSCALE
                        The final upsampling scale of the image
  --model_path MODEL_PATH
                        [Option] Model path. Usually, you do not need to specify it
  --suffix SUFFIX       Suffix of the restored image
  -t TILE, --tile TILE  Tile size, 0 for no tile during testing
  --tile_pad TILE_PAD   Tile padding
  --pre_pad PRE_PAD     Pre padding size at each border
  --pre_enhance         Enhance image before upscaling
  --face_enhance        Use GFPGAN to enhance face
  --face_enhance_arch FACE_ENHANCE_ARCH
                        Face enhance arch: CodeFormer | GFPGAN | RestoreFormer | RestoreFormer++. Default: CodeFormer
  --face_enhance_model FACE_ENHANCE_MODEL
                        Face enhance model for GFPGAN: 1.4 | 1.3 | 1.2. Default: 1.4
  --face_enhance_fidelity FACE_ENHANCE_FIDELITY
                        Face enhance fidelity. Default: 1
  --face_upsample       Face upsample after enhancement. Default: False
  --face_upsample_model FACE_UPSAMPLE_MODEL
                        Model names: RealESRGAN_x4plus | RealESRNet_x4plus | RealESRGAN_x4plus_anime_6B | RealESRGAN_x2plus | realesr-animevideov3 |
                        realesr-general-x4v3. Default: RealESRGAN_x4plus
  --face_offset FACE_OFFSET
                        Face offset for more precise back alignment. Default: 0
  --fp32                Use fp32 precision during inference. Default: fp16 (half precision).
  --alpha_upsampler ALPHA_UPSAMPLER
                        The upsampler for the alpha channels. Options: realesrgan | bicubic
  --ext EXT             Image extension. Options: auto | jpg | png, auto means using the same extension as inputs
  -g GPU_ID, --gpu-id GPU_ID
                        gpu device to use (default=None) can be 0,1,2 for multi-gpu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.