Kainmueller-Lab / PatchPerPix_experiments

experiments script for the PatchPerPix instance segmentation method
8 stars 3 forks source link

Note

Please check https://github.com/Kainmueller-Lab/PatchPerPix for the up-to-date code for PatchPerPix! This repository is not updated anymore. It only stays online to enable the replication of older experiments.

PatchPerPix for Instance Segmentation

Example experiment scripts for PatchPerPix

To use this instance segmentation method, first get and install the core code for PatchPerPix.

Organization

Installation

Core

First install the core code: PatchPerPix. Then continue here.

Experiments

Clone this repository and install the dependencies. The recommended way is to install them into your conda/python virtual environment.

conda activate <<your-env-name>>
git clone https://github.com/Kainmueller-Lab/PatchPerPix_experiments.git
cd PatchPerPix_experiments
pip install -r requirements.txt

Evaluation

For validation and evaluation this package is required: Evaluation

Data preperation

The code expects the data to be in the zarr format (similar to hdf5, but uses the underlying file system to enable parallel read and write) The dataset specific subfolders (e.g. wormbodies) contain further information on how to get and preprocess the data.

Usage

The master script run_ppp.py can be used to control all aspects of the experiments.

Example call:

python run_ppp.py --setup setup08 --config wormbodies/02_setups/setup08/config.toml --do mknet train validate_checkpoints predict decode label evaluate --app wormbodies --root ~/data/patchPerPix/experiments

With --do TASK you can set the sub task that should be executed (or all for the whole pipeline), --root PATH sets the output directory, --app APP the experiment (e.g. wormbodies) and --setup SETUP the specific setup of that experiment (e.g. setup01).

The command above creates a time stamped experiment folder under the path specified by --root. To continue training or for further validation adapt the command. Change the --config parameter to point to the config file in the experiment folder and remove the --root flag and replace it with the -id flag and point it to the experiment folder. The tasks specified after --do depend on what you want to do:

python run_ppp.py --setup setup08 --config experiments/wormbodies_setup08_201125_120524/config.toml --do  validate_checkpoints predict decode label evaluate --app wormbodies -id experiments/wormbodies_setup08_201125_120524