codeslake commited on
Commit
d9b11af
1 Parent(s): 0d5c2df

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -33,8 +33,8 @@ def resize(width,img):
33
  return img
34
 
35
  def inference(LR, Ref):
36
- LR = resize(256, LR)
37
- Ref = resize(256, Ref)
38
 
39
  LR.save(os.path.join(LR_path, '0000.png'))
40
  Ref.save(os.path.join(Ref_path, '0000.png'))
@@ -60,6 +60,11 @@ description="Demo application for Reference-based Video Super-Resolution (RefVSR
60
 
61
  article = "<p style='text-align: center'>This demo only supports RefVSR for a single LR and Ref frame due to computational complexity. Hence, the model might not take advantage of temporal frames.</p><p style='text-align: center'>The model is our small 8K model trained with the proposed two-stage training strategy.</p><p style='text-align: center'>The spatial size of input LR and Ref frames is 1920x1080 (HD), 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>"
62
 
 
 
 
 
 
63
  examples=[[['LR.png'], ['Ref.png']]]
64
 
65
  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)
 
33
  return img
34
 
35
  def inference(LR, Ref):
36
+ LR = resize(256, 'LR.png')
37
+ Ref = resize(256, 'Ref.png')
38
 
39
  LR.save(os.path.join(LR_path, '0000.png'))
40
  Ref.save(os.path.join(Ref_path, '0000.png'))
 
60
 
61
  article = "<p style='text-align: center'>This demo only supports RefVSR for a single LR and Ref frame due to computational complexity. Hence, the model might not take advantage of temporal frames.</p><p style='text-align: center'>The model is our small 8K model trained with the proposed two-stage training strategy.</p><p style='text-align: center'>The spatial size of input LR and Ref frames is 1920x1080 (HD), 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>"
62
 
63
+ LR = resize(256, 'LR.png')
64
+ Ref = resize(256, 'Ref.png')
65
+ LR.save('LR.png')
66
+ Ref.save('Ref.png')
67
+
68
  examples=[[['LR.png'], ['Ref.png']]]
69
 
70
  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)