Skip to main content

LinkinPy-StarDist

linkinpy-stardist provides LinkinPy-compatible StarDist 2D training and prediction workflows. The package is intended to be installed through Library/StarDist.yaml, but it can also be used directly from Python.

Workflows

  • train_2d_with_qc: train a custom StarDist 2D model with optional augmentation and held-out quality control.
  • predict_2d_custom_model: run inference with a trained model directory.
  • predict_2d_pretrained_model: run inference with a StarDist pretrained model.
  • batch_predict_2d_custom_model: run custom-model prediction over an input folder.
  • batch_predict_2d_pretrained_model: run pretrained prediction over an input folder.

Install

uv pip install linkinpy-stardist

Most users should install it indirectly:

cd LinkinPy
uv run linkinpy install ../Library/StarDist.yaml --interface cli

Data Layout For Training

Training expects paired raw images and instance-label masks. File names are matched by stem:

training/
  images/
    cell01.tif
    cell02.tif
  masks/
    cell01.tif
    cell02.tif

images/cell01.tif pairs with masks/cell01.tif.

CLI Example Through LinkinPy

cd LinkinPy
uv run linkinpy run ../Library/StarDist.yaml "Predict 2D Pretrained Model" \
  --output-dir outputs \
  image=input.tif \
  model_name=2D_versatile_fluo

Prediction methods return labels as np.ndarray outputs. Batch methods return summary paths that point to written batch results.

Direct Python Example

import tifffile
from linkinpy_stardist import predict_2d_pretrained_model

image = tifffile.imread("input.tif")
labels = predict_2d_pretrained_model(
    image=image,
    model_name="2D_versatile_fluo",
)

Quality Control

When quality control is enabled during training, the data is split into train, validation, and test sets. The held-out test split is used only for post-training QC metrics.

For the full LinkinPy interface tutorial, see ../../USAGE_TUTORIALS.md.

Metadata

Release files for linkinpy-stardist 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for linkinpy-stardist 0.0.4
File Size Uploaded
linkinpy_stardist-0.0.4.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for linkinpy-stardist 0.0.4
File Interpreter ABI Platform
linkinpy_stardist-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 13.9 kB

Release files / linkinpy_stardist-0.0.4.tar.gz

Download URL linkinpy_stardist-0.0.4.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1d13dfc3d096b1442d885f965499e19338e1b3e622ff7ce7fd56f09b1c4d985a
BLAKE2b-256 checksum
How to use checksums
05aab0b304d42a058aa485bb24049e2f4ede1a98acf2d36fa88dc71ad8576170
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / linkinpy_stardist-0.0.4-py3-none-any.whl

Download URL linkinpy_stardist-0.0.4-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
01e392f37dfbef5f8e4c507fe7e1d52dab7171b89caf8f52b494038b4b05393d
BLAKE2b-256 checksum
How to use checksums
a41f04f84b3197d5ce7789cc319a98ead882d21a72a06d906836f2558dfdc2fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

0.0.6

2 release files

0.0.5

2 release files

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page