Spaces:
Sleeping
Sleeping
Julián Tachella
commited on
Commit
·
26a9ba5
1
Parent(s):
8a7fe4e
test
Browse files
app.py
CHANGED
@@ -37,20 +37,22 @@ def image_mod(image, noise_level, denoiser):
|
|
37 |
return torch_to_pil(noisy), torch_to_pil(estimated)
|
38 |
|
39 |
|
40 |
-
input_image = gr.Image(label='Input Image')
|
41 |
output_images = gr.Image(label='Denoised Image')
|
42 |
noise_image = gr.Image(label='Noisy Image')
|
43 |
input_image_output = gr.Image(label='Input Image')
|
44 |
|
45 |
noise_levels = gr.Dropdown(choices=[0.1, 0.2, 0.3, 0.4, 0.5], value=0.1, label='Noise Level')
|
46 |
|
47 |
-
denoiser = gr.Dropdown(choices=['DnCNN', 'DRUNet', 'BM3D', 'MedianFilter'], value=
|
48 |
|
49 |
demo = gr.Interface(
|
50 |
image_mod,
|
51 |
inputs=[input_image, noise_levels, denoiser],
|
|
|
52 |
outputs=[noise_image, output_images],
|
53 |
title="Image Denoising with DeepInverse",
|
|
|
54 |
)
|
55 |
|
56 |
demo.launch()
|
|
|
37 |
return torch_to_pil(noisy), torch_to_pil(estimated)
|
38 |
|
39 |
|
40 |
+
input_image = gr.Image(label='Input Image', examples=[])
|
41 |
output_images = gr.Image(label='Denoised Image')
|
42 |
noise_image = gr.Image(label='Noisy Image')
|
43 |
input_image_output = gr.Image(label='Input Image')
|
44 |
|
45 |
noise_levels = gr.Dropdown(choices=[0.1, 0.2, 0.3, 0.4, 0.5], value=0.1, label='Noise Level')
|
46 |
|
47 |
+
denoiser = gr.Dropdown(choices=['DnCNN', 'DRUNet', 'BM3D', 'MedianFilter'], value='DnCNN', label='Denoiser')
|
48 |
|
49 |
demo = gr.Interface(
|
50 |
image_mod,
|
51 |
inputs=[input_image, noise_levels, denoiser],
|
52 |
+
examples=[['https://deepinv.github.io/deepinv/_static/deepinv_logolarge.png', 0.1, 'DnCNN']],
|
53 |
outputs=[noise_image, output_images],
|
54 |
title="Image Denoising with DeepInverse",
|
55 |
+
description="Denoise an image using a variety of denoisers and noise levels using the deepinverse library (https://deepinv.github.io/). We only include lightweight models like DnCNN and MedianFilter as this example is intended to be run on a CPU.",
|
56 |
)
|
57 |
|
58 |
demo.launch()
|