深度学习图像配准(Deep Learning Image Registration, DLIR),基于 VoxelMorph 。
欢迎补充
-
推荐 DLIR 入门教程:
-
推荐 DLIR 名人堂:
学者 代表作 个人网页 备注 Adrian V. Dalca VoxelMorph http://www.mit.edu/~adalca/ VM 掀起 DLIR 热潮 MP Heinrich, L Hansen Deeds、OBELISK、PDD_Net mpheinrich、 researchgate Deeds 是我用过配准性能最好的,幸好它是传统配准 😬 ,OBELISK 分割性能也很好,而且轻量。 Yipeng Hu Weakly Reg、DeepReg https://iris.ucl.ac.uk/iris/browse/profile?upi=YHUXX66 我们开始使用分割标签做弱监督配准学习 Tony C.W. Mok LapIRN、C2FViT https://cwmok.github.io/ 无监督脑部配准,他总是第一名 Chen Junyu TransMorph、ViT-V-Net https://github.com/junyuchen245 Transformer + CNN 版的 VoxelMorph,很多代码可以借鉴 ANTs Advanced Normalization Tools GitHub、CSDN 常用的传统配准方法 baseline -
推荐文献检索网站:
-
推荐综述文献:
- Transforming medical imaging with Transformers? A comparative review of key properties, current progresses, and future perspectives. Medical Image Analysis, 2022.
- Deep learning in medical image registration: a survey. Machine Vision and Applications, 2019.
- Is Image-to-Image Translation the Panacea for Multimodal Image Registration? A Comparative Study. CVPR, 2021.
MNIST
train_vm_2d.py
本地运行:
- 启动 visdom 用于实时可视化
python -m visdom.server
- 启动训练
python train_vm_2d.py \
-output output/mnist/ \
-is_visdom True \
-choose_label 5 \
-val_interval 1 \
-save_interval 50
数字 5 的预训练结果见 ckpts/mnist
register_vm_2d.py
本地运行:
python register_vm_2d.py \
-output output/mnist_test/ \
-model output/mnist/reg_net_299.pth \
-is_visdom True \
-choose_label 5 \
预测结果可视化:
模型神奇地显示出了泛化效果,在没有参与训练的数字 3 上也可以配准, 其它数字也一样:
LPBA40 - 3D 脑部 MRI
train_vm_3d.py
训练脚本:
#!/bin/bash
#SBATCH -J LPBA
#SBATCH -p gpu1
#SBATCH -N 1
#SBATCH -n 1
#SBATCH --gres=gpu:1
#SBATCH -o logs/trainOutLPBA.txt
#SBATCH -e logs/trainErrLPBA.txt
SLURM_SUBMIT_DIR=/public/home/jd_shb/fromgithub/registration-in-action
cd $SLURM_SUBMIT_DIR
NP=$SLURM_JOB_GPUS
CUDA_VISIBLE_DEVICES=$NP python train_vm_3d.py \
-dataset lpba40 \
-output output/lpba/ \
-resume /public/home/jd_shb/fromgithub/registration-in-action/output/lpba/lpba40_best71.pth \
-batch_size 2 \
-lr 1e-4 \
-apply_lr_scheduler \
-epochs 800 \
-weakly_sup \ # 使用分割标签辅助训练
-sim_loss MSE \
-sim_weight 1.0 \
-dice_weight 0.1 \
-img_folder /public/home/jd_shb/fromgithub/multimodal/OBELISK_V02/preprocess/datasets/LPBA40/train \
-label_folder /public/home/jd_shb/fromgithub/multimodal/OBELISK_V02/preprocess/datasets/LPBA40/label \
-train_scannumbers "11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40" \
-val_scannumbers "1 2 3" \
-img_name S?.delineation.skullstripped.nii.gz \
-label_name S?.delineation.structure.label.nii.gz
register_vm_3d.py
运行:
python register_vm_3d.py \
-output output/lpba_test/ \
-model output/lpba/lpba40_best71.pth \
-img_folder /public/home/jd_shb/fromgithub/multimodal/OBELISK_V02/preprocess/datasets/LPBA40/train \
-label_folder /public/home/jd_shb/fromgithub/multimodal/OBELISK_V02/preprocess/datasets/LPBA40/label \
-fix_number "5" \
-mov_numbers "4 6 7 8 9 10" \
-img_name S?.delineation.skullstripped.nii.gz \
-label_name S?.delineation.structure.label.nii.gz
会保存 moved image、moved label、flow field,评估指标保存在 test.log。
ants_baseline.py
#!/bin/bash
#SBATCH -J ants_lpba
#SBATCH -p gpu1
#SBATCH -N 1
#SBATCH -n 20
#SBATCH -o logs/trainOutLPBAAnts.txt
#SBATCH -e logs/trainErrLPBAAnts.txt
cd $SLURM_SUBMIT_DIR
python ants_baseline.py \
-dataset lpba \
-img_folder ./dataset/LPBA40/train \
-label_folder ./dataset/LPBA40/label \
-mov_numbers "1 8 9 11 14 18 33" \
-fix_number 7 \
-img_name S?.delineation.skullstripped.nii.gz \
-label_name S?.delineation.structure.label.nii.gz \
-trans_typ SyN \
-output output/ANTs_SyN/lpba/fix_7