Metadata-Version: 2.4
Name: sprout-seg
Version: 1.1.0
Summary: SPROUT: semi-automated parcellation of 2D and 3D greyscale images into parts, by thresholds, erosion and growing
Author: Yichen He
License-Expression: MIT
Project-URL: Homepage, https://github.com/EchanHe/SPROUT
Project-URL: Documentation, https://github.com/EchanHe/SPROUT#readme
Project-URL: Issues, https://github.com/EchanHe/SPROUT/issues
Project-URL: Changelog, https://github.com/EchanHe/SPROUT/blob/main/CHANGELOG.md
Keywords: segmentation,image analysis,micro-CT,CT,MRI,3D,multi-class,seeds,region growing
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Image Processing
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.26
Requires-Dist: scipy>=1.15
Requires-Dist: scikit-image>=0.22
Requires-Dist: pandas>=2.2
Requires-Dist: tifffile>=2024.2.12
Requires-Dist: imagecodecs>=2025.3.30
Requires-Dist: pyyaml>=6.0
Requires-Dist: psutil>=5.9
Requires-Dist: pillow>=10
Provides-Extra: mesh
Requires-Dist: trimesh>=4.3; extra == "mesh"
Requires-Dist: matplotlib>=3.8; extra == "mesh"
Provides-Extra: ai
Requires-Dist: nninteractive>=1.1.3; extra == "ai"
Requires-Dist: scikit-learn; extra == "ai"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Dynamic: license-file

# sprout-seg

The core and command line of [SPROUT](https://github.com/EchanHe/SPROUT): multi-part segmentation of 2D and 3D greyscale images (e.g. CT, MRI) without training data. For the napari plugin, see [napari-sprout](https://pypi.org/project/napari-sprout/).

- **Seeds**: thresholds and erosion split an image into parts; adaptive and sweep modes combine several settings.
- **Grow**: seeds grow back to the full shape of each part.
- **Prompts**: seeds as prompts for nnInteractive or SAM.
- **Batch**: many images from one CSV. Runs on CPU.

## Install

```bash
pip install sprout-seg               # command line only (e.g. on a cluster)
pip install "napari-sprout[all]"     # with the napari plugin, napari and Qt
```

Extras: `sprout-seg[ai]` (nnInteractive; with an NVIDIA GPU, install PyTorch for your CUDA version first), `sprout-seg[mesh]` (meshes).

## Use

Every step is a YAML config ([templates](https://github.com/EchanHe/SPROUT/tree/main/template)):

```bash
sprout --seeds --config make_seeds.yaml
sprout --sweep_adaptive --config sweep_adaptive_seed.yaml
sprout --adaptive_seed --config make_adaptive_seed.yaml
sprout --grow --config make_grow.yaml
sprout --seeds --batch --config batch_seeds.yaml
sprout --help
```

Docs, demo data and videos: [github.com/EchanHe/SPROUT](https://github.com/EchanHe/SPROUT).

## Cite

Y. He, M. Camaiti, L.E. Roberts, J.M. Mulqueeney, E. Ioannou, M. Didziokas, A. Goswami. *SPROUT: A User-friendly, Scalable Toolkit for Multi-class Segmentation of Volumetric Images.* [bioRxiv 2024](https://www.biorxiv.org/content/10.1101/2024.11.22.624847v2.abstract).

MIT License.
