zea.models.lv_segmentation¶
nnU-Net segmentation model trained on the augmented CAMUS dataset.
To try this model, simply load one of the available presets:
>>> from zea.models.lv_segmentation import AugmentedCamusSeg
>>> model = AugmentedCamusSeg.from_preset("augmented_camus_seg")
The model segments both the left ventricle and myocardium.
At the time of writing (17 September 2025) and to the best of our knowledge, it is the state-of-the-art model for left ventricle segmentation on the CAMUS dataset.
Important
This is a zea implementation of the model.
For the original code, see here.
Reference
G. Van De Vyver, A. T. Lenz, E. Smistad, S. H. Olaisen, B. Grenne, E. Holte, H. Dalen, and L. Løvstakken, “Generative Augmentations for Improved Cardiac Ultrasound Segmentation Using Diffusion Models,” Scientific Reports, vol. 15, no. 1, p. 38013, 2025. doi.org/10.1038/s41598-025-21938-y
See also
A tutorial notebook where this model is used: Left ventricle segmentation.
Note
The model is originally a PyTorch model converted to ONNX. To use this model, you must have onnxruntime installed. This is required for ONNX model inference.
You can install it using pip:
pip install onnxruntime
Classes
|
nnU-Net based left ventricle and myocardium segmentation model. |
- class zea.models.lv_segmentation.AugmentedCamusSeg(*args, **kwargs)[source]¶
Bases:
BaseModelnnU-Net based left ventricle and myocardium segmentation model.
Trained on the augmented CAMUS dataset.
This class loads an ONNX model and provides inference for cardiac ultrasound segmentation tasks.
- call(inputs)[source]¶
Run inference on the input data using the loaded ONNX model.
- Parameters:
inputs (np.ndarray) – Input image or batch of images for segmentation. Shape: [batch, 1, 256, 256] Range: Any numeric range; normalized internally.
- Returns:
- Segmentation mask(s) for left ventricle and myocardium.
Shape: [batch, 3, 256, 256] (logits for background, LV, myocardium)
- Return type:
np.ndarray
- Raises:
ValueError – If model weights are not loaded.