Deep learning framework for MRI reconstruction
We're excited to announce DIRECT v2.0.0, featuring several advancements and updates. Here's a snapshot of what's new:
Dive into the details below to see how DIRECT v2.0.0 can enhance your work.
RecurrentVarNet
winner at MC-MRI challenge 2022, vSHARPNet
winner at CMRxRecon challenge 2023) (#156, #180, #228, #271, #273)direct train
and direct predict
commands (#202)h5py
(#174)ConjGradNet
for improved imaging, IterDualNet
(similar to JointICNet
without sensitivity map optimization), ResNet
as a new denoiser model, VarSplitNet
for variable splitting optimization with deep learning (#228) and VSharpNet
as presented in vSHARP: variable Splitting Half-quadratic ADMM algorithm for Reconstruction of inverse-Problems along with its 3D variant VSharpNet3D
(#270, #273).EspiritCalibration
transform via power-method algorithm, CropKspace
, RandomFlip
, RandomRotation
., ComputePadding
, ApplyPadding
, ComputeImage
, RenameKeys
, ComputeScalingFactor
.NMSE
, NRMSE
, NMAE
, SobelGradL1Loss
, SobelGradL2Loss
, hfen_l1
, hfen_l2
, HFENLoss
, HFENL1Loss
, HFENL2Loss
, snr
, SNRLoss
and SSIM3DLoss
(#226, #262).Gaussian1DMaskFunc
and Gaussian2DMaskFunc
, respectively. Implemented using Cython (#230).VSharpNet3D
, (#273).forward_method
instead of _do_iteration
. (#226)DictConfig
from omegaconf
using dict_flatten
(#235, #250).DirectEnum
as a base class for clean typing of options of modules such as transforms, etc (#228, #266).black
reformatting (#241)This release was made possible by the hard work and dedication of our team and contributors:
Access detailed documentation for DIRECT v2.0.0 at our documentation site.
modulus_if_complex
reinstated but requiring to set complex axisMRIEngine
check if prediction is complex (complex axis=last) and apply the modulus if they are (#208).Full Changelog: https://github.com/NKI-AI/direct/compare/v1.0.2...v1.0.3
NormConv2dGRU
) following the implementation of NormUnet2d
(#176)SheppLoganProtonDataset
SheppLoganT1Dataset
SheppLoganT2Dataset
modulus_if_complex
function removed, modulus
needs to specify axis (#194)mypy
and pylint
fixes (#196)direct train
, direct predict
and python3 projects/predict_val.py
to not necessarily require path to data
as some datasets don't require it (e.g. SheppLogan Datasets) - build_dataset_from_input
relies on **kwargs
now. Refactored configs and docs to comply with the above. (#202)
Train command example:
direct train <experiment_directory> --num-gpus <number_of_gpus> --cfg <path_or_url_to_yaml_file> \ [--training-root <training_data_root> --validation-root <validation_data_root>] [--other-flags]
Normalize
transform due to new version dependancy (#177)Full Changelog: https://github.com/NKI-AI/direct/compare/v1.0.1...v1.0.2
NMSE
, NRMSE
, NMAE
, SobelGradL1Loss
, SobelGradL2Loss
) and also k-space losses (#226)ComputeZeroPadding
: computes padding in k-space input (#226)ApplyZeroPadding
: applies padding (#226)ComputeImage
: computes image from k-space input (#226)RenameKeys
: rename keys in input (#226)CropKSpace
: transforms k-space to image domain, crops it, and backprojects it (#210)ApplyMask
: applies sampling mask (#210)mri_models
performs _do_iteration method
, child engines perform forward_function
which returns output_image and/or output_kspace (#226)torch.where
output needed to be made contiguous to be inputted to fft, due to new torch version (#216)Full Changelog: https://github.com/NKI-AI/direct/compare/v1.0.3...v1.0.4
In v1.0.1 we mainly provide bug fixes (including a memory leak) and code quality improvements.
direct upload-to-bucket
tool by @jonasteuwen in https://github.com/NKI-AI/direct/pull/167
h5py 3.6.0
to h5py 3.3.0
FastMRIDataset
header reader function refactoreddo_iteration
method. MRIModelEngine
now includes all methods for MRI models.evaluate
method of MRI Models has been rewritten.Full Changelog: https://github.com/NKI-AI/direct/compare/v1.0.0...v1.0.1
In the first stable release, we provide the implementation of baselines, including trained models on the publicly available datasets.
direct train
and direct predict
replace the corresponding python scripts (#151, #139)direct train
CLI interface (Closes #109, #139)MRIReconstruction
is merged with RIM
(#113)state_dict
if key is of the format __<>__
(#144 closes #143)Full Changelog: https://github.com/directgroup/direct/compare/v0.2...v1.0.0
Many new features have been added, of which most will likely have introduced breaking changes. Several performance issues have been addressed.
An improved version to the winning solution for the Calgary-Campinas challenge is also added to v0.2, including model weights.
model_zoo.md
)train_rim.py
by passing a directory.direct.utils.io.write_json
serializes real-valued numpy and torch objects.direct.utils.str_to_class
now supports partial argument parsing, e.g. fft2(centered=False)
will be properly parsed
in the config.rim_engine.py
.direct.data.samplers.BatchVolumeSampler
returned wrong length which caused dropping of volumes during validation.In this version we provide necessary bugfixes for v0.1.1 and several improvements:
Black is now used as a code formatter, this had the consequence that certain parts became hard to read, so these were refactored to improve readability after applying black.
As you can expect from a pre-release, while we intend to keep it to a minimum, it is possible that things break, especially in the configuration files. In case you encounter one, please open an issue.
In v0.1.1:
--mixed-precision
flag. If you have supporting hardware this can speed up training with more than 33% and reduce memory by more than 40%.In this release, we have significantly expanded upon v0.0.1 and: