- Install Anaconda following these instructions
- Clone the repository
git clone https://github.com/sdamrich/test_reprod.git
- Create and activate the environment
cd test_reprod conda env create -f environment.yml conda activate ModShift
- Download the data automatically
python dataloader.py
or manually - Reproduce the pixel embedding-based clustering re-
sults by running
For instance, to reproduce non-blurring Mod Shift’s results on the subvolume of CREMI A run
python main.py --data config_DATASET.yml --clustering config_CLUSTERING_METHOD.yml
Convergence points, labels and scores will be saved inpython main.py --data config_CREMI_A.yml --clustering config_mod_shift.yml
data/DATASET/
. The best parameters and scores will be printed. In case of problems with PyKeOps, confer here. Note that the pure PyTorch implementation is very slow on these datasets, so that downsampling them in theconfig_DATASET.yml
files is advisable if PyKeOps is not available. - To reproduce the experiment of section D.3 do
The key statistics will be printed, the number of clusters for Mean Shift and Mod Shift saved and the histogram of these numbers of clusters plotted.
cd uniform_comparison python mean_mod_uniform.py
- To reproduces an experiment on the toy dataset, do
The trajectories will be saved in
cd 3clusters python trajectories_toy.py
ModShift/3clusters/data/3clusters/results
and plotted.
This repository is licensed under the MIT License other than the directory cremi, which is strongly based on and licensed as this repository.