State-of-the-art ischemic stroke lesion segmentation in MRI
With a Python 3.9+ environment, you can install stroke_segmentor
directly from PyPI:
pip install stroke_segmentor
A minimal example to create a segmentation could look like this:
from stroke_segmentor.inferer import Inferer
inferer = Inferer()
pred = inferer.infer(
adc_path="path/to/adc.nii.gz",
dwi_path="path/to/dwi.nii.gz",
segmentation_path="seg.nii.gz", # optional. the numpy array is always returned for direct usage
)
By default our package is silent, although we do use logging under the hood.
If you want, you can enable it like this:
from loguru import logger
logger.enable("stroke_segmentor")
Important
stroke_segmentor
is based on DeepISLES and offers its NVAUTO algorithm
as part of the BrainLesion suite.
Please cite all relevant manuscripts!
de la Rosa, Ezequiel, et al. "DeepISLES: a clinically validated ischemic stroke segmentation model from the ISLES'22 challenge." Nature Communications 16.1 (2025): 7357.
@article{de2025deepisles,
title={DeepISLES: a clinically validated ischemic stroke segmentation model from the ISLES'22 challenge},
author={de la Rosa, Ezequiel and Reyes, Mauricio and Liew, Sook-Lei and Hutton, Alexandre and Wiest, Roland and Kaesmacher, Johannes and Hanning, Uta and Hakim, Arsany and Zubal, Richard and Valenzuela, Waldo and others},
journal={Nature Communications},
volume={16},
number={1},
pages={7357},
year={2025},
publisher={Nature Publishing Group UK London}
}
Kofler, F., Rosier, M., Astaraki, M., Möller, H., Mekki, I. I., Buchner, J. A., ... & Menze, B. (2025). BrainLesion Suite: A Flexible and User-Friendly Framework for Modular Brain Lesion Image Analysis. arXiv preprint arXiv:2507.09036.
@article{kofler2025brainlesion,
title={BrainLesion Suite: A Flexible and User-Friendly Framework for Modular Brain Lesion Image Analysis},
author={Kofler, Florian and Rosier, Marcel and Astaraki, Mehdi and M{\"o}ller, Hendrik and Mekki, Ilhem Isra and Buchner, Josef A and Schmick, Anton and Pfiffer, Arianna and Oswald, Eva and Zimmer, Lucas and others},
journal={arXiv preprint arXiv:2507.09036},
year={2025}
}
Siddique, M. M. R., Yang, D., He, Y., Xu, D., & Myronenko, A. (2022). Automated ischemic stroke lesion segmentation from 3D MRI. arXiv preprint arXiv:2209.09546.
@article{siddique2022automated,
title={Automated ischemic stroke lesion segmentation from 3D MRI},
author={Siddique, Md Mahfuzur Rahman and Yang, Dong and He, Yufan and Xu, Daguang and Myronenko, Andriy},
journal={arXiv preprint arXiv:2209.09546},
year={2022}
}
We welcome all kinds of contributions from the community!
Please open a new issue here.
Nice to have you on board! Please have a look at our CONTRIBUTING.md file.