writing-skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
deployment-integrationRoute StarDist file prediction, local-model loading, BioImage.IO packaging, ImageJ ROI export, 3D OBJ export, and QuPath annotation handoff without assuming a source checkout.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when a StarDist model is used from a console, moved as a model directory or BioImage.IO package, or handed to ImageJ/Fiji, a mesh viewer, or QuPath. It covers integration boundaries, not model design, training, or generic matching metrics.
scripts/predict2d.py or scripts/predict3d.py, or the
installed stardist-predict2d / stardist-predict3d entry points.The required runtime is CPU Python/TensorFlow 2.x plus StarDist's compiled CPU
extensions. CUDA/TensorFlow acceleration, OpenCL/gputools, BioImage.IO,
ImageJ/Fiji, and QuPath are optional and must be declared explicitly. The
bundled Python scripts delay package imports until after argument and path
validation, so --help works from an unrelated cwd without importing a source
checkout or optional package.
For every run:
YX/YXC for 2D and ZYX/ZYXC for
3D unless the declared permutation is intentional. A channel axis is not a
batch or time axis.csbdeep.normalize with pmin=1, pmax=99.8 by default; this is
preprocessing, not prob_thresh or nms_thresh.--model safely. An existing directory is local; a plain
registered name may download/cache a pretrained model. A missing path-like
selector is an error, not permission to guess.--overwrite was consciously selected.v/f records, or BioImage.IO metadata. Record external GUI/network skips.Facts were distilled from relative repository evidence stardist/scripts/,
stardist/bioimageio_utils.py, stardist/utils.py,
stardist/geometry/geom3d.py, extras/qupath_export_annotations.groovy,
README.md, examples/other2D/README.md, tests/test_bioimageio.py,
tests/test_model2D.py, and tests/test_model3D.py. The verified live API
signature for both StarDist2D.predict_instances and
StarDist3D.predict_instances is:
(self, img, axes=None, normalizer=None, sparse=True, prob_thresh=None,
nms_thresh=None, scale=None, n_tiles=None, show_tile_progress=True,
verbose=False, return_labels=True, predict_kwargs=None, nms_kwargs=None,
overlap_label=None, return_predict=False)
Strict candidates are both bundled script --help checks from an arbitrary
cwd, static privacy/path checks, and bounded ROI/OBJ checks with synthetic or
prepared model data. BioImage.IO is run only if its optional dependency is
already available and bounded. QuPath is static/manual only unless an external
GUI environment is deliberately prepared.