This release is a pre-release and may not be stable for production use.
Medical Imaging Segmentation Toolkit
MIST is a simple, scalable, end-to-end framework for 3D medical image segmentation. It handles everything from raw NIfTI files to trained models and evaluated predictions, with sensible defaults that work well out of the box and a configuration file for when you need more control.
Installation
pip install mist-medical
This works on CPUs and NVIDIA GPUs. For AMD GPUs, install a ROCm build of
PyTorch first (see Accelerator support).
Docker: docker pull mistmedical/mist:latest. Upgrading from 2.x? See
Upgrading to 3.0.
Quick Start
1. Prepare a dataset JSON describing your data:
{
"task": "brats2023",
"modality": "mr",
"train-data": "/full/path/to/raw/data/train",
"test-data": "/full/path/to/raw/data/validation",
"mask": ["seg.nii.gz"],
"images": {
"t1": ["t1n.nii.gz"],
"t2": ["t2w.nii.gz"],
"tc": ["t1c.nii.gz"],
"fl": ["t2f.nii.gz"]
},
"labels": [0, 1, 2, 3],
"final_classes": { "WT": [1, 2, 3], "TC": [1, 3], "ET": [3] }
}
2. Run the full pipeline (analyze → preprocess → train → evaluate):
mist_run_all --data dataset.json \
--numpy /path/to/numpy \
--results /path/to/results
3. Run inference on new data:
mist_predict --models-dir /path/to/results/models \
--config /path/to/results/config.json \
--paths-csv /path/to/test.csv \
--output /path/to/predictions
Key Features
- Automatic configuration — analysis chooses target spacing, normalization, and foreground cropping from your data; the first training run chooses patch size, batch size, and precision for the GPU
- Five-fold cross-validation by default, with custom fold assignment support
- Multi-GPU training via PyTorch DDP on NVIDIA CUDA or AMD ROCm; uses all visible GPUs automatically
- Fast data loading that reads only each training patch, with augmentation on the GPU — on NVIDIA, AMD ROCm, or CPU-only hardware, with no NVIDIA-specific dependencies
- Sliding window inference with configurable overlap and patch blending
- Test-time augmentation and multi-model ensembling at inference
- Postprocessing with per-class morphological strategies defined in JSON
- CPU training and inference — the full pipeline,
mist_trainincluded, runs on any machine, including Macs and laptops without an NVIDIA GPU
Supported Architectures
| Model | Variants |
|---|---|
| nnU-Net | nnunet-plain (default), nnunet-res (alias nnunet), nnunet-pocket |
| ResEnc UNet | resenc, resenc-pocket |
| MedNeXt | mednext-small, mednext-base, mednext-medium, mednext-large |
| SwinUNETR-V2 | swinunetr-small, swinunetr-base, swinunetr-large |
| Primus | primus-medium, primus-large, primus-x |
| PrimusV2 | primusv2-small, primusv2-base, primusv2-medium, primusv2-large |
| FMG-Net | fmgnet |
| W-Net | wnet |
Change the architecture in config.json or pass --model <key> at the command
line.
Supported Loss Functions
| Loss | Key | Notes |
|---|---|---|
| Dice | dice |
|
| Dice + Cross-Entropy | dice_ce |
|
| clDice | cldice |
Composite |
| Boundary Loss | bl |
Composite |
| Generalized Surface Loss | gsl |
Composite |
| Hausdorff Distance One-Sided | hdos |
Composite |
| Volumetric SDDL | volumetric_sddl |
Composite |
| Vessel SDDL | vessel_sddl |
Composite |
Composite losses blend a region-based term with a boundary/distance term,
weighted by a scheduled alpha. Schedules: constant, linear, cosine.
Pipeline Commands
| Command | Description |
|---|---|
mist_run_all |
Run the full pipeline end-to-end |
mist_analyze |
Analyze dataset and generate config.json |
mist_preprocess |
Preprocess images into NumPy arrays |
mist_train |
Train models |
mist_finalize |
Aggregate out-of-fold predictions into results.csv and run test-set inference |
mist_predict |
Run inference on new data |
mist_ensemble |
Combine predictions from multiple models via STAPLE, majority vote, or probability averaging |
mist_evaluate |
Evaluate predictions against ground truth |
mist_postprocess |
Apply postprocessing strategies |
mist_rank |
Rank multiple evaluation result CSVs BraTS-style |
mist_average_weights |
Average model weights across folds |
mist_convert_msd |
Convert Medical Segmentation Decathlon datasets |
mist_convert_csv |
Convert CSV-formatted datasets |
Documentation
Full documentation, including configuration reference and advanced topics, is at mist-medical.readthedocs.io.
What's New
- November 2026 — MIST 3.0 (release candidate) — NVIDIA DALI is gone, and
MIST's own data loader is the only one, on NVIDIA, AMD, and CPU machines. It
trained full LiTS in 13 s per epoch on an H100, against 67 s with DALI.
Planning at training time, FP16, nnU-Net-style augmentation, and the new
default
nnunet-plaincome from 2.5.0rc0. Models trained with 2.x keep working; see Upgrading to 3.0. - November 2026 — MIST 2.4.0 — new ResEnc UNet (
resenc), Primus, and PrimusV2 architectures, and fine-tuning from the openly available nnFoundationCNN and nnFoundationViT pretrained encoders with--pretrained-weights. Try it in the fine-tuning notebook. - October 2026 — MIST 2.3.0, the first stable release — CPU and AMD ROCm
training,
mist_finalizefor per-fold distributed training, probability-level and parallel ensembling, and no more ANTs dependency. - July 2026 — Interactive Colab demo — run the full pipeline on a free Colab GPU with the heart segmentation notebook.
- 2024 and 2025 — 3rd place in the BraTS adult glioma challenge at MICCAI 2024 and MICCAI 2025.
See the changelog for the full release history.
Citation
If you use MIST in your work, please cite:
@article{celaya2024mist,
title = {MIST: A Simple and Scalable End-To-End 3D Medical Imaging Segmentation Framework},
author = {Celaya, Adrian and others},
journal = {arXiv preprint arXiv:2407.21343},
year = {2024}
}
@article{celaya2022pocketnet,
title = {PocketNet: A Smaller Neural Network For Medical Image Analysis},
author = {Celaya, Adrian and others},
journal = {IEEE Transactions on Medical Imaging},
doi = {10.1109/TMI.2022.3224873},
year = {2022}
}
Metadata
Release files for mist-medical 3.0.0rc0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mist_medical-3.0.0rc0.tar.gz | 231.8 kB | Without provenance | Details for mist_medical-3.0.0rc0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mist_medical-3.0.0rc0-py3-none-any.whl | Python 3 | none | any | Details for mist_medical-3.0.0rc0-py3-none-any.whl |
Total release size: 520.5 kB
Release files / mist_medical-3.0.0rc0.tar.gz
| Download URL | mist_medical-3.0.0rc0.tar.gz |
|---|---|
| Size | 231.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
693e99dee88298f471bb3915c65616984e22214a32b551b6634a4f3bae517c8c
|
|
BLAKE2b-256 checksum How to use checksums |
2a87e9d1dcda51fa44380b396880d0466fec9c1956e1339c721a0aa245d7c46b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Release files / mist_medical-3.0.0rc0-py3-none-any.whl
| Download URL | mist_medical-3.0.0rc0-py3-none-any.whl |
|---|---|
| Size | 288.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5e620ddab0c23c533c010b2ca861194505f359fcacb5768aecbbec306a593902
|
|
BLAKE2b-256 checksum How to use checksums |
33d797430d3865a894e20e07f1fb1a40df1153edd918c9dbf56b6022006af6ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Security for mist-medical 3.0.0rc0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.