Technology


Technology Image

mAIcrobe


GitHub:
- HenriquesLab/napari-mAIcrobe

Publication: Brito et al. bioRxiv 2025
- 1

mAIcrobe is a napari plugin for analysing images of bacterial cells. It brings segmentation, morphological measurement and deep-learning classification into one workflow, and runs inside napari's multi-dimensional viewer so that data, analysis and results stay in the same window.

The plugin is aimed at microbiologists without a computational background, and works across bacterial species and microscopy modalities.

Segmentation

mAIcrobe offers several segmentation methods, chosen to suit the imaging conditions and cell shape:

  • Classical thresholding (Isodata and Local Average) with watershed post-processing
  • StarDist2D, for star-convex objects and densely packed cells
  • Cellpose cyto3, a generalist model that copes with variable morphology
  • Custom U-Net models, for conditions the above do not cover

These cover rod-shaped E. coli, coccoid S. aureus and other species, under brightfield, phase contrast or fluorescence. The interface previews the result as parameters change, so a choice can be judged before it is committed.

Cell classification

mAIcrobe ships six convolutional neural networks trained for S. aureus cell cycle determination. They cover DNA and membrane staining under both epifluorescence and structured illumination microscopy (SIM), and DNA-only and membrane-only channels. The models assign each cell to a cell cycle phase, which gives population-level statistics that manual scoring cannot reach.

Users working on other species or conditions can train a TensorFlow classification model and load it into the same workflow.

Morphology and intensity

Measurements come from scikit-image regionprops: area, perimeter, eccentricity, orientation and aspect ratio, together with intensity statistics for every fluorescence channel. Measurements specific to bacteria are also included, such as septum detection for dividing cells.

For multi-channel fluorescence, mAIcrobe quantifies colocalisation between labelled structures, which supports work on protein localisation and the spatial organisation of cellular components.

Filtering and quality control

After analysis, cell populations can be filtered on any computed statistic: size, intensity range, classification result or a morphological parameter. Filtering updates the napari viewer as the thresholds move, so it is clear which cells are being kept and how a change to a parameter shifts the selection. Artefacts can be excluded, subpopulations isolated, and classification results checked against individual cells.

Reports and export

mAIcrobe writes an HTML report combining the figures with summary statistics, recording the segmentation parameters, filtering criteria and measurements for each run. Measurements are also written to CSV for analysis in R, Python or elsewhere.

Availability

mAIcrobe is free and open-source software under the BSD-3 licence, installable from PyPI with pip install napari-mAIcrobe, and developed on GitHub. The documentation covers installation, segmentation guides, step-by-step tutorials and the API. Sample data ships with the plugin for validation and training: phase contrast, membrane fluorescence and DNA staining of S. aureus in exponential growth.

The plugin was built by the Henriques Lab together with the Pinho Lab, on top of napari, TensorFlow, StarDist, Cellpose and scikit-image.


Publications featuring mAIcrobe

