Metadata-Version: 2.4
Name: bioimageio.core
Version: 0.10.0
Summary: Python specific core utilities for bioimage.io resources (in particular DL models).
Author-email: Fynn Beuttenmüller <thefynnbe@gmail.com>
Project-URL: Bug Reports, https://github.com/bioimage-io/core-bioimage-io-python/issues
Project-URL: Changelog, https://github.com/bioimage-io/core-bioimage-io-python?tab=readme-ov-file#changelog
Project-URL: Documentation, https://bioimage-io.github.io/core-bioimage-io-python/bioimageio/core.html
Project-URL: Source, https://github.com/bioimage-io/core-bioimage-io-python
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: bioimageio.spec==0.5.9.0
Requires-Dist: imagecodecs
Requires-Dist: imageio>=2.10
Requires-Dist: loguru
Requires-Dist: numpy
Requires-Dist: pydantic-settings<3,>=2.5
Requires-Dist: pydantic<3,>=2.7.0
Requires-Dist: ruyaml
Requires-Dist: scipy
Requires-Dist: tqdm
Requires-Dist: typing-extensions
Requires-Dist: xarray>=2023.01
Provides-Extra: onnx
Requires-Dist: onnxruntime; extra == "onnx"
Requires-Dist: onnxscript; extra == "onnx"
Requires-Dist: onnx_ir!=0.1.14; python_version < "3.10" and extra == "onnx"
Provides-Extra: pytorch
Requires-Dist: torch<3,>=1.6; extra == "pytorch"
Requires-Dist: torchvision>=0.21; extra == "pytorch"
Requires-Dist: keras<4,>=3.0; extra == "pytorch"
Provides-Extra: tensorflow
Requires-Dist: tensorflow; extra == "tensorflow"
Requires-Dist: keras<4,>=2.15; extra == "tensorflow"
Requires-Dist: h5py; extra == "tensorflow"
Provides-Extra: partners
Requires-Dist: careamics; extra == "partners"
Provides-Extra: stardist
Requires-Dist: stardist; extra == "stardist"
Provides-Extra: dev
Requires-Dist: cellpose; extra == "dev"
Requires-Dist: crick; extra == "dev"
Requires-Dist: httpx; extra == "dev"
Requires-Dist: jax; extra == "dev"
Requires-Dist: jupyter; extra == "dev"
Requires-Dist: keras<4,>=3.0; extra == "dev"
Requires-Dist: matplotlib; extra == "dev"
Requires-Dist: monai; extra == "dev"
Requires-Dist: numpy; extra == "dev"
Requires-Dist: onnx; extra == "dev"
Requires-Dist: onnxruntime; extra == "dev"
Requires-Dist: onnxscript; extra == "dev"
Requires-Dist: onnx_ir!=0.1.14; python_version < "3.10" and extra == "dev"
Requires-Dist: packaging>=17.0; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: pyright==1.1.408; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: python-dotenv; extra == "dev"
Requires-Dist: segment-anything; extra == "dev"
Requires-Dist: stardist; extra == "dev"
Requires-Dist: tensorflow; extra == "dev"
Requires-Dist: timm; extra == "dev"
Requires-Dist: torch<3,>=1.6; extra == "dev"
Requires-Dist: torchvision>=0.21; extra == "dev"
Provides-Extra: docs
Requires-Dist: griffe-pydantic; extra == "docs"
Requires-Dist: griffe-inherited-docstrings; extra == "docs"
Requires-Dist: griffe-public-redundant-aliases; extra == "docs"
Requires-Dist: markdown-callouts; extra == "docs"
Requires-Dist: markdown-exec[ansi]; extra == "docs"
Requires-Dist: markdown-pycon; extra == "docs"
Requires-Dist: mike; extra == "docs"
Requires-Dist: mkdocs-api-autonav; extra == "docs"
Requires-Dist: mkdocs-coverage; extra == "docs"
Requires-Dist: mkdocs-gen-files; extra == "docs"
Requires-Dist: mkdocs-literate-nav; extra == "docs"
Requires-Dist: mkdocs-material; extra == "docs"
Requires-Dist: mkdocs-section-index; extra == "docs"
Dynamic: license-file

