Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements vSHARP model (2D) #271

Merged
merged 8 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 18 additions & 15 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@
DIRECT: Deep Image REConstruction Toolkit
=========================================

``DIRECT`` is a Python, end-to-end pipeline for solving Inverse Problems emerging in Imaging Processing. It is built with PyTorch and stores state-of-the-art Deep Learning imaging inverse problem solvers such as denoising, dealiasing and reconstruction. By defining a base forward linear or non-linear operator, ``DIRECT`` can be used for training models for recovering images such as MRIs from partially observed or noisy input data.
``DIRECT`` stores inverse problem solvers such as the Learned Primal Dual algorithm, Recurrent Inference Machine and Recurrent Variational Network, which were part of the winning solution in Facebook & NYUs FastMRI challenge in 2019 and the Calgary-Campinas MRI reconstruction challenge at MIDL 2020. For a full list of the baselines currently implemented in DIRECT see `here <#baselines-and-trained-models>`_.
``DIRECT`` is a Python, end-to-end pipeline for solving Inverse Problems emerging in Imaging Processing.
It is built with PyTorch and stores state-of-the-art Deep Learning imaging inverse problem solvers such as denoising, dealiasing and reconstruction.
By defining a base forward linear or non-linear operator, ``DIRECT`` can be used for training models for recovering images such as MRIs from partially observed or noisy input data.
``DIRECT`` stores inverse problem solvers such as the vSHARP, Learned Primal Dual algorithm, Recurrent Inference Machine and Recurrent Variational Network, which were part of the winning solutions in Facebook & NYUs FastMRI challenge in 2019, the Calgary-Campinas MRI reconstruction challenge at MIDL 2020 and the CMRxRecon challenge 2023.
For a full list of the baselines currently implemented in DIRECT see `here <#baselines-and-trained-models>`_.

.. raw:: html

Expand All @@ -49,7 +52,7 @@ In the `projects <https://github.com/NKI-AI/direct/tree/main/projects>`_ folder
Baselines and trained models
----------------------------

We provide a set of baseline results and trained models in the `DIRECT Model Zoo <https://docs.aiforoncology.nl/direct/model_zoo.html>`_. Baselines and trained models include the `Recurrent Variational Network (RecurrentVarNet) <https://arxiv.org/abs/2111.09639>`_, the `Recurrent Inference Machine (RIM) <https://www.sciencedirect.com/science/article/abs/pii/S1361841518306078>`_, the `End-to-end Variational Network (VarNet) <https://arxiv.org/pdf/2004.06688.pdf>`_, the `Learned Primal Dual Network (LDPNet) <https://arxiv.org/abs/1707.06474>`_, the `X-Primal Dual Network (XPDNet) <https://arxiv.org/abs/2010.07290>`_, the `KIKI-Net <https://pubmed.ncbi.nlm.nih.gov/29624729/>`_, the `U-Net <https://arxiv.org/abs/1811.08839>`_, the `Joint-ICNet <https://openaccess.thecvf.com/content/CVPR2021/papers/Jun_Joint_Deep_Model-Based_MR_Image_and_Coil_Sensitivity_Reconstruction_Network_CVPR_2021_paper.pdf>`_, and the `AIRS Medical fastmri model (MultiDomainNet) <https://arxiv.org/pdf/2012.06318.pdf>`_.
We provide a set of baseline results and trained models in the `DIRECT Model Zoo <https://docs.aiforoncology.nl/direct/model_zoo.html>`_. Baselines and trained models include the `vSHARP <https://arxiv.org/abs/2309.09954>`_, `Recurrent Variational Network (RecurrentVarNet) <https://arxiv.org/abs/2111.09639>`_, the `Recurrent Inference Machine (RIM) <https://www.sciencedirect.com/science/article/abs/pii/S1361841518306078>`_, the `End-to-end Variational Network (VarNet) <https://arxiv.org/pdf/2004.06688.pdf>`_, the `Learned Primal Dual Network (LDPNet) <https://arxiv.org/abs/1707.06474>`_, the `X-Primal Dual Network (XPDNet) <https://arxiv.org/abs/2010.07290>`_, the `KIKI-Net <https://pubmed.ncbi.nlm.nih.gov/29624729/>`_, the `U-Net <https://arxiv.org/abs/1811.08839>`_, the `Joint-ICNet <https://openaccess.thecvf.com/content/CVPR2021/papers/Jun_Joint_Deep_Model-Based_MR_Image_and_Coil_Sensitivity_Reconstruction_Network_CVPR_2021_paper.pdf>`_, and the `AIRS Medical fastmri model (MultiDomainNet) <https://arxiv.org/pdf/2012.06318.pdf>`_.

