Spaces:
Runtime error
Runtime error
Commit
·
37357a8
1
Parent(s):
25da2a5
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,8 +4,7 @@ import os
|
|
| 4 |
|
| 5 |
os.system("git clone https://github.com/megvii-research/NAFNet")
|
| 6 |
os.system("mv NAFNet/* ./")
|
| 7 |
-
os.system("mv
|
| 8 |
-
os.system("mv NAFNet-SIDD-width64.pth experiments/pretrained_models/")
|
| 9 |
os.system("python3 setup.py develop --no_cuda_ext --user")
|
| 10 |
|
| 11 |
|
|
@@ -20,11 +19,10 @@ def inference(image, task):
|
|
| 20 |
if task == 'Deblurring':
|
| 21 |
os.system("python basicsr/demo.py -opt options/test/REDS/NAFNet-width64.yml --input_path ./tmp/image.png --output_path ./tmp/image.png")
|
| 22 |
|
| 23 |
-
return
|
| 24 |
-
|
| 25 |
-
|
| 26 |
title = "NAFNet"
|
| 27 |
-
description = "Gradio demo for <b>NAFNet: Nonlinear Activation Free Network for Image Restoration</b>. NAFNet achieves state-of-the-art performance on three tasks: image denoising, image debluring and stereo image super-resolution. See the paper and project page for detailed results below. Here, we provide a demo for image denoise and deblur. To use it, simply upload your image, or click one of the examples to load them."
|
| 28 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2204.04676' target='_blank'>Simple Baselines for Image Restoration</a> | <a href='https://arxiv.org/abs/2204.08714' target='_blank'>NAFSSR: Stereo Image Super-Resolution Using NAFNet</a> | <a href='https://github.com/megvii-research/NAFNet' target='_blank'> Github Repo</a></p>"
|
| 29 |
|
| 30 |
|
|
|
|
| 4 |
|
| 5 |
os.system("git clone https://github.com/megvii-research/NAFNet")
|
| 6 |
os.system("mv NAFNet/* ./")
|
| 7 |
+
os.system("mv *.pth experiments/pretrained_models/")
|
|
|
|
| 8 |
os.system("python3 setup.py develop --no_cuda_ext --user")
|
| 9 |
|
| 10 |
|
|
|
|
| 19 |
if task == 'Deblurring':
|
| 20 |
os.system("python basicsr/demo.py -opt options/test/REDS/NAFNet-width64.yml --input_path ./tmp/image.png --output_path ./tmp/image.png")
|
| 21 |
|
| 22 |
+
return 'tmp/image.png'
|
| 23 |
+
|
|
|
|
| 24 |
title = "NAFNet"
|
| 25 |
+
description = "Gradio demo for <b>NAFNet: Nonlinear Activation Free Network for Image Restoration</b>. NAFNet achieves state-of-the-art performance on three tasks: image denoising, image debluring and stereo image super-resolution (SR). See the paper and project page for detailed results below. Here, we provide a demo for image denoise and deblur. To use it, simply upload your image, or click one of the examples to load them."
|
| 26 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2204.04676' target='_blank'>Simple Baselines for Image Restoration</a> | <a href='https://arxiv.org/abs/2204.08714' target='_blank'>NAFSSR: Stereo Image Super-Resolution Using NAFNet</a> | <a href='https://github.com/megvii-research/NAFNet' target='_blank'> Github Repo</a></p>"
|
| 27 |
|
| 28 |
|