HungHN commited on
Commit
fc6ae8e
1 Parent(s): 3f5bb4a

config setup

Browse files
Files changed (2) hide show
  1. app.py +6 -6
  2. setup.sh +3 -1
app.py CHANGED
@@ -10,12 +10,12 @@ from gfpgan.utils import GFPGANer
10
  from realesrgan.utils import RealESRGANer
11
 
12
  # download weights for RealESRGAN
13
- if not os.path.exists('model_zoo/real/RealESRGAN_x4plus.pth'):
14
- os.system("wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth -P model_zoo/real")
15
- if not os.path.exists('model_zoo/gan/GFPGANv1.4.pth'):
16
- os.system("wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.4.pth -P model_zoo/gan")
17
- if not os.path.exists('model_zoo/swinir/003_realSR_BSRGAN_DFO_s64w8_SwinIR-M_x4_GAN.pth'):
18
- os.system('wget https://github.com/JingyunLiang/SwinIR/releases/download/v0.0/003_realSR_BSRGAN_DFO_s64w8_SwinIR-M_x4_GAN.pth -P model_zoo/swinir')
19
 
20
  def inference(img, scale):
21
  model = RRDBNet(num_in_ch=3, num_out_ch=3, num_feat=64, num_block=23, num_grow_ch=32, scale=4)
 
10
  from realesrgan.utils import RealESRGANer
11
 
12
  # download weights for RealESRGAN
13
+ #if not os.path.exists('model_zoo/real/RealESRGAN_x4plus.pth'):
14
+ # os.system("wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth -P model_zoo/real")
15
+ #if not os.path.exists('model_zoo/gan/GFPGANv1.4.pth'):
16
+ # os.system("wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.4.pth -P model_zoo/gan")
17
+ #if not os.path.exists('model_zoo/swinir/003_realSR_BSRGAN_DFO_s64w8_SwinIR-M_x4_GAN.pth'):
18
+ # os.system('wget https://github.com/JingyunLiang/SwinIR/releases/download/v0.0/003_realSR_BSRGAN_DFO_s64w8_SwinIR-M_x4_GAN.pth -P model_zoo/swinir')
19
 
20
  def inference(img, scale):
21
  model = RRDBNet(num_in_ch=3, num_out_ch=3, num_feat=64, num_block=23, num_grow_ch=32, scale=4)
setup.sh CHANGED
@@ -1,3 +1,5 @@
1
  wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth -P model_zoo/real
2
  wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.4.pth -P model_zoo/gan
3
- wget https://github.com/JingyunLiang/SwinIR/releases/download/v0.0/003_realSR_BSRGAN_DFO_s64w8_SwinIR-M_x4_GAN.pth -P model_zoo/swinir
 
 
 
1
  wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth -P model_zoo/real
2
  wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.4.pth -P model_zoo/gan
3
+ wget https://github.com/JingyunLiang/SwinIR/releases/download/v0.0/003_realSR_BSRGAN_DFO_s64w8_SwinIR-M_x4_GAN.pth -P model_zoo/swinir
4
+ wget https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_Resnet50_Final.pth -P gfpgan/weights/detection_Resnet50_Final.pth
5
+ wget https://github.com/xinntao/facexlib/releases/download/v0.2.2/parsing_parsenet.pth -P gfpgan/weights/parsing_parsenet.pth