DBDelve
Dive deep into your data. A fast, native, multi-engine database client written in Rust. Free and open source, no telemetry.
翻译准备中
尚未检测到更新。GitHub 发布版本后会显示在这里。
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗
MIR is a PyTorch research toolkit for deformable medical image registration. It brings
state-of-the-art registration networks (TransMorph, VFA, SITReg, VoxelMorph, LessNet, Fourier-Net and
their variants), classical baselines, training losses, evaluation metrics and reproducible benchmark
pipelines together behind one interface: a (moving, fixed) pair in, a dense displacement field out.
Documentation: https://junyuchen.me/MIR
(moving, fixed) pair of
[B, 1, D, H, W] tensors and returns a displacement field in voxels that SpatialTransformer applies
to any image or label map. Swapping architectures is a one-line change.Install a CUDA-enabled PyTorch build first, then MIR in editable mode:
git clone https://github.com/junyuchen245/MIR.git
cd MIR
python3.8 -m pip install -U pip
python3.8 -m pip install -e .
Python 3.8+ is required. deedsBCV is Linux-only; everything else is platform independent. See the installation guide for optional dependencies and the pretrained weights.
import torch, nibabel as nib
from MIR import ModelWeights
from MIR.models import VFA, SpatialTransformer
import MIR.models.configs_VFA as configs_VFA
mov = torch.from_numpy(nib.load('subject.nii.gz').get_fdata()[None, None]).float().cuda()
fix = torch.from_numpy(nib.load('template.nii.gz').get_fdata()[None, None]).float().cuda()
config = configs_VFA.get_VFA_default_config()
config.img_size = fix.shape[2:]
model = VFA(config, device='cuda:0').cuda().eval()
model.load_state_dict(torch.load('VFA_LUMIR24.pth')[ModelWeights['VFA-LUMIR24-MonoModal']['wts_key']])
with torch.no_grad():
flow = model((mov, fix)) # [1, 3, D, H, W] displacement in voxels
warped = SpatialTransformer(fix.shape[2:]).cuda()(mov, flow)
| Family | Summary | Docs |
|---|---|---|
| TransMorph, TransMorph-TVF, TransMorph-TVF-SPR, TransMorph-DCA | Swin-Transformer registration networks | TransMorph |
| VFA, VFA-SPR, TransVFA, HyperVFA | Vector field attention | VFA |
| HyperTransMorph, HyperMorph | Hypernetwork-conditioned regularization | HyperTransMorph |
| VoxelMorph, LessNet, Fourier-Net(+) | Convolutional baselines (with SVF and SPR variants) | VoxelMorph, LessNet, Fourier-Net |
| SITReg | Symmetric, inverse-consistent, topology-preserving registration | SITReg |
| ConvexAdam, FireANTs, deedsBCV | Optimization-based and classical baselines | ConvexAdam, deedsBCV |
| TransMorph-LDDMM, LDDMMWrapper | Time-varying velocity fields (geodesic shooting) for any backbone | LDDMM |
| MultiMorph, TemplateCreation | Atlas construction | Atlas construction |
Conventions, transformation models, regularization, losses, metrics and a complete training recipe are explained in the user guide.
Runnable training, inference and evaluation scripts live under tutorials/, one folder per
dataset and model (see the tutorial catalogue and
tutorials/README.md). Good starting points:
tutorials/brain_registration: affine + deformable brain registration with pretrained weights.tutorials/IXI_benchmarking: benchmark seven models on IXI from a notebook.tutorials/lumir25_TransMorph: a complete training template (Learn2Reg LUMIR25).tutorials/build_brain_template: population template construction.以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