License and usage
-----------------
Expand All @@ -63,15 +66,15 @@ If you use DIRECT in your own research, or want to refer to baseline results pub

.. code-block:: BibTeX

@misc{DIRECTTOOLKIT,
doi = {10.21105/joss.04278},
url = {https://doi.org/10.21105/joss.04278},
year = {2022},
publisher = {The Open Journal},
volume = {7},
number = {73},
pages = {4278},
author = {George Yiasemis and Nikita Moriakov and Dimitrios Karkalousos and Matthan Caan and Jonas Teuwen},
title = {DIRECT: Deep Image REConstruction Toolkit},
journal = {Journal of Open Source Software}
}
@article{DIRECTTOOLKIT,
doi = {10.21105/joss.04278},
url = {https://doi.org/10.21105/joss.04278},
year = {2022},
publisher = {The Open Journal},
volume = {7},
number = {73},
pages = {4278},
author = {George Yiasemis and Nikita Moriakov and Dimitrios Karkalousos and Matthan Caan and Jonas Teuwen},
title = {DIRECT: Deep Image REConstruction Toolkit},
journal = {Journal of Open Source Software}
}
2 changes: 1 addition & 1 deletion direct/data/datasets_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class NormalizationTransformConfig(BaseConfig):

@dataclass
class TransformsConfig(BaseConfig):
masking: MaskingConfig = MaskingConfig()
masking: Optional[MaskingConfig] = MaskingConfig()
cropping: CropTransformConfig = CropTransformConfig()
random_augmentations: RandomAugmentationTransformsConfig = RandomAugmentationTransformsConfig()
padding_eps: float = 0.001
Expand Down
1 change: 1 addition & 0 deletions direct/nn/vsharp/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Copyright (c) DIRECT Contributors
36 changes: 36 additions & 0 deletions direct/nn/vsharp/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright (c) DIRECT Contributors

from __future__ import annotations

from dataclasses import dataclass

from direct.config.defaults import ModelConfig
from direct.nn.types import ActivationType, InitType, ModelName


@dataclass
class VSharpNetConfig(ModelConfig):
num_steps: int = 10
num_steps_dc_gd: int = 8
image_init: InitType = InitType.SENSE
no_parameter_sharing: bool = True
auxiliary_steps: int = 0
image_model_architecture: ModelName = ModelName.UNET
initializer_channels: tuple[int, ...] = (32, 32, 64, 64)
initializer_dilations: tuple[int, ...] = (1, 1, 2, 4)
initializer_multiscale: int = 1
initializer_activation: ActivationType = ActivationType.PRELU
image_resnet_hidden_channels: int = 128
image_resnet_num_blocks: int = 15
image_resnet_batchnorm: bool = True
image_resnet_scale: float = 0.1
image_unet_num_filters: int = 32
image_unet_num_pool_layers: int = 4
image_unet_dropout: float = 0.0
image_didn_hidden_channels: int = 16
image_didn_num_dubs: int = 6
image_didn_num_convs_recon: int = 9
image_conv_hidden_channels: int = 64
image_conv_n_convs: int = 15
image_conv_activation: str = ActivationType.RELU
image_conv_batchnorm: bool = False
Loading
Loading