Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
Updates for release
Browse files Browse the repository at this point in the history
  • Loading branch information
wdika committed Nov 30, 2021
1 parent 4e5f1d4 commit c60bdc9
Show file tree
Hide file tree
Showing 42 changed files with 676 additions and 99 deletions.
31 changes: 31 additions & 0 deletions .codecov.yml
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
6 changes: 3 additions & 3 deletions .deepsource.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ enabled = true
name = "python"
enabled = true

[analyzers.meta]
runtime_version = "3.x.x"
max_line_length = 119
[analyzers.meta]
runtime_version = "3.x.x"
max_line_length = 119

[[transformers]]
name = "black"
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/codecov.yml
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)
50 changes: 25 additions & 25 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,34 +37,34 @@ jobs:
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
36 changes: 0 additions & 36 deletions .github/workflows/main.yml

This file was deleted.

76 changes: 68 additions & 8 deletions README.md
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.
9 changes: 4 additions & 5 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## Supported Versions

Use this section to tell people about which versions of your project are
currently being supported with security updates.
Use this section to tell people about which versions of your project are currently being supported with security
updates.

| Version | Supported |
| ------- | ------------------ |
Expand All @@ -16,6 +16,5 @@ currently being supported with security updates.

Use this section to tell people how to report a vulnerability.

Tell them where to go, how often they can expect to get an update on a
reported vulnerability, what to expect if the vulnerability is accepted or
declined, etc.
Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the
vulnerability is accepted or declined, etc.
20 changes: 20 additions & 0 deletions docs/Makefile
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)
35 changes: 35 additions & 0 deletions docs/make.bat
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
Loading

0 comments on commit c60bdc9

Please sign in to comment.