Spaces:
Sleeping
Sleeping
Julián Tachella
commited on
Commit
·
8a7fe4e
1
Parent(s):
ba74db2
test
Browse files- app.py +5 -1
- requirements.txt +2 -1
app.py
CHANGED
@@ -26,6 +26,10 @@ def image_mod(image, noise_level, denoiser):
|
|
26 |
denoiser = dinv.models.DnCNN()
|
27 |
elif denoiser == 'MedianFilter':
|
28 |
denoiser = dinv.models.MedianFilter()
|
|
|
|
|
|
|
|
|
29 |
else:
|
30 |
raise ValueError("Invalid denoiser")
|
31 |
noisy = image + torch.randn_like(image) * noise_level
|
@@ -40,7 +44,7 @@ input_image_output = gr.Image(label='Input Image')
|
|
40 |
|
41 |
noise_levels = gr.Dropdown(choices=[0.1, 0.2, 0.3, 0.4, 0.5], value=0.1, label='Noise Level')
|
42 |
|
43 |
-
denoiser = gr.Dropdown(choices=['DnCNN', 'MedianFilter'], value=0.1, label='
|
44 |
|
45 |
demo = gr.Interface(
|
46 |
image_mod,
|
|
|
26 |
denoiser = dinv.models.DnCNN()
|
27 |
elif denoiser == 'MedianFilter':
|
28 |
denoiser = dinv.models.MedianFilter()
|
29 |
+
elif denoiser == 'BM3D':
|
30 |
+
denoiser = dinv.models.BM3D()
|
31 |
+
elif denoiser == 'DRUNet':
|
32 |
+
denoiser = dinv.models.DRUNet()
|
33 |
else:
|
34 |
raise ValueError("Invalid denoiser")
|
35 |
noisy = image + torch.randn_like(image) * noise_level
|
|
|
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=0.1, label='DRUNet')
|
48 |
|
49 |
demo = gr.Interface(
|
50 |
image_mod,
|
requirements.txt
CHANGED
@@ -1 +1,2 @@
|
|
1 |
-
deepinv
|
|
|
|
1 |
+
deepinv
|
2 |
+
bm3d
|