Package: mermaid
_     _ 
                                     (_)   | |
  _ __ ___   ___ _ __ _ __ ___   __ _ _  __| |
 | '_ ` _ \ / _ \ '__| '_ ` _ \ / _` | |/ _` |
 | | | | | |  __/ |  | | | | | | (_| | | (_| |
 |_| |_| |_|\___|_|  |_| |_| |_|\__,_|_|\__,_|iMagE Registration via autoMAtIc DifferentiationMermaid is a registration toolkit making use of automatic differentiation for rapid prototyping. It is written inPyTorchand runs on the CPU and the GPU. Though GPU acceleration only becomes obvious for large images or 3D volumes. It supports registration of 1D (functions), 2D, and 3D images.The easiest way to install a development version is to clone the repository, create a virtual conda environment and install it in there. This can be done as follows for a development installation:conda create --name mermaid python=3.7 pip
conda activate mermaid
python setup.py developOr like this if you want to do a standard installation of mermaid:conda create --name mermaid python=3.7 pip
conda activate mermaid
python setup.py installThere is also a nice documentation which can be built by executingcd mermaid
cd docs
make htmlYou can also find the latest version on readthedocs:https://mermaid.readthedocs.io/en/latest/index.htmlIn the near future there will also be a conda installer available. This will then allow installations viaconda install -c pytorch -c conda-forge -c anaconda -c uncbiag mermaidThere are already initial OSX/Linux versions available which can be installed via conda, but there are still some issues that need to be ironed out, so they might not be fully functional yet. Stay tuned.Supported transformation models:affine_map: map-based affine registrationdiffusion_map: displacement-based diffusion registrationcurvature_map: displacement-based curvature registrationtotal_variation_map: displacement-based total variation registrationsvf_map: map-based stationary velocity fieldsvf_image: image-based stationary velocity fieldsvf_scalar_momentum_image: image-based stationary velocity field using the scalar momentumsvf_scalar_momentum_map: map-based stationary velocity field using the scalar momentumsvf_vector_momentum_image: image-based stationary velocity field using the vector momentumsvf_vector_momentum_map: map-based stationary velocity field using the vector momentumlddmm_shooting_map: map-based shooting-based LDDMM using the vector momentumlddmm_shooting_image: image-based shooting-based LDDMM using the vector momentumlddmm_shooting_scalar_momentum_map: map-based shooting-based LDDMM using the scalar momentumlddmm_shooting_scalar_momentum_image: image-based shooting-based LDDMM using the scalar momentumlddmm_adapt_smoother_map: map-based shooting-based Region specific diffemorphic mapping, with a spatio-temporal regularizersvf_adapt_smoother_map: map-based shooting-based vSVF, with a spatio regularizerSupported similarity measures:ssd: sum of squared differencesncc: normalize cross correlationncc_positive: positive normalized cross-correlationncc_negative: negative normalized cross-correlationlncc: localized normalized cross correlation (multi-scale)Supported solvers:embedded RK4torchdiffeq: explicit_adams, fixed_adams, tsit5, dopri5, euler, midpoint, rk4Optimizer:support single/multi-scale optimizersupport SGD, l-BFGS and some limited support for adameasyregWe also wrote a companion python package, easyreg, which allows training deep networks for image registration based on the registration models available in mermaid. I.e., easyreg allows training networks that backpropagate through the mermaid transformation models (SVF, LDDMM, ...). You can have a look at the package here:https://github.com/uncbiag/easyregOur other registration workSeehttps://github.com/uncbiag/registrationfor an overview of other registration approaches of our group and a short summary of how the approaches relate.Publishing a releaseTo publish to conda, just tag a version in the format "major.minor.subminor". do not add a leading v. Travis will automatically push to the conda repository at uncbiag/mermaid.
After this is done, to publish to pip, first locally runpip wheel . -w distto build the wheel, then runtwine upload --repository pypi dist/mermaid-<version_number>--py3-none-any.whlto publish to pypi.