NickKolok commited on
Commit
28c5394
1 Parent(s): 926566e

Do not resize

Browse files
Files changed (1) hide show
  1. app.py +0 -4
app.py CHANGED
@@ -8,10 +8,6 @@ os.system('wget https://github.com/JingyunLiang/SwinIR/releases/download/v0.0/00
8
 
9
  def inference(img):
10
  os.system('mkdir test')
11
- basewidth = 256
12
- wpercent = (basewidth/float(img.size[0]))
13
- hsize = int((float(img.size[1])*float(wpercent)))
14
- img = img.resize((basewidth,hsize), Image.ANTIALIAS)
15
  img.save("test/1.jpg", "JPEG")
16
  os.system('python main_test_swinir.py --task real_sr --model_path experiments/pretrained_models/003_realSR_BSRGAN_DFO_s64w8_SwinIR-M_x4_GAN.pth --folder_lq test --scale 4')
17
  return 'results/swinir_real_sr_x4/1_SwinIR.png'
 
8
 
9
  def inference(img):
10
  os.system('mkdir test')
 
 
 
 
11
  img.save("test/1.jpg", "JPEG")
12
  os.system('python main_test_swinir.py --task real_sr --model_path experiments/pretrained_models/003_realSR_BSRGAN_DFO_s64w8_SwinIR-M_x4_GAN.pth --folder_lq test --scale 4')
13
  return 'results/swinir_real_sr_x4/1_SwinIR.png'