• Stars
    star
    164
  • Rank 228,732 (Top 5 %)
  • Language
    Python
  • License
    Other
  • Created almost 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

an image registration/augmentation/segmentation package

EasyReg

03.31.2021 we find some docs are broken and some are out-of-date, so we do a major clean on docs. Please refer to the latest doc. We strongly recommend picking up a demo example from our demo list*, and modify your own task based on it.

The EasyReg is a image processing package, that supports a series of mainstream methods.
We list a few properties:

  1. A simple interface for learning/optimization based image registration tools, e.g., Mermaid and other popular registration packages*.
  2. A simple interface for a series of data augmentation approaches, supporting both random data augmentation and anatomical data augmentation/inter-and extra-polation
  3. A simple interface for image segmentation.

*The currently supported methods include Mermaid-optimization (i.e., optimization-based fluid registration) and Mermaid-network (i.e., deep network-based fluid registration methods using the mermaid deformation models). We also added support for ANTsPy, NiftyReg, Demons(embedded in SimpleITK), VoxelMorph and its diffeomorphic variant, though we recommend using the official release.

Currently, we support 3d image registration (2d is in progress).


Build Documentation

The latest doc can be found here https://easyreg-unc-biag.readthedocs.io/en/latest/.

Source code documentation and tutorials can be built on local using sphinx.

cd EASYREG_REPOSITORY_PATH
cd doc
make html

Now you are ready to explore various optimization-based as well as learning-based demos provided by EasyReg.




Registration

We provide a series of demos for both learning and optimization methods :)
Demo list (for more details, please refer to the doc*)

  1. ANTsPy on OAI (knee MRI of the Osteoarthritis Initiative dataset)
  2. NiftyReg on OAI
  3. Demons on OAI
  4. Optimization-based mermaid registration on OAI (vSVF)
  5. Optimization-based mermaid registration on lung pairs** (inspiration to expiration) (RDMM)
  6. Pretrained learning-based mermaid registration on OAI (vSVF, RDMM)
  7. A training demo for joint affine and vSVF registration on sub-OAI dataset (3 pairs)
  8. A training demo for VoxelMorph like registration framework (cvpr and miccai version)

* For 2D demo (vSVF, LDDMM, RDMM) on synthetic data, please refers to mermaid
** Thanks Dr. Raúl San José Estépar for providing the lung data


For the learning part, the easyreg provides a two-stage learning framework including affine registration and non-parametric registration (map-based).

An illustration of learning architecture

learning_framework

Registration results from Region-spec Region-specific Diffeomorphic Metric Mapping (RDMM)

rdmm_oai_learn_opt




Data Augmentation/Interpolation

We provide an easy interface for fluid-based data augmentation and interpolation/extrapolation. A typical strategy is as following:

  1. Construct a geodesic subspace with given a source image and a set of target images.
  2. Sample transformations from the resulting geodesic subspace.
  3. Obtain deformed images and segmentations via interpolation.

The current supported method list:

  1. Anatomical fluid-based data augmentation
  2. Random data augmentation (including Bspline random transformation and Random momentum based fluid data augmentation)
  3. Brainstorm like data-augmentation framework

Related demos can be found at Demos on Data augmentation section.

An illustration of sampling from geodesic subspace.

geodesic_subspace




Segmentation

We provide an interface for image segmentaion task with a u-net structure. The segmentation framework supports an test phase data augmentation method that can generally improve the performance without additional models.

An illustration of data augmentation- based ensemble prediction during test.

test_phase



Installation

conda create -n easyreg python=3.6
conda activate easyreg
git clone https://github.com/uncbiag/easyreg.git
cd easyreg
git clone https://github.com/uncbiag/mermaid.git
pip install -r requirements.txt

# ################download demo (optional)######
cd demo
gdown https://drive.google.com/uc?id=1yAqks0KEK9pYMKc1W-1714cwN_PONrYU
unzip demo.zip -d .
cd ..
# #############################################

cd mermaid
python setup.py develop

For third-party toolkits:

ANTsPy

We currently test using ANTsPy version 0.1.4. Since AntsPy is not fully functioned, it will be replaced with a custom Ants Package in the next release. The following command installs ANTsPy 0.1.4.


pip install  https://github.com/ANTsX/ANTsPy/releases/download/v0.1.4/antspy-0.1.4-cp36-cp36m-linux_x86_64.whl

NiftyReg

For NiftyReg installation instructions please refer to NiftyReg Installation

Related papers

If you find EasyReg is helpful, please cite (see bibtex):

Anatomical Data Augmentation via Fluid-based Image Registration [link]
Zhengyang Shen, Zhenlin Xu, Sahin Olut, Marc Niethammer. MICCAI 2020.

Region-specific Diffeomorphic Metric Mapping [link]
Zhengyang Shen, François-Xavier Vialard, Marc Niethammer. NeurIPS 2019.

Networks for Joint Affine and Non-parametric Image Registration [link]
Zhengyang Shen, Xu Han, Zhenlin Xu, Marc Niethammer. CVPR 2019.

Our other registration work

See https://github.com/uncbiag/registration for an overview of other registration approaches of our group and a short summary of how the approaches relate.

More Repositories

1

Awesome-Foundation-Models

A curated list of foundation models for vision and language tasks
753
star
2

registration

Image Registration
TeX
275
star
3

SimpleClick

SimpleClick: Interactive Image Segmentation with Simple Vision Transformers (ICCV 2023)
Python
206
star
4

mermaid

Image registration using pytorch
Python
177
star
5

shapmagn

shape registration
Python
107
star
6

robot

code for Fast Point Cloud Registration with Optimal Transport
Python
84
star
7

uniGradICON

The official website for uniGradICON: A Foundation Model for Medical Image Registration
Python
63
star
8

SegNext

Rethinking Interactive Image Segmentation with Low Latency, High Quality, and Diverse Prompts (CVPR 2024)
Python
59
star
9

DeepAtlas

Joint Semi-supervised Learning of Image Registration and Segmentation
Python
49
star
10

iSegFormer

iSegFormer: Interactive Image/Volume Segmentation using Vision Transformers (MICCAI 2022)
Python
26
star
11

LTS

Local Temperature Scaling for Probability Calibration
Python
20
star
12

OAI_analysis_2

Image analysis approaches to analyze the OAI magnetic resonance images
Jupyter Notebook
18
star
13

PStrip

PCA Model for Brain Extraction
Python
17
star
14

LiftReg

Official repository for LiftReg: Limited Angle 2D/3D Deformable Registration.
Python
16
star
15

NAISR

NAISR: A 3D Neural Additive Model for Interpretable Shape Representation
Python
15
star
16

Aladdin

Joint Atlas Building and Diffeomorphic Registration Learning with Pairwise Alignment
Python
12
star
17

neuro_shooting

Shooting approaches for deep neural networks
Python
6
star
18

OAI_analysis

OAI image analysis pipeline
Python
5
star
19

ByConstructionICON

Jupyter Notebook
4
star
20

diffusion-3D-discovery

Python
4
star
21

2D3DFluidReg

This is the repository for paper "Fluid Registration Between Lung CT and Stationary Chest Tomosynthesis Images"
Python
3
star
22

pregis

Image registration in the presence of pathology
Python
2
star
23

NePhi

Official repository for NePhi: Neural Deformation Fields for Approximately Diffeomorphic Medical Image Registration (ECCV 2024)
JavaScript
2
star
24

D2-SONATA

Python
2
star
25

MRIS

Python
2
star
26

comp777_code

Code for comp777
Python
1
star
27

UniLMMV

Python
1
star
28

SegGuidedMMReg

Repository for 'Multimodal Image Registration Guided by Few Segmentations from One Modality'
Python
1
star
29

PIANO

Python
1
star
30

GHMM_Long

Python
1
star
31

DSREM

Dynamic Spatial Random Effects Model
Python
1
star
32

mouse_brain_translucence

Jupyter Notebook
1
star