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
[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
-
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 streamlitbash run_st.sh