Skip to main content

segment-kidney-structures

Purpose: This package is built to perform instance segmentation of kidney structures — glomeruli, tubules, and capillaries. The input is from multiplexed imaging (e.g. CODEX). The three pre-trained models are ready to be deployed. The outputs are segmentation masks (.tif and .npy)

Installation

pip install segment-kidney-structures
# or
uv pip install segment-kidney-structures

Segmentation requires a working omnipose/ cellpose install with GPU support (PyTorch + CUDA). Follow the omnipose installation guide.

Usage

All commands are available under the segment-kidney-structures CLI (or python -m segment_kidney_structures.cli).

1. Build segmentation inputs from marker images

Each dataset is expected to live at <root-dir>/<dataset>/<input-folder>/<marker>/, with one subdirectory per marker containing matching per-sample TIFF images.

# Glomeruli: RGB composite from CD10, Claudin1, CD31 (+ DAPI for QC)
segment-kidney-structures preprocess-glomeruli \
    --root-dir /path/to/data --dataset your_dataset

# Tubules: normalized sum of MUC1, Claudin1, CD138, CD10 channels
segment-kidney-structures preprocess-tubules \
    --root-dir /path/to/data --dataset your_dataset

# Capillaries/vessels: CD31 
segment-kidney-structures preprocess-vessels \
    --root-dir /path/to/data --dataset your_dataset

Each subcommand accepts --input-folder (default ds10), --markers (comma-separated, order matters), --output-name, and --dataset.

2. Run segmentation

segment-kidney-structures segment --structure glomeruli --input-dir /path/to/data/
segment-kidney-structures segment --structure tubules   --input-dir /path/to/data/
segment-kidney-structures segment --structure capillaries --input-dir /path/to/data/

--model-path to use your own model instead of the pretrained ones --mask-threshold / --diameter to override the tuned default parameters --no-gpu to run on CPU --dry-run to print the commands without executing them

Bundled models

Structure Input channels Trained on
glomeruli 3 (RGB) CD10 / DAPI / Claudin1 / CD31 composite
tubules 1 MUC1 / Claudin1 / CD138 / CD10 sum
capillaries 1 CD31

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

segment_kidney_structures-0.1.0.tar.gz (74.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

segment_kidney_structures-0.1.0-py3-none-any.whl (74.0 MB view details)

Uploaded Python 3

File details

Details for the file segment_kidney_structures-0.1.0.tar.gz.

File metadata

  • Download URL: segment_kidney_structures-0.1.0.tar.gz
  • Upload date:
  • Size: 74.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"SLES","version":"15.6","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for segment_kidney_structures-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c124ae1eb084987e07178ef8f44f268da24450a271d982bd60c19543cedcd3b7
MD5 29755990329708eaabda8e93f699ed69
BLAKE2b-256 a0b70a433590d6ed322caefac81d8af367870346f0817dc66e2c03d0338ddd06

See more details on using hashes here.

File details

Details for the file segment_kidney_structures-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: segment_kidney_structures-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 74.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"SLES","version":"15.6","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for segment_kidney_structures-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9a53d4f78cc8f1679a0451bc939b0c3f79617d859a84d74e1b98482ad317d9d4
MD5 24565733a7f36bfbe322f2db4b4de2f2
BLAKE2b-256 23b21c2114b257452074e16efab7833f239575949dff87d264909a00efffe83c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page