Metadata-Version: 2.1
Name: direct-recon
Version: 2.1.1
Summary: DIRECT - Deep Image REConsTruction - is a deep learning framework for MRI reconstruction.
Keywords: direct
Author-Email: Jonas Teuwen <j.teuwen@nki.nl>, George Yiasemis <g.yiasemis@nki.nl>
License: Apache-2.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Project-URL: Homepage, https://github.com/NKI-AI/direct
Requires-Python: >=3.12
Requires-Dist: numpy<3,>=2.4
Requires-Dist: h5py>=3.16
Requires-Dist: omegaconf>=2.3
Requires-Dist: torch<3,>=2.11
Requires-Dist: torchvision>=0.26
Requires-Dist: scikit-image>=0.26
Requires-Dist: scikit-learn>=1.8
Requires-Dist: tensorboard>=2.20
Requires-Dist: tqdm>=4.67
Requires-Dist: protobuf<8,>=5.29
Requires-Dist: einops>=0.8
Description-Content-Type: text/x-rst

.. image:: https://github.com/NKI-AI/direct/assets/71031687/14ce8234-7ef1-4e32-84c6-966dc393e7ca
   :alt: DIRECT
   :width: 400px
   :align: center

=========================================
DIRECT: Deep Image REConstruction Toolkit
=========================================

|PyPI| |JOSS| |Tests| |Ruff| |Codacy| |Codecov|

`Installation <https://docs.aiforoncology.nl/direct/installation.html>`_ •
`Quick Start <https://docs.aiforoncology.nl/direct/getting_started.html>`_ •
`Documentation <https://docs.aiforoncology.nl/direct/index.html>`_ •
`Model Zoo <https://docs.aiforoncology.nl/direct/model_zoo.html>`_

``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>`_.

.. figure:: https://raw.githubusercontent.com/NKI-AI/direct/main/.github/direct.png
   :alt: DIRECT reconstruction examples
   :align: center

   Zero-filled reconstruction, Compressed-Sensing (CS) reconstruction using the BART toolbox, Reconstruction using a RIM model trained with DIRECT

Quick install
-------------

``DIRECT`` is published to PyPI as ``direct-recon`` (the import package is still
``direct``):

.. code-block:: bash

    pip install direct-recon

For development, the recommended way is with `uv <https://docs.astral.sh/uv/>`_:

.. code-block:: bash

    git clone https://github.com/NKI-AI/direct.git
    cd direct
    uv sync                 # runtime + dev (default groups)

See the `installation guide <https://docs.aiforoncology.nl/direct/installation.html>`_
for Docker and conda alternatives.

Projects
--------
In the `projects <https://github.com/NKI-AI/direct/tree/main/projects>`_ folder baseline model configurations are provided for each project.

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 `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
-----------------

DIRECT is not intended for clinical use. DIRECT is released under the `Apache 2.0 License <LICENSE>`_.


Citing DIRECT
-------------

If you use DIRECT in your own research, or want to refer to baseline results published in the `DIRECT Model Zoo <model_zoo.rst>`_\ , please use the following BiBTeX entry:


.. code-block:: text

    @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}
    }

.. |PyPI| image:: https://img.shields.io/pypi/v/direct-recon.svg
   :target: https://pypi.org/project/direct-recon/
   :alt: PyPI
.. |JOSS| image:: https://joss.theoj.org/papers/10.21105/joss.04278/status.svg
   :target: https://doi.org/10.21105/joss.04278
   :alt: JOSS
.. |Tests| image:: https://github.com/NKI-AI/direct/actions/workflows/tests.yml/badge.svg
   :target: https://github.com/NKI-AI/direct/actions/workflows/tests.yml
   :alt: Tests
.. |Ruff| image:: https://github.com/NKI-AI/direct/actions/workflows/ruff.yml/badge.svg
   :target: https://github.com/NKI-AI/direct/actions/workflows/ruff.yml
   :alt: Ruff
.. |Codacy| image:: https://api.codacy.com/project/badge/Grade/1c55d497dead4df69d6f256da51c98b7
   :target: https://app.codacy.com/gh/NKI-AI/direct
   :alt: Codacy
.. |Codecov| image:: https://codecov.io/gh/NKI-AI/direct/branch/main/graph/badge.svg?token=STYAUFCKJY
   :target: https://codecov.io/gh/NKI-AI/direct
   :alt: Codecov
