Skip to content

ZIFENG278/Real-ESRGAN-tpu_Web

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Real-ESRGAN-TPU v2.0

Run Real-ESRGAN on Sophon TPU

chip support: SG2300X, BM1684X

platform support: ARM, X86

Tested device: Radxa Fogwise® AirBox, Sophon SC7+

✨Support run by gradio or streamlit (do not maintain)

🌟Support upscale video and image

🌠Support models: RealESRGAN_x4plus, RealESRGAN_x4plus_anime_6B, realesr-animevideo_v3, realesr-general-x4v3

🏆Support Face Enhance: CodeFormer, GFPGAN

🌟Support Background Remove: RMBG

🌠Support DIY Background Picture

Real-ESRGAN: Training Real-World Blind Super-Resolution with Pure Synthetic Data

[Paper]   [YouTube Video]   [B站讲解]   [Poster]   [PPT slides] Xintao Wang, Liangbin Xie, Chao Dong, Ying Shan Tencent ARC Lab; Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences

img

Usage

  • Clone the repo

    git clone https://github.com/zifeng-radxa/Real-ESRGAN-tpu_Web.git
  • Clone the tool-box

    cd Real-ESRGAN-tpu_Web
    git clone https://github.com/zifeng-radxa/FACEXLIB.git
  • Setup environment

    pip3 install -r requirements.txt
    ## aarch64
    pip3 install https://github.com/radxa-edge/TPU-Edge-AI/releases/download/v0.1.0/tpu_perf-1.2.31-py3-none-manylinux2014_aarch64.whl
    ## x86
    pip3 install https://github.com/radxa-edge/TPU-Edge-AI/releases/download/v0.1.0/tpu_perf-1.2.31-py3-none-manylinux2014_x86_64.whl
  • Instal FFmpeg (do not support sophon-ffmpeg)

    sudo apt install ffmpeg
  • Download models

    python3 download_models.py
  • Run the boot script

    • Run by gradio
    bash run_gr.sh

    - (Optional) Run by streamlit

    bash run_st.sh

upscale_comparison

About

Real-ESRGAN run on BM1684X

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.1%
  • Shell 0.9%