Package: merlintf-mri
MERLIN - Machine Enhanced Reconstruction Learning and Interpretation NetworksThis repository contains machine learning (ML) tools for PyTorch, TensorFlow and Python in three modules:merlinth: ML extensions to PyTorchmerlintf: ML extensions to TensorFlowmerlinpy: ML extensions to PythonIf you use this code, please cite@inproceedings{HammernikKuestner2022,
  title={Machine Enhanced Reconstruction Learning and Interpretation Networks (MERLIN)},
  author={Hammernik, K. and K{\"u}stner, T.},
  booktitle={Proceedings of the International Society for Magnetic Resonance in Medicine (ISMRM)},
  year={2022}
}Requirementsgit clone https://github.com/midas-tum/optox.git
cd optox
python3 install.pyfollow build instructions on the github.InstallationPyPipip3 install merlinpy-mri merlinth-mri merlintf-mriIn case you want to use the sampling codes (C++), please use the direct way installation below for direct compilation according to your system setup.Direct waygit clone https://github.com/midas-tum/merlin.git
python3 install.pyVerificationRun unittests to ensure proper working of sub-modulespython3 -m unittest discover -s merlinpy.test
python3 -m unittest discover -s merlinth.test
python3 -m unittest discover -s merlintf.testContents!!! Attention !!!This package is work in progress and still under construction.
Major changes in structure will appear. If you experience any issues, if you have any feature requests or if you found any bugs, please let us know and raise an issue and/or pull request in github :)Please watch theIssuesspace and look for the latest updates regularly! :)merlinthmerlinth
    |--- layers     # Data-driven regularizer following (https://github.com/VLOGroup/tdv), extended to complex-valued layers and similar setup as layers in `merlintf.keras`
        |-- Complex-valued convolutions
        |-- Complex-valued activations
        |-- Complex-valued pooling
        |-- Complex-valued normalization
        |-- FFT operations
        |-- Data consistency
        |-- ...
    |-- losses     # Common and custom loss functions
    |-- models     # Model zoo
        |-- Fields-of-Experts (FOE) regularizer
        |-- Total deep variation (TDV) regularizer
        |-- UNet
    |-- optim      # Custom optimizers such as BlockAdammerlintfmerlintf
    |-- keras
        |-- layers      # basic building blocks, focusing on complex valued operations
            |-- Complex-valued convolutions
            |-- Complex-valued activations
            |-- Complex-valued pooling
            |-- Complex-valued normalization
            |-- FFT operations
            |-- Data consistency
            |-- ...
        |-- models      # several layers are put together into networks for complex-valued processing (2-channel-real networks, complex networks)
            |-- Convolutional Neural Network
            |-- Fields-of-Experts (FOE) regularizer
            |-- Total deep variation (TDV) regularizer
            |-- UNet
        |-- optimizers       # custom optimizers    
    |-- optim                # custom optimizersmerlinpymerlinpy
    |-- datapipeline        # collection of datapipelines and transform functions
        |-- sampling        # subsampling codes and sampling trajectories
    |-- fastmri             # dataloader and processing related to fastMRI database
    |-- losses              # losses/metrics
    |-- recon               # conventional reconstructions
    |-- wandb               # logging via wandb.aiCommon mistakes and best practiceswriting own keras modules and layerstf.keras.Modelcannot hold any trainable parameters. All trainable weights have to be defined intf.keras.layers.Layers. Wrong implementation will cause weird behaviour when saving and re-loading the model weights!Donotdefine weights in the__init__function. Weights should be only
created and initialized in thedef build(self, input_shape)function of theLayer.
Wrong implementation will cause weird behaviour when saving and re-loading the model weights!The online documentation is a good orientation point to write own modules.
Make use of kerasConstraintsandInitializers.