You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: deepinv/models/ram.py
+19-7Lines changed: 19 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,23 @@
14
14
15
15
classRAM(Reconstructor, Denoiser):
16
16
r"""
17
-
Reconstruct Anything Model.
17
+
Reconstruct Anything Model (RAM) foundation model.
18
18
19
-
This model (proposed in `this paper <https://arxiv.org/abs/2503.08915>`_) is a convolutional neural network (CNN)
20
-
designed for image reconstruction tasks.
19
+
Convolutional neural network model :footcite:t:`terris2025reconstruct` that has been trained to work on a large variety
20
+
of linear image reconstruction tasks and datasets (deblurring, inpainting, denoising, tomography, MRI, etc.).
21
+
22
+
See :ref:`sphx_glr_auto_examples_unfolded_demo_ram.py` for examples on the performance of RAM and how to fine-tune the
23
+
foundation model on a specific problem and dataset.
24
+
25
+
The model works both as a reconstructor or denoiser:
26
+
27
+
* Reconstructor: RAM takes a :ref:`physics operator <physics>` `model(y, physics)` with an optional noise model defined in the physics
28
+
* Denoiser: RAM takes optional Gaussian and/or Poisson noise levels (optionally set to 0) `model(y, sigma=sigma, gamma=gamma)`
29
+
30
+
.. note::
31
+
32
+
The physics operator should be normalized (i.e. have unit norm) for best results.
33
+
Use :func:`physics.compute_norm() <deepinv.physics.LinearPhysics.compute_norm>` to check this.
21
34
22
35
:param list in_channels: Number of input channels. If a list is provided, the model will have separate heads for each channel.
23
36
:param str device: Device to which the model should be moved. If None, the model will be created on the default device.
@@ -241,10 +254,10 @@ def forward(self, y, physics=None, sigma=None, gain=None):
241
254
242
255
x_in=physics.A_adjoint(y)
243
256
244
-
sigma=self.threshold_snr(sigma, y, physics, threshold=self.sigma_threshold)
0 commit comments