jcreinhold / counterfactualms

counterfactuals for magnetic resonance images of multiple sclerosis
Other
26 stars 7 forks source link
causality pgm ppl scm

SCM for MR images of MS

This repository holds code to generate counterfactual images of MR brain images for people with (and without) MS using a structural causal model (SCM) [1] built in Pyro.

This code was used to generate the counterfactual images in our paper "A Structural Causal Model of MR Images of Multiple Sclerosis".

Our work builds on the work of Pawlowski, Castro, and Glocker [2]. The code in this repository is a fork of their code which can be found here.

The code for the segmentation experiment in our paper can be found here; it depends on msseg. The exact hyperparameters and information about the data used for the segmentation experiment are in the docstring of that script.

This package was developed by Jacob Reinhold of the Image Analysis and Communication Lab (IACL).

Installation

From inside this directory, run:

python setup.py install

or (if you'd like to make updates to the package)

python setup.py develop

Structure

This repository contains code and assets structured as follows:

References

  1. Pearl, Judea. Causality. Cambridge university press, 2009.
  2. Pawlowski, Nick, Daniel Coelho de Castro, and Ben Glocker. "Deep Structural Causal Models for Tractable Counterfactual Inference." Advances in Neural Information Processing Systems 33 (2020).