Packaging Jupyter notebooks as installable desktop apps using LabConstrictor
Iván Hidalgo-Cenalmor, Marcela Xiomara Rivera Pineda, Bruno M Saraiva, Ricardo Henriques, Guillaume Jacquemet
Preprint published in arXiv, March 2026
Technologies: CARE (), CellTracksColab (), DL4MicEverywhere (), mAIcrobe () and ZeroCostDL4Mic ()
Funded by: Chan Zuckerberg Initiative (CZI), The Kavli Foundation, and The Wellcome Trust, EMBO, ERC, H2022 and La Caixa Foundation
DOI: 10.48550/arXiv.2603.10704
Roadmap on deep learning for microscopy
Giovanni Volpe, Carolina Wählby, Lei Tian, Michael Hecht, Artur Yakimovich, Kristina Monakhova, Laura Waller, Ivo F Sbalzarini, Christopher A Metzler, Mingyang Xie, Kevin Zhang, Isaac CD Lenton, Halina Rubinsztein-Dunlop, Daniel Brunner, Bijie Bai, Aydogan Ozcan, Daniel Midtvedt, Hao Wang, Nataša Sladoje, Joakim Lindblad, Jason T Smith, Marien Ochoa, Margarida Barroso, Xavier Intes, Tong Qiu, Li-Yu Yu, Sixian You, Yongtao Liu, Maxim A Ziatdinov, Sergei V Kalinin, Arlo Sheridan, Uri Manor, Elias Nehme, Ofri Goldenberg, Yoav Shechtman, Henrik K Moberg, Christoph Langhammer, Barbora Špačková, Saga Helgadottir, Benjamin Midtvedt, Aykut Argun, Tobias Thalheim, Frank Cichos, Stefano Bo, Lars Hubatsch, Jesus Pineda, Carlo Manzo, Harshith Bachimanchi, Erik Selander, Antoni Homs-Corbera, Martin Fränzl, Kevin de Haan, Yair Rivenson, Zofia Korczak, Caroline Beck Adiels, Mite Mijalkov, Dániel Veréb, Yu-Wei Chang, Joana B Pereira, Damian Matuszewski, Gustaf Kylberg, Ida-Maria Sintorn, Juan C Caicedo, Beth A Cimini, Muyinatu A Lediju Bell, Bruno M Saraiva, Guillaume Jacquemet, Ricardo Henriques, Wei Ouyang, Trang Le, Estibaliz Gómez-de-Mariscal, Daniel Sage, Arrate Muñoz-Barrutia, Ebba Josefson Lindqvist, Johanna Bergman
Paper published in Journal of Physics - Photonics, January 2026
Technologies: BioImage Model Zoo (), CARE (), mAIcrobe () and ZeroCostDL4Mic ()
Funded by: CZI, EMBO, ERC and H2021
DOI: 10.1088/2515-7647/ae0fd1
EZInput: A Cross-Environment Python Library for Easy UI Generation in Scientific Computing
Bruno M Saraiva, Iván Hidalgo-Cenalmor, António D Brito, Damián Martínez, Tayla Shakespeare, Guillaume Jacquemet, Ricardo Henriques
Preprint published in arXiv, January 2026
Technologies: DL4MicEverywhere (), mAIcrobe (), NanoJ-eSRRF (), NanoPyx () and ZeroCostDL4Mic ()
Funded by: Chan Zuckerberg Initiative (CZI), The Kavli Foundation, and The Wellcome Trust, CZI, EMBO, ERC, H2021 and H2022
DOI: 10.48550/arXiv.2601.08859
PhotoFiTT: a quantitative framework for assessing phototoxicity in live-cell microscopy experiments
Mario Del Rosario, Estibaliz Gómez-de-Mariscal, Leonor Morgado, Raquel Portela, Guillaume Jacquemet, Pedro M. Pereira, Ricardo Henriques
Paper published in Nature Communications, December 2025
Technologies: mAIcrobe (), PhotoFiTT () and ZeroCostDL4Mic ()
Funded by: Chan Zuckerberg Initiative (CZI), The Kavli Foundation, and The Wellcome Trust, CZI, EMBO, ERC, FCT, H2021 and H2022
DOI: 10.1038/s41467-025-66209-6
mAIcrobe: an open-source framework for high-throughput bacterial image analysis
António D. Brito, Dominik Alwardt, Beatriz de P. Mariz, Sérgio R. Filipe, Mariana G Pinho, Bruno M. Saraiva, Ricardo Henriques
Preprint published in bioRxiv, October 2025
Technologies: DeepBacs (), mAIcrobe (), Rescale4DL () and ZeroCostDL4Mic ()
Funded by: EMBO, ERC, H2021 and H2022
DOI: 10.1101/2025.10.21.683709

Funding contributing to mAIcrobe

VirusAwareScopes: Machine Learning-Driven Adaptive Microscopy for Long-Term Viral Infection Studies
Ricardo Henriques
Alias: VirusAwareScopes
Funded by: La Caixa Foundation - Health Research
Duration: November 2025 - October 2028
Publications: 2