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.6
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.6.tar.gz | 7.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| linkinpy_stardist-0.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.9 kB
Release files / linkinpy_stardist-0.0.6.tar.gz
| Download URL | linkinpy_stardist-0.0.6.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fa6c50f32d57be06ed0705c1aa8b105865a1e7df3c2072274f8e90588108a986
|
|
BLAKE2b-256 checksum How to use checksums |
663d56280c6d6f51b5263b05497d0a9fb9b012b42d3eef1cf66440931a946bc2
|
| 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.6-py3-none-any.whl
| Download URL | linkinpy_stardist-0.0.6-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4984a101b40370711244deee490e195e149237d09e2e4747980b545b4d984db6
|
|
BLAKE2b-256 checksum How to use checksums |
1d106049665d80d963301cbd2c4977d96e184db25cf8f7851f419a6c7d85103f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|