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.3

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.3
File Size Uploaded
linkinpy_stardist-0.0.3.tar.gz 6.6 kB Details

Built distribution (wheel)

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

Total release size: 13.0 kB

Release files / linkinpy_stardist-0.0.3.tar.gz

Download URL linkinpy_stardist-0.0.3.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
22b7a915e523f8c61f13787777efd6c70f4715e3b3697a1397be93f6ab7c7c1b
BLAKE2b-256 checksum
How to use checksums
7b87c7faa6b0b540de9dfb3ce9743e600cfa1f24311cd6a515c69896443b9623
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.3-py3-none-any.whl

Download URL linkinpy_stardist-0.0.3-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f0d459bb0d125ba2f473a5019257be74052c7e2ead9b26fd6331539a41099a1
BLAKE2b-256 checksum
How to use checksums
af2daa98ab714af35d2b4aabc4b80202a89fb0242475c0ea04f30a92ca0b2415
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

0.0.4

2 release files

This release

0.0.3 This release

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