Giter Site home page Giter Site logo

carlosuc3m / core-bioimage-io-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bioimage-io/core-bioimage-io-python

0.0 0.0 0.0 1.86 MB

Python specific core utilities for interpretation of specification files of the bioimage model zoo

License: MIT License

Python 20.51% Jupyter Notebook 79.49%

core-bioimage-io-python's Introduction

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 <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.

core-bioimage-io-python's People

Contributors

fynnbe avatar constantinpape avatar m-novikov avatar k-dominik avatar oeway avatar carlosuc3m avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.