zea
A Toolbox for Cognitive Ultrasound Imaging
Documentation · Getting Started · Examples · Models · Datasets
zea is a Python library for ultrasound signal processing, image reconstruction, and deep learning. It is built on Keras 3, so everything runs on JAX, PyTorch, or TensorFlow.
Installation
pip install zea
Additionally, zea needs one of the Keras backends installed: JAX (recommended), PyTorch, or TensorFlow. See the installation guide for details regarding more advanced installation options, such as GPU support.
Quick start
zea offers many models and tooling for advanced ultrasound processing. But in the most basic sense it offers a fast and flexible ultrasound processing pipeline implemented in a deep learning framework for easy integration with state-of-the-art models. The following example streams an in-vivo recording from Hugging Face, beamforms it, and saves the B-mode image:
import zea
zea.init_device()
config = zea.Config.from_path("hf://zeahub/picmus/config_iq.yaml")
path = (
"hf://zeahub/picmus/in_vivo/carotid_cross/"
"carotid_cross_expe_dataset_iq/carotid_cross_expe_dataset_iq.hdf5"
)
with zea.File(path) as file:
data = file.data.raw_data[0]
parameters = file.load_parameters()
parameters.update(**config.parameters)
pipeline = zea.Pipeline.from_config(config, with_batch_dim=False)
inputs = pipeline.prepare_parameters(parameters)
image = pipeline(data=data, **inputs, return_numpy=True)["data"]
image = zea.display.to_8bit(image)
image.save("bmode.png")
The Getting Started guide walks through this example step by step, and the Examples page has many more notebooks you can open in Colab.
Core modules
| | | |---|---| | 🔧 Pipeline | Flexible, differentiable signal processing and image reconstruction, written in your favorite deep learning framework. | | 💾 Data | Loading tools for ultrasound data and acquisition parameters, designed for deep learning workflows. Datasets on Hugging Face are streamed, so only the frames you read are fetched. | | 🧠 Models | Pretrained models for ultrasound image and signal processing, hosted on Hugging Face. | | 🎯 Agent | Action selection for cognitive ultrasound, with flexible transmit and acquisition design: an action decides what to acquire next, such as which scan lines to fire. |
Read the About page for the motivation behind zea and the research it supports.
Contributing
Questions and suggestions are welcome as an issue on GitHub. If you want to contribute, see the Contributing guide.
Citation
If zea helps your research, please cite our JOSS paper. More citation info is in the docs.
BibTeX
@article{stevens2026zea,
author = {Stevens, Tristan S.W. and van Nierop, Wessel L. and Luijten, Ben and van de Schaft, Vincent and Nolan, Oisín and Federici, Beatrice and van Harten, Louis D. and Penninga, Simon W. and Schueler, Noortje I.P. and van Sloun, Ruud J.G.},
title = {{zea}: A Toolbox for Cognitive Ultrasound Imaging},
year = 2026,
journal = {Journal of Open Source Software},
publisher = {The Open Journal},
volume = 11,
number = 121,
pages = 9881,
doi = {10.21105/joss.09881},
}
