Spaces:
Sleeping
Sleeping
cleaning up
Browse files
utils.py
CHANGED
|
@@ -4,7 +4,6 @@ import deepinv as dinv
|
|
| 4 |
|
| 5 |
from models.unext_wip import UNeXt
|
| 6 |
from models.unrolled_dpir import get_unrolled_architecture
|
| 7 |
-
from models.PDNet import get_PDNet_architecture
|
| 8 |
from physics.multiscale import Pad
|
| 9 |
|
| 10 |
|
|
@@ -111,10 +110,7 @@ def get_model(
|
|
| 111 |
"""
|
| 112 |
model_name = model_name.lower()
|
| 113 |
|
| 114 |
-
if model_name == "
|
| 115 |
-
return get_PDNet_architecture(in_channels=in_channels, out_channels=in_channels, device=device)
|
| 116 |
-
|
| 117 |
-
elif model_name == "unext_emb_physics_config_c":
|
| 118 |
n_chan = [1, 2, 3] # 6 for old head grayscale, complex and color = 1 + 2 + 3
|
| 119 |
residual = True if "residual" in model_name else False
|
| 120 |
nc = [nc_base * 2**i for i in range(4)]
|
|
@@ -149,4 +145,4 @@ def get_model(
|
|
| 149 |
return ArtifactRemoval(model, pinv=False, device=device)
|
| 150 |
|
| 151 |
else:
|
| 152 |
-
raise ValueError(f"Model {model_name} is not supported.")
|
|
|
|
| 4 |
|
| 5 |
from models.unext_wip import UNeXt
|
| 6 |
from models.unrolled_dpir import get_unrolled_architecture
|
|
|
|
| 7 |
from physics.multiscale import Pad
|
| 8 |
|
| 9 |
|
|
|
|
| 110 |
"""
|
| 111 |
model_name = model_name.lower()
|
| 112 |
|
| 113 |
+
if model_name == "unext_emb_physics_config_c":
|
|
|
|
|
|
|
|
|
|
| 114 |
n_chan = [1, 2, 3] # 6 for old head grayscale, complex and color = 1 + 2 + 3
|
| 115 |
residual = True if "residual" in model_name else False
|
| 116 |
nc = [nc_base * 2**i for i in range(4)]
|
|
|
|
| 145 |
return ArtifactRemoval(model, pinv=False, device=device)
|
| 146 |
|
| 147 |
else:
|
| 148 |
+
raise ValueError(f"Model {model_name} is not supported.")
|