myopari
User-Friendly AI Software for Automated Quantitative CMR Reporting on Low-Cost, Energy-Efficient Devices
π« myopari
myopari: An Open-Source Edge AI Framework for Automated Quantitative Cardiac MRI Analysis.
π₯ Authors
Minh Nhat Trinh and Teresa M Correia
Quantitative Bio-imaging Lab, Centro de CiΓͺncias do Mar do Algarve (CCMAR/CIMAR LA), Campus de Gambelas, Universidade do Algarve, 8005-139 Faro, Portugal
π Introduction
myopari is a napari plugin for cardiac MRI segmentation and quantitative report generation. It brings ONNX-based AI inference to edge devices through an interactive interface that works with both 2D images and 3D volumes.
β¨ Main features
- π§ Built-in
TIRAMISU_ACDCandTIRAMISU_EMIDECsegmentation models - π₯οΈ Local, edge-friendly ONNX inference
- π« Optional myocardium-only segmentation
- π Per-class volume measurements and myocardium mass estimates
- π Markdown report generation with optional patient information
- π€ Optional LLM-assisted report rewriting with
llama-cpp-python
π― Model segmentation outputs
The output label groups for each model are defined as below:
| Model | Segmentation output | Label value(s) |
|---|---|---|
TIRAMISU_ACDC |
Right ventricle | 1 |
TIRAMISU_ACDC |
Myocardium | 2 |
TIRAMISU_ACDC |
Left ventricle | 3 |
TIRAMISU_EMIDEC |
Cavity | 1 |
TIRAMISU_EMIDEC |
Myocardium | 2, 3, 4 |
TIRAMISU_EMIDEC |
Infarction | 3, 4 |
TIRAMISU_EMIDEC |
No-reflow | 4 |
Some EMIDEC groups intentionally overlap: infarction and no-reflow are included in the broader myocardium group for quantitative reporting.
π Usage
- Launch napari.
- Load a cardiac MRI image or volume.
- Open
Plugins β myopari β myopari. - Click Select image layer and choose the image to analyze.
- Select the edge device and segmentation model.
- Optionally enable Myocardium only.
- Click Segment. The result appears as a new labels layer named
segmentation_<input_layer_name>_<count>.
π Create a report
After segmentation:
- Optionally click Choose patient info files and select
.cfg,.txt, or.mdfiles. - Optionally enable Use LLM for report.
- Click Create report.
- Click Save report to .md to export the result.
The report includes per-label volumes in mL and an estimated myocardium mass. If a logo is available in Resources, it is embedded in the report and copied beside the saved Markdown file.
β¨οΈ Installation Guide (Command Line)
The commands below create a dedicated Conda environment, install napari, automatically select the appropriate CPU or CUDA wheel for llama-cpp-python, and install myopari:
conda create -y -n myopari python=3.13
conda activate myopari
pip install "napari[all]==0.7.1"
# Check your CUDA version. If nvidia-smi is unavailable, use the CPU command.
# CPU:
pip install llama-cpp-python==0.3.36 \
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
# CUDA (replace cu124 with your CUDA wheel tag, for example cu118 or cu121):
pip install llama-cpp-python==0.3.36 \
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu132
pip install myopari
napari
After napari opens, select Plugins β myopari β myopari.
π§© Installation Guide (No Code β Highly Recommended)
This is the easiest installation method; no terminal or programming experience is required. π
- Download and install the official napari bundled app:
- πͺ Windows installer
- π§ Linux installer
- π Official bundled-app guide
- Before installing myopari, install
llama-cpp-pythonusing the installer for your operating system:- πͺ Windows: Download install_llama2napari_windows.bat, double-click it, and follow the prompts.
- π§ Linux: Download install_llama2napari_linux.sh, run it by bash, and follow the prompts.
- Open napari after the
llama-cpp-pythoninstallation finishes. - Go to
Plugins β Install/Uninstall Plugins. - Search for myopari.
- Click Install and restart napari when installation finishes.
- Open the plugin from
Plugins β myopari β myopari. β
The plugin is also listed on the napari hub.
π οΈ Troubleshooting
- Segmentation runtime/provider issues: Check whether
onnxruntimeoronnxruntime-gpuis installed. For GPU inference, ensure that the CUDA and driver versions match the installed ONNX Runtime build. - LLM report generation fails: Install
llama-cpp-pythonin napari's environment and ensure internet access is available for the first model download. Disable Use LLM for report to continue with standard report generation. - Plugin is missing after installation: Restart napari and check
Plugins β Install/Uninstall Pluginsto confirm that myopari is installed and enabled.
π License
myopari is open-source software licensed under the MIT License.
Version:
- 0.1.7
Last updated:
- 2026-11-17
First released:
- 2026-07-29
License:
- MIT
Python versions supported:
3.9, 3.10, 3.11, 3.12, 3.13Operating system:
- Information not submitted
Requirements:
- napari
- scikit-image
- onnxruntime-gpu
- huggingface-hub
- napari-itk-io
