codeslake commited on
Commit
7369de5
1 Parent(s): 7dbe13f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -29,7 +29,7 @@ os.makedirs(HR_Ref_path_T)
29
  os.system("wget https://www.dropbox.com/s/x33ka2jlzwsde7r/LR.png -O HR_LR1.png")
30
  os.system("wget https://www.dropbox.com/s/pp903wlz3syf68w/Ref.png -O HR_Ref1.png")
31
  os.system("wget https://www.dropbox.com/s/zl0h83x0le6ejfw/LR.png -O HR_LR2.png")
32
- os.system("wget https://www.dropbox.com/s/efyf042o7tb82gn/Ref.png -O HR_Ref2.png")
33
  os.system("wget https://www.dropbox.com/s/2u6lcfdhvcylklg/LR.png -O HR_LR3.png")
34
  os.system("wget https://www.dropbox.com/s/a7bwfy3gl26tvbq/Ref.png -O HR_Ref3.png")
35
 
@@ -63,8 +63,8 @@ def resize(img):
63
  ## inference
64
  def inference_8K(LR, Ref):
65
  ## resize for user selected input (not used)
66
- #LR = resize(LR)
67
- #Ref = resize(Ref)
68
 
69
  ## Input setup (creates folders and places inputs corresponding to the original RefVSR code)
70
  LR.save(os.path.join(LR_path, '0000.png'))
@@ -90,7 +90,7 @@ def inference_8K(LR, Ref):
90
  title="RefVSR"
91
  description="Demo application for Reference-based Video Super-Resolution (RefVSR). Upload a low-resolution frame and a reference frame to 'LR' and 'Ref' input windows, respectively. The demo runs on CPUs and takes about 120s."
92
 
93
- article = "<p style='text-align: center'><b>To check the full capability of the module, we recommend to clone Github repository and run RefVSR models on videos using GPUs.</b></p><p style='text-align: center'><div>This demo runs on CPUs and only supports RefVSR for a single LR and Ref frame due to computational complexity.</div><div>Hence, the model will not take advantage of temporal LR and Ref frames.</div></p><p style='text-align: center'>The model is trained by the proposed two-stage training strategy. The sample frames are in HD resolution (1920x1080) and saved in the PNG format. </p><p style='text-align: center'><a href='https://junyonglee.me/projects/RefVSR' target='_blank'>Project</a> | <a href='https://arxiv.org/abs/2203.14537' target='_blank'>arXiv</a> | <a href='https://github.com/codeslake/RefVSR' target='_blank'>Github</a></p>"
94
 
95
  ## resize for sample (not used)
96
  #LR = resize(Image.open('LR.png')).save('LR.png')
29
  os.system("wget https://www.dropbox.com/s/x33ka2jlzwsde7r/LR.png -O HR_LR1.png")
30
  os.system("wget https://www.dropbox.com/s/pp903wlz3syf68w/Ref.png -O HR_Ref1.png")
31
  os.system("wget https://www.dropbox.com/s/zl0h83x0le6ejfw/LR.png -O HR_LR2.png")
32
+ os.system("wget https://www.dropbox.com/s/9hzupmc3clt0f0e/Ref.png -O HR_Ref2.png")
33
  os.system("wget https://www.dropbox.com/s/2u6lcfdhvcylklg/LR.png -O HR_LR3.png")
34
  os.system("wget https://www.dropbox.com/s/a7bwfy3gl26tvbq/Ref.png -O HR_Ref3.png")
35
 
63
  ## inference
64
  def inference_8K(LR, Ref):
65
  ## resize for user selected input (not used)
66
+ LR = resize(LR)
67
+ Ref = resize(Ref)
68
 
69
  ## Input setup (creates folders and places inputs corresponding to the original RefVSR code)
70
  LR.save(os.path.join(LR_path, '0000.png'))
90
  title="RefVSR"
91
  description="Demo application for Reference-based Video Super-Resolution (RefVSR). Upload a low-resolution frame and a reference frame to 'LR' and 'Ref' input windows, respectively. The demo runs on CPUs and takes about 120s."
92
 
93
+ article = "<p style='text-align: center'><b>To check the full capability of the module, we recommend to clone Github repository and run RefVSR models on videos using GPUs.</b></p><p style='text-align: center'>This demo runs on CPUs and only supports RefVSR for a single LR and Ref frames due to computational complexity.<br>Hence, the model <b>will not take advantage</b> of temporal LR and Ref frames.</p><p style='text-align: center'>Moreover, the model is trained <b>only with the proposed pre-training strategy</b> to cope with downsampled sample frames, which are in the 480x270 resolution.</p><p style='text-align: center'>For user given frames, the size will be adjusted for the longer side of the frames to have 480 pixels.</p><p style='text-align: center'><a href='https://junyonglee.me/projects/RefVSR' target='_blank'>Project</a> | <a href='https://arxiv.org/abs/2203.14537' target='_blank'>arXiv</a> | <a href='https://github.com/codeslake/RefVSR' target='_blank'>Github</a></p>"
94
 
95
  ## resize for sample (not used)
96
  #LR = resize(Image.open('LR.png')).save('LR.png')