Python functionality for the bioimage model zoo
Project description
core-bioimage-io-python
Python specific core utilities for running models in the BioImage Model Zoo.
Installation
Via Conda
The bioimageio.core
package can be installed from conda-forge via
conda install -c conda-forge bioimageio.core
if you don't install any additional deep learning libraries, you will only be able to use general convenience functionality, but not any functionality for model prediction. To install additional deep learning libraries use:
-
Pytorch/Torchscript:
# cpu installation (if you don't have an nvidia graphics card) conda install -c pytorch -c conda-forge bioimageio.core pytorch torchvision cpuonly # gpu installation conda install -c pytorch -c conda-forge bioimageio.core pytorch torchvision cudatoolkit
-
Tensorflow
# currently only cpu version supported conda install -c conda-forge bioimageio.core tensorflow
-
ONNXRuntime
# currently only cpu version supported conda install -c conda-forge bioimageio.core onnxruntime
Via pip
The package is also available via pip:
pip install bioimageio.core
Set up Development Environment
To set up a development conda environment run the following commands:
conda env create -f dev/environment-base.yaml
conda activate bio-core-dev
pip install -e . --no-deps
There are different environment files that only install tensorflow or pytorch as dependencies available.
Command Line
bioimageio.core
installs a command line interface for testing models and other functionality. You can list all the available commands via:
bioimageio
Check that a model adheres to the model spec:
bioimageio validate <MODEL>
Test a model (including prediction for the test input):
bioimageio test-model -m <MODEL>
Run prediction for an image stored on disc:
bioimageio predict-image -m <MODEL> -i <INPUT> -o <OUTPUT>
Run prediction for multiple images stored on disc:
bioimagei predict-images -m <MODEL> -i <INPUT_PATTERN> - o <OUTPUT_FOLDER>
<INPUT_PATTERN>
is a glob
pattern to select the desired images, e.g. /path/to/my/images/*.tif
.
From python
bioimageio.core
can be used as a python library. See the notebook example/bioimageio-core-usage.ipynb for usage examples.
Model Specification
The model specification and its validation tools can be found at https://github.com/bioimage-io/spec-bioimage-io.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for bioimageio.core-0.4.6.post0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c1fcb9ad4d3021fcf4380e0029d9fe202a494eda7b0c9fb3c027c51ceec4bc2 |
|
MD5 | 0dab9511390beef7f9a4ae369acc2494 |
|
BLAKE2b-256 | 55c8a580b5ac84c569cf70a793ab3bfa26a11f3aa915bd2156f3a38b5a6905c3 |
Hashes for bioimageio.core-0.4.6.post0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74c4c7e3429d75a72d77bc51eff81876c568c34d0564b183a2a5fd482f0e9a21 |
|
MD5 | 830dffaf31b0e63c931ccddd1ca8f4bf |
|
BLAKE2b-256 | 2cb7ea45df83b7dfd5f74fc38d6530604656533245287f21905df67c2ae8131d |