# Solving 3D Inverse Problems using Pre-trained 2D Diffusion Models (CVPR 2023)
Official PyTorch implementation of **DiffusionMBIR**, the CVPR 2023 paper "[Solving 3D Inverse Problems using Pre-trained 2D Diffusion Models](https://arxiv.org/abs/2211.10655)". Code modified from [score_sde_pytorch](https://github.com/yang-song/score_sde_pytorch).
[![arXiv](https://img.shields.io/badge/arXiv-2211.10655-green)](https://arxiv.org/abs/2211.10655)
[![arXiv](https://img.shields.io/badge/paper-CVPR2023-blue)](https://arxiv.org/abs/2211.10655)
![concept](./figs/forward_model.jpg)
![concept](./figs/cover_result.jpg)
## Getting started
### Download pre-trained model weights
* **CT** experiments
```bash
mkdir -p exp/ve/AAPM_256_ncsnpp_continuous
wget -O exp/ve/AAPM_256_ncsnpp_continuous/checkpoint_185.pth https://www.dropbox.com/s/7zevc3eu8xkqx0x/checkpoint_185.pth?dl=1
```
* For **MRI** experiments
```bash
mkdir -p exp/ve/fastmri_knee_320_ncsnpp_continuous
wget -O exp/ve/fastmri_knee_320_ncsnpp_continuous/checkpoint_95.pth https://www.dropbox.com/s/27gtxkmh2dlkho9/checkpoint_95.pth?dl=1
```
(If your system does not have `wget` installed, you may replace `wget -O` with `curl -L -o`.)
### Download the data
* **CT** experiments (in-distribution)
```bash
DATA_DIR=./data/CT/ind/256_sorted
mkdir -p "$DATA_DIR"
wget -O "$DATA_DIR"/256_sorted.zip https://www.dropbox.com/sh/ibjpgo5seksjera/AADlhYqCWq5C4K0uWSrCL_JUa?dl=1
unzip -d "$DATA_DIR"/ "$DATA_DIR"/256_sorted.zip
```
* **CT** experiments (out-of-distribution)
```bash
DATA_DIR=./data/CT/ood/256_sorted
mkdir -p "$DATA_DIR"
wget -O "$DATA_DIR"/slice.zip https://www.dropbox.com/s/h3drrlx0pvutyoi/slice.zip?dl=0
unzip -d "$DATA_DIR"/ "$DATA_DIR"/slice.zip
```
* **MRI** experiments (out-of-distribution)
```bash
DATA_DIR=./data/MRI/BRATS
mkdir -p "$DATA_DIR"
wget -O "$DATA_DIR"/Brats18_CBICA_AAM_1.zip https://www.dropbox.com/s/1a73t58asbqs1mi/Brats18_CBICA_AAM_1.zip?dl=0
unzip -d "$DATA_DIR"/ "$DATA_DIR"/Brats18_CBICA_AAM_1.zip
```
* Make a conda environment and install dependencies
```bash
conda env create --file environment.yml
```
## DiffusionMBIR (fast) reconstruction
Once you have the pre-trained weights and the test data set up properly, you may run the following scripts. Modify the parameters in the python scripts directly to change experimental settings.
```bash
conda activate diffusion-mbir
python inverse_problem_solver_AAPM_3d_total.py
python inverse_problem_solver_BRATS_MRI_3d_total.py
```
## Training
You may train the diffusion model with your own data by using e.g.
```bash
bash train_AAPM256.sh
```
You can modify the training config with the ```--config``` flag.
## Citation
If you find our work interesting, please consider citing
```
@InProceedings{chung2023solving,
title={Solving 3D Inverse Problems using Pre-trained 2D Diffusion Models},
author={Chung, Hyungjin and Ryu, Dohoon and McCann, Michael T and Klasky, Marc L and Ye, Jong Chul},
journal={IEEE/CVF Conference on Computer Vision and Pattern Recognition},
year={2023}
}
```
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
该项目使用预训练的2D扩散模型求解3D逆问题,专注于脑CT图像重建。数据集包含大量脑CT图像,用于训练和测试模型。环境说明详细介绍了所需的软件库、框架版本和硬件配置,帮助用户快速构建实验环境。通过将3D问题分解为多个2D子问题,并利用预训练的2D扩散模型进行求解,该项目旨在提高脑CT图像重建的效率和准确性,为脑部疾病的诊断和治疗提供有力支持。该项目的成功实施有望推动医学图像重建技术的发展,为患者带来更好的医疗服务。
资源推荐
资源详情
资源评论
收起资源包目录
使用预训练的 2D 扩散模型求解 3D 逆问题内含脑CT数据集和环境说明.zip (97个子文件)
evaluation.py 5KB
utils.py 11KB
losses.py 10KB
likelihood.py 5KB
controllable_generation_TV.py 29KB
train_AAPM256.sh 161B
main.py 2KB
configs
subvp
cifar10_ddpmpp_continuous.py 2KB
cifar10_ncsnpp_deep_continuous.py 2KB
cifar10_ncsnpp_continuous.py 2KB
cifar10_ddpmpp_deep_continuous.py 2KB
cifar10_ddpm_continuous.py 1KB
default_cifar10_configs.py 2KB
ve
celeba_ncsnpp.py 2KB
celebahq_ncsnpp_continuous.py 3KB
fastmri_knee_320_ncsnpp_continuous_multi.py 2KB
ncsnv2
cifar10.py 2KB
celeba.py 2KB
bedroom.py 2KB
Object5_ncsnpp_continuous.py 1KB
cifar10_ncsnpp.py 2KB
church_ncsnpp_continuous.py 2KB
cifar10_ncsnpp_deep_continuous.py 2KB
cifar10_ncsnpp_continuous.py 2KB
Object5_fast.py 1KB
fastmri_knee_256_ncsnpp_continuous.py 2KB
AAPM_128_ncsnpp_continuous.py 2KB
fastmri_knee_320_ncsnpp_continuous.py 2KB
fastmri_knee_128_ncsnpp_continuous.py 2KB
bedroom_ncsnpp_continuous.py 2KB
ncsn
celeba_5.py 2KB
cifar10_124.py 2KB
cifar10.py 2KB
celeba.py 2KB
celeba_124.py 2KB
cifar10_5.py 2KB
celeba_1245.py 2KB
cifar10_1245.py 2KB
ffhq_ncsnpp_continuous.py 3KB
cifar10_ddpm.py 1KB
fastmri_knee_320_ncsnpp_continuous_complex_magpha.py 2KB
celebahq_256_ncsnpp_continuous.py 2KB
ffhq_256_ncsnpp_continuous.py 2KB
AAPM_256_ncsnpp_continuous.py 1KB
fastmri_knee_320_ncsnpp_continuous_complex.py 2KB
default_complex_configs.py 2KB
default_celeba_configs.py 2KB
default_lsun_configs.py 2KB
vp
cifar10_ddpmpp_continuous.py 2KB
cifar10_ncsnpp.py 2KB
cifar10_ncsnpp_deep_continuous.py 2KB
ddpm
cifar10.py 1KB
church.py 2KB
cifar10_continuous.py 1KB
celebahq.py 2KB
bedroom.py 2KB
cifar10_unconditional.py 1KB
cifar10_ncsnpp_continuous.py 2KB
cifar10_ddpmpp_deep_continuous.py 2KB
cifar10_ddpmpp.py 2KB
inverse_problem_solver_BRATS_MRI_3d_total.py 6KB
physics
inpainting.py 691B
radon
utils.py 727B
__init__.py 77B
radon.py 6KB
stackgram.py 3KB
filters.py 2KB
ct.py 2KB
inverse_problem_solver_AAPM_3d_total.py 6KB
op
__init__.py 89B
fused_bias_act_kernel.cu 3KB
fused_act.py 3KB
upfirdn2d_kernel.cu 12KB
upfirdn2d.py 6KB
fused_bias_act.cpp 846B
upfirdn2d.cpp 988B
figs
forward_model.jpg 748KB
cover_result.jpg 705KB
environment.yml 277B
sampling.py 20KB
fastmri_utils.py 6KB
run_lib.py 17KB
test
test_TV.py 2KB
models
utils.py 6KB
__init__.py 608B
ncsnpp.py 14KB
ema.py 3KB
layers.py 22KB
normalization.py 7KB
ncsnv2.py 16KB
unet.py 4KB
ddpm.py 6KB
up_or_down_sampling.py 9KB
layerspp.py 9KB
datasets.py 13KB
sde_lib.py 7KB
README.md 3KB
共 97 条
- 1
资源评论
小码蚁.
- 粉丝: 2526
- 资源: 4089
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功