-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: expand api documentation and document legacy
- Loading branch information
1 parent
5a9ae4f
commit 32e6159
Showing
16 changed files
with
177 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
# Installation | ||
|
||
## Prerequisites for Conda package | ||
|
||
* Linux, Windows, macOS (not all features are available on macOS) | ||
* (Optional) Nvidia GPU with official Nvidia drivers installed for GPU acceleration | ||
|
||
## Install Mamba | ||
|
||
The easiest way to install PlantSeg is by using the [conda (Anaconda)](https://www.anaconda.com/) or | ||
[mamba (Miniforge)](https://mamba.readthedocs.io/en/latest/index.html) package manager. We recommend using `mamba` because it is faster and usually more consistent than `conda`. | ||
|
||
=== "Linux" | ||
|
||
To download Miniforge open a terminal and type: | ||
|
||
```bash | ||
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" | ||
bash Miniforge3-$(uname)-$(uname -m).sh | ||
``` | ||
|
||
Then install by typing: | ||
|
||
```bash | ||
bash Miniforge3-$(uname)-$(uname -m).sh | ||
``` | ||
|
||
and follow the installation instructions. | ||
Please refer to the [Miniforge repo](https://github.com/conda-forge/miniforge) for more information, troubleshooting and uninstallation instructions. | ||
The miniforge installation file `Miniforge3-*.sh` can be deleted now. | ||
|
||
=== "Windows/macOS" | ||
The first step required to use the pipeline is installing mamba. The installation can be done by downloading the installer from the [Miniforge repo](https://github.com/conda-forge/miniforge). There you can find the download links for the latest version of Miniforge, troubleshooting and uninstallation instructions. | ||
|
||
## Install PlantSeg using Mamba | ||
|
||
PlantSeg can be installed directly by executing in the terminal (or PowerShell on Windows). For `conda` users, the command is identical, just replace `mamba` with `conda`. | ||
|
||
=== "Linux" | ||
|
||
* NVIDIA GPU version, CUDA=12.x | ||
|
||
```bash | ||
mamba create -n plant-seg -c pytorch -c nvidia -c conda-forge pytorch pytorch-cuda=12.1 plant-seg=1.8.1 --no-channel-priority | ||
``` | ||
|
||
* NVIDIA GPU version, CUDA=11.x | ||
|
||
```bash | ||
mamba create -n plant-seg -c pytorch -c nvidia -c conda-forge pytorch pytorch-cuda=11.8 plant-seg=1.8.1 --no-channel-priority | ||
``` | ||
|
||
* CPU version | ||
|
||
```bash | ||
mamba create -n plant-seg -c pytorch -c nvidia -c conda-forge pytorch cpuonly plant-seg=1.8.1 --no-channel-priority | ||
``` | ||
|
||
=== "Windows" | ||
|
||
* NVIDIA GPU version, CUDA=12.x | ||
|
||
```bash | ||
mamba create -n plant-seg -c pytorch -c nvidia -c conda-forge pytorch pytorch-cuda=12.1 nifty=1.2.1=*_4 plant-seg=1.8.1 --no-channel-priority | ||
``` | ||
|
||
* NVIDIA GPU version, CUDA=11.x | ||
|
||
```bash | ||
mamba create -n plant-seg -c pytorch -c nvidia -c conda-forge pytorch pytorch-cuda=11.8 nifty=1.2.1=*_4 plant-seg=1.8.1 --no-channel-priority | ||
``` | ||
|
||
* CPU version | ||
|
||
```bash | ||
mamba create -n plant-seg -c pytorch -c nvidia -c conda-forge pytorch cpuonly nifty=1.2.1=*_4 plant-seg=1.8.1 --no-channel-priority | ||
``` | ||
|
||
=== "macOS" | ||
|
||
* Apple silicon version | ||
|
||
```bash | ||
mamba create -n plant-seg -c pytorch -c conda-forge python=3.11 pytorch::pytorch plant-seg=1.8.1 --no-channel-priority | ||
``` | ||
|
||
If you used older versions of PlantSeg, please delete the old config files in `~/.plantseg_models/configs/` after installing new PlantSeg. | ||
|
||
The above command will create new conda environment `plant-seg` together with all required dependencies. | ||
|
||
Please refer to the [PyTorch](https://pytorch.org/get-started/locally/) website for more information on the available versions of PyTorch and the required CUDA version. The GPU version of Pytorch will also work on CPU only machines but has a much larger installation on disk. | ||
|
||
## Optional dependencies | ||
|
||
Certain compressed TIFF files (e.g., Zlib, ZSTD, LZMA formats) require additional codecs to be processed correctly by PlantSeg. To handle such files, install the `imagecodecs` package: | ||
|
||
```bash | ||
conda activate plant-seg | ||
pip install imagecodecs | ||
``` | ||
|
||
If you plan to use SimpleITK-based watershed segmentation, you will need to install `SimpleITK` as an additional dependency: | ||
|
||
```bash | ||
conda activate plant-seg | ||
pip install SimpleITK | ||
``` |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Import and export tasks | ||
|
||
## Gaussian smoothing task | ||
|
||
::: plantseg.tasks.dataprocessing_tasks.gaussian_smoothing_task | ||
|
||
## Image cropping task | ||
|
||
::: plantseg.tasks.dataprocessing_tasks.image_cropping_task | ||
|
||
|
||
## Image rescale to shape task | ||
|
||
::: plantseg.tasks.dataprocessing_tasks.image_rescale_to_shape_task | ||
|
||
|
||
## Image rescale to voxel size task | ||
|
||
::: plantseg.tasks.dataprocessing_tasks.image_rescale_to_voxel_size_task | ||
|
||
## Set image voxel size task | ||
|
||
::: plantseg.tasks.dataprocessing_tasks.set_voxel_size_task | ||
|
||
## Label Postprocessing | ||
|
||
## Remove false positives task | ||
|
||
::: plantseg.tasks.dataprocessing_tasks.remove_false_positives_by_foreground_probability_task | ||
|
||
## Fix Over/Under segmentation task | ||
|
||
::: plantseg.tasks.dataprocessing_tasks.fix_over_under_segmentation_from_nuclei_task | ||
|
||
## Set biggest object as background task | ||
|
||
::: plantseg.tasks.dataprocessing_tasks.set_biggest_instance_to_zero_task | ||
|
||
## Relabel task | ||
|
||
::: plantseg.tasks.dataprocessing_tasks.relabel_segmentation_task |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Import and export tasks | ||
|
||
## Import task | ||
|
||
::: plantseg.tasks.io_tasks.import_image_task | ||
|
||
## Export task | ||
|
||
::: plantseg.tasks.io_tasks.export_image_task |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Neural network prediction tasks | ||
|
||
## UNet prediction task | ||
|
||
::: plantseg.tasks.prediction_tasks.unet_prediction_task |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Segmentation tasks | ||
|
||
## Distance transform watershed task | ||
|
||
::: plantseg.tasks.segmentation_tasks.dt_watershed_task | ||
|
||
## Cluster segmentation task | ||
|
||
::: plantseg.tasks.segmentation_tasks.clustering_segmentation_task | ||
|
||
## Lifted Multicut task | ||
|
||
::: plantseg.tasks.segmentation_tasks.lmc_segmentation_task |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters