codeslake commited on
Commit
cbbc326
·
1 Parent(s): 8c98fa3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -85,17 +85,17 @@ def inference(LR, Ref):
85
  title="RefVSR | 4xVSR"
86
  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 150s."
87
 
88
- 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 frame 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 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>"
89
 
90
  ## resize for sample
91
  LR = resize(Image.open('LR.png')).save('LR.png')
92
  Ref = resize(Image.open('Ref.png')).save('Ref.png')
93
 
94
  ## input
95
- examples=[['LR.png', 'Ref.png']]
96
 
97
  ## interface
98
- gr.Interface(inference,[gr.inputs.Image(type="pil"), gr.inputs.Image(type="pil")],gr.outputs.Image(type="file"),title=title,description=description,article=article,theme ="peach",examples=examples).launch(enable_queue=True)
99
 
100
  #################### 8K ##################
101
  ## inference
 
85
  title="RefVSR | 4xVSR"
86
  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 150s."
87
 
88
+ 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 frame 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>"
89
 
90
  ## resize for sample
91
  LR = resize(Image.open('LR.png')).save('LR.png')
92
  Ref = resize(Image.open('Ref.png')).save('Ref.png')
93
 
94
  ## input
95
+ examples=[['LR.png', "LR"], ['Ref.png', "Ref"]]
96
 
97
  ## interface
98
+ gr.Interface(inference,[["LR", gr.inputs.Image(type="pil")], ["Ref (recommended to have 2x resolution of LR)", gr.inputs.Image(type="pil")]], ["Output (4x)", gr.outputs.Image(type="file")],title=title,description=description,article=article,theme ="peach",examples=examples).launch(enable_queue=True)
99
 
100
  #################### 8K ##################
101
  ## inference