# Diff-SCM
## Overview
Diff-SCM aims at developing solutions based diffusion probabilistic modeling (DPM) for causal machine learning. Our [algorithm](https://arxiv.org/abs/2202.10166) perform counterfactual inference using Pearl's abduction-action-prediction strategy using a deterministic inference based on a deterministic diffusion inference ([DDIM](https://arxiv.org/abs/2010.02502)). We have also [applied](https://arxiv.org/abs/2207.12268) to the method for lesion localization in Brain MRI.
The code is this repo implements the following papers:
> Sanchez, Pedro, and Sotirios A. Tsaftaris. "Diffusion Causal Models for Counterfactual Estimation." In *Conference on Causal Learning and Reasoning* (CLeaR). 2022.
> Sanchez, Pedro, Kascenas, Antanas, Liu, Xiao, O'Neil, Alison and Sotirios A. Tsaftaris. "What is Healthy? Generative Counterfactual Diffusion for Lesion Localization." In *Deep Generative Models workshop at MICCAI 2022* (DGM4Miccai). 2022.
Note. If one is looking for particular bits of code with our contributions, consider checking the `diff_scm/sampling/sampling_utils.py` file. The code for counterfactual estimation, classfier-free (implicit) inference and dynamic normalisation is there.
## How to run
### Install
The provided `.yml` file can be use for creating a conda environment with the following command.
`conda env create -f environment.yml`
### Hyperparameters
A few hyperparameters are particularly important for counterfactual estimation. In particular, the parameters the control the strenght of the intervention. The `sampling.classifier_scale`, `sampling.norm_cond_scale`, `sampling.sampling_progression_ratio` are the some of these and can be found in the `diff_scm/configs` folder. Also, se this folder for example configuration on MNIST and BRATS dataset.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
本项目致力于基于深度扩散模型的脑部MRI中的病灶定位方法,旨在提高医学影像在神经疾病诊断中的应用。项目利用深度扩散模型对脑部MRI影像中的病灶进行精确的定位。 在数据集方面,我们使用了公开的脑部MRI影像数据集,如BRATS、Medical Segmentation Decathlon等,并进行了预处理,包括格式转换、裁剪、翻转等操作。在环境搭建方面,我们使用Python编程语言,基于TensorFlow和PyTorch深度学习框架进行开发。为了提高计算效率,我们还使用了GPU加速计算。此外,我们还采用了Docker容器技术,确保实验结果的可重复性。 项目完成后,将实现对脑部MRI影像中病灶的精确定位,为神经疾病的诊断和治疗提供有力支持。同时,项目成果也可应用于其他医学影像分析领域,如肿瘤检测、病变定位等。
资源推荐
资源详情
资源评论
收起资源包目录
基于深度扩散模型的脑部MRI中的病灶定位方法内含数据集和环境搭建教程.zip (34个子文件)
diff_scm
__init__.py 0B
sampling
sampling_utils.py 6KB
sample_counterfactual.py 3KB
configs
__init__.py 0B
brats_configs.py 6KB
get_config.py 321B
mnist_configs.py 5KB
utils
utils.py 2KB
__init__.py 0B
dist_util.py 2KB
fp16_util.py 8KB
logger.py 13KB
script_util.py 5KB
datasets
__init__.py 0B
loader.py 4KB
load_brats.py 11KB
load_mnist.py 771B
models
__init__.py 608B
losses.py 2KB
nn.py 3KB
gaussian_diffusion.py 38KB
resample.py 6KB
unet.py 31KB
respace.py 5KB
training
__init__.py 0B
anticausal_classifier_train.py 8KB
train_util.py 13KB
main_diffusion_train.py 3KB
examples
example_generate_counterfactual.ipynb 72KB
docs
_config.yml 26B
assets
diffusion_causal_relationships.png 53KB
index.md 1KB
environment.yml 5KB
README.md 2KB
共 34 条
- 1
资源评论
小码蚁.
- 粉丝: 2534
- 资源: 4176
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功