This repository has been archived by the owner on Apr 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
676 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# For more configuration details: | ||
# https://docs.codecov.io/docs/codecov-yaml | ||
|
||
# Check if this file is valid by running in bash: | ||
# curl -X POST --data-binary @.codecov.yml https://codecov.io/validate | ||
|
||
# Coverage configuration | ||
# ---------------------- | ||
coverage: | ||
status: | ||
patch: false | ||
|
||
range: 70..90 # First number represents red, and second represents green | ||
# (default is 70..100) | ||
round: down # up, down, or nearest | ||
precision: 2 # Number of decimal places, between 0 and 5 | ||
|
||
# Ignoring Paths | ||
# -------------- | ||
# which folders/files to ignore | ||
ignore: | ||
- scripts/* | ||
- tools/* | ||
- setup.py | ||
|
||
# Pull request comments: | ||
# ---------------------- | ||
# Diff is the Coverage Diff of the pull request. | ||
# Files are the files impacted by the pull request | ||
comment: | ||
layout: diff, files # accepted in any order: reach, diff, flags, and/or files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Upload report on Codecov | ||
|
||
on: [ push ] | ||
|
||
jobs: | ||
run: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
|
||
env: | ||
OS: ${{ matrix.os }} | ||
PYTHON: '3.9' | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@master | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Generate coverage report | ||
run: | | ||
pip install -r requirements.txt | ||
pip install pytest-cov | ||
pytest --cov=./ --cov-report=xml | ||
- name: "Upload coverage to Codecov" | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
fail_ci_if_error: true | ||
flags: pytests # optional | ||
name: codecov-umbrella # optional | ||
verbose: true # optional (default = false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,80 @@ | ||
# Magnetic Resonance Imaging Data Consistency | ||
# Data Consistency for Magnetic Resonance Imaging | ||
|
||
[![Build Status](https://app.travis-ci.com/wdika/mridc.svg?branch=main)](https://app.travis-ci.com/wdika/mridc) | ||
[![CircleCI](https://circleci.com/gh/wdika/mridc/tree/main.svg?style=svg)](https://circleci.com/gh/wdika/mridc/tree/main) | ||
[![codecov](https://codecov.io/gh/wdika/mridc/branch/main/graph/badge.svg?token=KPPQ33DOTF)](https://codecov.io/gh/wdika/mridc) | ||
[![DeepSource](https://deepsource.io/gh/wdika/mridc.svg/?label=active+issues&show_trend=true&token=txj87v43GA6vhpbSwPEUTQtX)](https://deepsource.io/gh/wdika/mridc/?ref=repository-badge) | ||
[![DeepSource](https://deepsource.io/gh/wdika/mridc.svg/?label=resolved+issues&show_trend=true&token=txj87v43GA6vhpbSwPEUTQtX)](https://deepsource.io/gh/wdika/mridc/?ref=repository-badge) | ||
|
||
--- | ||
|
||
**Data Consistency (DC) is crucial for generalization in multi-modal MRI data and robustness in detecting pathology.** | ||
|
||
This repo implements the following reconstruction methods: | ||
|
||
- Cascades of Independently Recurrent Inference Machines (CIRIM) [1], | ||
- Independently Recurrent Inference Machines (IRIM) [2, 3], | ||
- End-to-End Variational Network (E2EVN), [4, 5] | ||
- the UNet [5, 6], | ||
- Compressed Sensing (CS) [7], and | ||
- zero-filled reconstruction (ZF). | ||
|
||
The CIRIM, the RIM, and the E2EVN target unrolled optimization by gradient descent. Thus, DC is implicitly enforced. | ||
Through cascades DC can be explicitly enforced by a designed term [1, 4]. | ||
|
||
## Usage | ||
|
||
Check on [scripts](scripts) how to train models and run a method for reconstruction. | ||
|
||
Check on [tools](tools) for preprocessing and evaluation tools. | ||
|
||
Recommended public datasets to use with this repo: | ||
|
||
- [fastMRI](https://fastmri.org/) [5]. | ||
|
||
## Documentation | ||
|
||
[![Documentation Status](https://readthedocs.org/projects/mridc/badge/?version=latest)](https://mridc.readthedocs.io/en/latest/?badge=latest) | ||
|
||
Read the docs [here](https://mridc.readthedocs.io/en/latest/index.html) | ||
|
||
## License | ||
|
||
This repo is released under the [Apache 2.0 License](LICENSE). | ||
[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) | ||
|
||
## Citation | ||
|
||
Check CITATION.cff file or cite this repository widget. Alternatively cite as | ||
Check CITATION.cff file or cite using the widget. Alternatively cite as | ||
|
||
```BibTeX | ||
@misc{MRIDC, | ||
author = {Karkalousos, Dimitrios and Caan, Matthan}, | ||
title = {MRI Data Consistency}, | ||
howpublished = {\url{https://github.com/wdika/mridc}}, | ||
year = {2021} | ||
@misc{mridc, | ||
author={Karkalousos, Dimitrios and Caan, Matthan}, | ||
title={MRIDC: Data Consistency for Magnetic Resonance Imaging}, | ||
year={2021}, | ||
url = {https://github.com/wdika/mridc}, | ||
} | ||
``` | ||
|
||
## Bibliography | ||
|
||
[1] CIRIM | ||
|
||
[2] Lønning, K. et al. (2019) ‘Recurrent inference machines for reconstructing heterogeneous MRI data’, Medical Image | ||
Analysis, 53, pp. 64–78. doi: 10.1016/j.media.2019.01.005. | ||
|
||
[3] Karkalousos, D. et al. (2020) ‘Reconstructing unseen modalities and pathology with an efficient Recurrent Inference | ||
Machine’, pp. 1–31. Available at: http://arxiv.org/abs/2012.07819. | ||
|
||
[4] Sriram, A. et al. (2020) ‘End-to-End Variational Networks for Accelerated MRI Reconstruction’, Lecture Notes in | ||
Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), | ||
12262 LNCS, pp. 64–73. doi: 10.1007/978-3-030-59713-9_7. | ||
|
||
[5] Zbontar, J. et al. (2018) ‘fastMRI: An Open Dataset and Benchmarks for Accelerated MRI’, arXiv, pp. 1–35. Available | ||
at: http://arxiv.org/abs/1811.08839. | ||
|
||
[6] Ronneberger, O., Fischer, P. and Brox, T. (2015) ‘U-Net: Convolutional Networks for Biomedical Image Segmentation’, | ||
in Medical image computing and computer-assisted intervention : MICCAI ... International Conference on Medical Image | ||
Computing and Computer-Assisted Intervention, pp. 234–241. doi: 10.1007/978-3-319-24574-4_28. | ||
|
||
[7] Lustig, M. et al. (2008) ‘Compressed Sensing MRI’, IEEE Signal Processing Magazine, 25(2), pp. 72–82. doi: | ||
10.1109/MSP.2007.914728. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = source | ||
BUILDDIR = build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@ECHO OFF | ||
|
||
pushd %~dp0 | ||
|
||
REM Command file for Sphinx documentation | ||
|
||
if "%SPHINXBUILD%" == "" ( | ||
set SPHINXBUILD=sphinx-build | ||
) | ||
set SOURCEDIR=source | ||
set BUILDDIR=build | ||
|
||
if "%1" == "" goto help | ||
|
||
%SPHINXBUILD% >NUL 2>NUL | ||
if errorlevel 9009 ( | ||
echo. | ||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
echo.installed, then set the SPHINXBUILD environment variable to point | ||
echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
echo.may add the Sphinx directory to PATH. | ||
echo. | ||
echo.If you don't have Sphinx installed, grab it from | ||
echo.https://www.sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
goto end | ||
|
||
:help | ||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
||
:end | ||
popd |
Oops, something went wrong.