Skip to main content

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 (for cuda 11.6, please choose the appropriate cuda version for your system)
    conda install -c pytorch -c nvidia -c conda-forge bioimageio.core pytorch torchvision pytorch-cuda=11.6 
    

    Note that the pytorch installation instructions may change in the future. For the latest instructions please refer to pytorch.org.

  • 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 <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 is a python library that implements loading models, running prediction with them and more. To get an overview of this functionality, check out the example notebooks:

Model Specification

The model specification and its validation tools can be found at https://github.com/bioimage-io/spec-bioimage-io.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bioimageio.core-0.5.9.tar.gz (63.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bioimageio.core-0.5.9-py3-none-any.whl (77.3 kB view details)

Uploaded Python 3

File details

Details for the file bioimageio.core-0.5.9.tar.gz.

File metadata

  • Download URL: bioimageio.core-0.5.9.tar.gz
  • Upload date:
  • Size: 63.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for bioimageio.core-0.5.9.tar.gz
Algorithm Hash digest
SHA256 eb36d59c5744ea45f020c95c2a82e2de8f1983396c24ad4edebbe2c79db75a8b
MD5 201fd93c64272d2ff3325c370d39850e
BLAKE2b-256 9c9bfe1a3ddab92d0568907638abc438ebac09a4f75c8596b320496b9dd74411

See more details on using hashes here.

File details

Details for the file bioimageio.core-0.5.9-py3-none-any.whl.

File metadata

File hashes

Hashes for bioimageio.core-0.5.9-py3-none-any.whl
Algorithm Hash digest
SHA256 9b9a1789678e251d6a33b8062e75535c9b39ec32566503d162e0395829bd1660
MD5 e3c1544afed5ffad71c955a916335864
BLAKE2b-256 278d5a595ffaefcfc8fda7f8e7fa626976bd822c4677b5313aed8f133ba0503b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page