Official implementation of the paper “Geodesic Regression Characterizes 3D Shape Changes in the Female Brain During Menstruation”.
[Paper] published in ICCV proceedings under [ICCV Workshop Computer Vision for Automated Medical Diagnosis]
🎤 We are developing AI to transform the field of NeuroImaging and Womens' Brain Health: See our Beginner-Friendly Public Talk at Brass Bear Brewing
Visual on thumbnail slide taken from: Caitlin M Taylor, Laura Pritschet, and Emily G Jacobs. The scientific body of knowledge–whose body does it serve? A spotlight on oral contraceptives and women’s health factors in neuroimaging. Frontiers in neuroendocrinology, 60:100874, 2021.
- Clone a copy of
my28brains
from source:
git clone https://github.com/bioshape-lab/my28brains
cd my28brains
- Create an environment with python >= 3.10
conda create -n my28brains python=3.10
- Install
my28brains
in editable mode (requires pip ≥ 21.3 for PEP 660 support):
pip install -e .[all]
- Install pre-commit hooks:
pre-commit install
If this code is useful to your research, please cite:
@misc{myers2023geodesic,
title={Geodesic Regression Characterizes 3D Shape Changes in the Female Brain During Menstruation},
author={Adele Myers and Caitlin Taylor and Emily Jacobs and Nina Miolane},
year={2023},
eprint={2309.16662},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
We use Wandb to keep track of our runs. To launch a new run, follow the steps below.
1. Set up Wandb logging.
Wandb is a powerful tool for logging performance during training, as well as animation artifacts. To use it, simply create an account, then run:
wandb login
to sign into your account.
Create a new project in Wandb and give it a project name. Then, edit main_xxx.py
files so that they use this project name.
Most Important General Paramters in default_config.py
(see descriptions in default_config.py
):
- Elastic Metric Parameters:
a0
,a1
,b1
,c1
,d1
,a2
dataset_name
linear_residuals
n_X
main_1_preprocess.py
: Preprocesses hippocampus data, as described in the notes at the top of the file.main_2_regression.py
: Runs regression (linear and geodesic) on dataset specified indefault_config.py
. Runs geodesic regression with linear residuals iflinear_residuals = True
indefault_config.py
.main_3_line_vs_geodesic.py
: Creates synthetic data (data type determined bydataset_name
indefault_config.py
) that lies in a curved space. Then, computes a line between two synthetic data points and a geodesic between the two synthetic data points and compares how different they are, indicating whether the distance between the points is large or small are compared to the curvature of the manifold. Used to inform "rules of thumb" for whether linear regression or geodesic regression with linear residuals can be used to approximate geodesic regression on a particular dataset.
To run one of the main files, use the command:
python main_xxx.py
where xxx is replaced by the actual name of the file.
You can see all of your runs by logging into the Wandb webpage and looking under your project name.
$ conda create -n my28brains --file conda-linux-64.lock
$ conda activate my28brains
$ poetry install --no-root
We use --no-root
because we don't have a module named my28brains
If you are on Mac, make and use conda-osx-64.lock
instead.
Only run if changes are made to the environment files.
To recreate the conda lock, after modifying conda.yaml:
pip install conda-lock
make conda-linux-64.lock
Note that you may need to install conda-lock not in your base env.
To recreate the poetry lock, after modifying pyproject.toml:
make poetry.lock