![License](https://img.shields.io/github/license/bioimage-io/core-bioimage-io-python.svg)
[![PyPI](https://img.shields.io/pypi/v/bioimageio-core.svg?style=popout)](https://pypi.org/project/bioimageio.core/)
[![conda-version](https://anaconda.org/conda-forge/bioimageio.core/badges/version.svg)](https://anaconda.org/conda-forge/bioimageio.core/)
[![downloads](https://static.pepy.tech/badge/bioimageio.core)](https://pepy.tech/project/bioimageio.core)
[![conda-forge downloads](https://img.shields.io/conda/dn/conda-forge/bioimageio.core.svg?label=conda-forge)](https://anaconda.org/conda-forge/bioimageio.core/)
![code style](https://img.shields.io/badge/code%20style-black-000000.svg)
[![coverage](https://bioimage-io.github.io/core-bioimage-io-python/coverage/coverage-badge.svg)](https://bioimage-io.github.io/core-bioimage-io-python/coverage/index.html)

# bioimageio.core

`bioimageio.core` is a python package that implements prediction with bioimage.io models
including standardized pre- and postprocessing operations.
Such models are represented as [bioimageio.spec](https://bioimage-io.github.io/spec-bioimage-io) resource descriptions.

In addition bioimageio.core provides functionality to convert model weight formats
and compute selected dataset statistics used for preprocessing.

## Documentation

[Here you find the bioimageio.core documentation.](https://bioimage-io.github.io/core-bioimage-io-python)

#### Examples

Notebooks that save and load resource descriptions and validate their format (using <a href="https://bioimage-io.github.io/core-bioimage-io-python/bioimageio/spec.html">bioimageio.spec</a>, a dependency of bioimageio.core)
<ul>
<li><a href="https://github.com/bioimage-io/spec-bioimage-io/blob/main/example/load_model_and_create_your_own.ipynb">load_model_and_create_your_own.ipynb</a> <a target="_blank" href="https://colab.research.google.com/github/bioimage-io/spec-bioimage-io/blob/main/example/load_model_and_create_your_own.ipynb">
  <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a></li>
<li><a href="https://github.com/bioimage-io/spec-bioimage-io/blob/main/example/dataset_creation.ipynb">dataset_creation.ipynb</a> <a target="_blank" href="https://colab.research.google.com/github/bioimage-io/spec-bioimage-io/blob/main/example/dataset_creation.ipynb">
  <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a></li>
</ul>

Use the described resources in Python with <a href="https://bioimage-io.github.io/core-bioimage-io-python/bioimageio/core.html">bioimageio.core</a>
<ul>
<li><a href="https://github.com/bioimage-io/core-bioimage-io-python/blob/main/example/model_usage.ipynb">model_usage.ipynb</a><a target="_blank" href="https://colab.research.google.com/github/bioimage-io/core-bioimage-io-python/blob/main/example/model_usage.ipynb">
  <img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a></li>
</ul>

#### Presentations

- [Create a model from scratch](https://bioimage-io.github.io/core-bioimage-io-python/presentations/create_ambitious_sloth.slides.html) ([source](https://github.com/bioimage-io/core-bioimage-io-python/tree/main/presentations))

## Set up Development Environment

To set up a development environment run the following commands:

```console
conda create -n core python=$(grep -E '^requires-python' pyproject.toml | grep -oE '[0-9]+\.[0-9]+')
conda activate core
pip install -e .[dev,partners]
```

### Joint development of bioimageio.spec and bioimageio.core

Assuming [spec-bioimage-io](https://github.com/bioimage-io/spec-bioimage-io) is cloned to the parent folder
a joint development environment can be created with the following commands:

```console
conda create -n core python=$(grep -E '^requires-python' pyproject.toml | grep -oE '[0-9]+\.[0-9]+')
conda activate core
pip install -e .[dev,partners] -e ../spec-bioimage-io[dev]
```

## Logging level

`bioimageio.spec` and `bioimageio.core` use [loguru](https://github.com/Delgan/loguru) for logging, hence the logging level
may be controlled with the `LOGURU_LEVEL` environment variable.
The `bioimageio` CLI has logging enabled by default.
To activate logging when using bioimageio.spec/bioimageio.core as a library, add

```python
from loguru import logger

logger.enable("bioimageio")
```

## Changelog

See [changelog.md](changelog.md)
