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.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| linkinpy_stardist-0.0.5.tar.gz | 7.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| linkinpy_stardist-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.9 kB
Release files / linkinpy_stardist-0.0.5.tar.gz
| Download URL | linkinpy_stardist-0.0.5.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
83d54776f390880f50ad8801011e485a747c31ff76adb6087785c4934b7672c9
|
|
BLAKE2b-256 checksum How to use checksums |
4bd0ade5a9cdee70344b49a35b199a44f88300c05deb03f98e1ba4f68e9925d8
|
| 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.5-py3-none-any.whl
| Download URL | linkinpy_stardist-0.0.5-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
36d9549cef09ba6e0f94b8690f9cfc1b9c4e5bb48a0cb6168ee1e5512c28c254
|
|
BLAKE2b-256 checksum How to use checksums |
38e933f965a37a196b8706937669135f1227f89902151f93aff28d358b9c20e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|