bioimageio CLI
bioimageio Command Line Interface¤
bioimageio.core installs a command line interface (CLI) for testing models and other functionality.
You can list all the available commands via:
bioimageio --help
usage: bioimageio [-h] {validate-format,test,package,predict,predict-block-artifacts,update-format,update-hashes,add-weights,empty-cache} ...
bioimageio - CLI for bioimage.io resources 🦒
library versions:
bioimageio.core 0.10.0
bioimageio.spec 0.5.9.0
spec format versions:
model RDF 0.5.9
dataset RDF 0.3.0
notebook RDF 0.3.0
options:
-h, --help show this help message and exit
subcommands:
{validate-format,test,package,predict,predict-block-artifacts,update-format,update-hashes,add-weights,empty-cache}
validate-format Validate the meta data format of a bioimageio resource.
test Test a bioimageio resource (beyond meta data formatting).
package Save a resource's metadata with its associated files.
predict Run inference on your data with a bioimage.io model.
predict-block-artifacts
Command to inspect block artifacts by subtracting the combined, blockwise predictions from a whole sample prediction.
Note:
- This command intentionally uses a small blocksize (default: 1) to create block artifacts for testing purposes.
- Typical sources of block artifacts include:
- Described halo is smaller than the model's receptive field
- Normalization layers inside the network cannot aggregate statistics over the whole sample.
update-format Update the metadata format to the latest format version.
update-hashes Create a bioimageio.yaml description with updated file hashes.
add-weights Add additional weights to a model description by converting from available formats.
empty-cache Empty the bioimageio cache directory.
For concrete examples see Get started.
CLI inputs from file¤
For convenience the command line options (not arguments) may be given in a bioimageio-cli.json or bioimageio-cli.yaml file, e.g.:
# bioimageio-cli.yaml
inputs: inputs/*_{tensor_id}.tiff
outputs: outputs_{model_id}/{sample_id}_{tensor_id}.tiff
overwrite: true
blockwise: true
stats: inputs/dataset_statistics.json