Giter Club home page Giter Club logo

modshift's Introduction

test_mod_shift_reproducability

How to use this repository

  1. Install Anaconda following these instructions
  2. Clone the repository git clone https://github.com/sdamrich/test_reprod.git
  3. Create and activate the environment
    cd test_reprod
    conda env create -f environment.yml
    conda activate ModShift
    
  4. Download the data automatically python dataloader.py or manually
    • For CREMI download the file from here and place it in ModShift/data/CREMI/data/CREMI.h5.
    • For ISBI download the file from here and place it in ModShift/data/ISBI/data/ISBI.h5.
    • For ISBI's PCA download the file from here and place it in ModShift/data/ISBI/data/ISBI_embeddings_PCA_8.npy.
  5. Reproduce the pixel embedding-based clustering re- sults by running
    python main.py --data config_DATASET.yml --clustering config_CLUSTERING_METHOD.yml
    
    For instance, to reproduce non-blurring Mod Shift’s results on the subvolume of CREMI A run
    python main.py --data config_CREMI_A.yml --clustering config_mod_shift.yml
    
    Convergence points, labels and scores will be saved in 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 the config_DATASET.yml files is advisable if PyKeOps is not available.
  6. To reproduce the experiment of section D.3 do
    cd uniform_comparison
    python mean_mod_uniform.py
    
    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.
  7. To reproduces an experiment on the toy dataset, do
    cd 3clusters
    python trajectories_toy.py
    
    The trajectories will be saved in ModShift/3clusters/data/3clusters/results and plotted.

License

This repository is licensed under the MIT License other than the directory cremi, which is strongly based on and licensed as this repository.

modshift's People

Contributors

modshift avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.