Technology


Technology Image

mAIcrobe


GitHub:
- HenriquesLab/mAIcrobe
- HenriquesLab/napari-mAIcrobe

Publication: Brito et al. bioRxiv 2025
0

mAIcrobe is a comprehensive napari plugin designed to revolutionize microbial image analysis by combining cutting-edge deep learning approaches with an accessible, user-friendly interface. Built specifically for bacterial cell analysis, mAIcrobe integrates state-of-the-art segmentation methods, morphological analysis, and adaptable classification models into a unified workflow that serves both experienced researchers and newcomers to computational image analysis.

The plugin addresses a critical need in microbiology: making advanced AI-powered image analysis accessible regardless of bacterial species, microscopy modality, or user expertise. By leveraging napari's interactive multi-dimensional image viewer, mAIcrobe creates an intuitive environment where researchers can visualize their data, run complex analyses, and refine results in real-time.

Powerful Segmentation for Every Challenge

At the core of mAIcrobe is a versatile segmentation toolkit that adapts to diverse imaging conditions and bacterial morphologies. Researchers can choose from multiple approaches including classical thresholding methods (Isodata and Local Average with watershed post-processing), StarDist2D for star-convex shaped objects, Cellpose's cyto3 model for generalist segmentation, and custom U-Net models for specialized applications. This flexibility ensures that whether working with rod-shaped E. coli, coccoid S. aureus, or other bacterial species across brightfield, phase contrast, or fluorescence microscopy, users have the right tool for accurate cell detection.

The segmentation interface guides users through parameter selection with real-time previews, eliminating the trial-and-error typically associated with image analysis. Each method's strengths are clearly documented, helping researchers make informed choices: StarDist excels with densely packed cells, Cellpose adapts to variable morphologies, and custom U-Nets can be trained for specific experimental conditions.

Intelligent Cell Classification

Beyond segmentation, mAIcrobe pioneered deep learning classification for bacterial cell cycle analysis. The plugin includes six pre-trained convolutional neural network models specifically developed for S. aureus cell cycle determination, covering multiple imaging modalities: DNA and membrane staining in both epifluorescence and structured illumination microscopy (SIM), as well as DNA-only and membrane-only channels. These models automatically classify cells into distinct cell cycle phases, enabling population-level insights that would be impossible to achieve through manual analysis.

For researchers working with other species or experimental conditions, mAIcrobe supports custom model integration. Users can train their own TensorFlow classification models and seamlessly incorporate them into the analysis workflow, extending the plugin's capabilities to any classification task relevant to microbial imaging.

Comprehensive Morphological and Intensity Analysis

mAIcrobe leverages scikit-image's powerful regionprops functionality to extract comprehensive morphological measurements from segmented cells. Researchers obtain detailed shape descriptors including area, perimeter, eccentricity, orientation, and aspect ratio, alongside intensity statistics across all fluorescence channels. The plugin also includes custom measurements tailored to bacterial biology, such as septum detection for identifying dividing cells.

For multi-channel fluorescence imaging, mAIcrobe performs sophisticated colocalization analysis, quantifying the spatial relationships between different labeled structures. This enables researchers to investigate protein localization patterns, track multiple fluorescent markers simultaneously, and understand the spatial organization of cellular components.

Interactive Quality Control and Filtering

One of mAIcrobe's most powerful features is its interactive filtering system. After analysis, users can dynamically filter cell populations based on any computed statistic—size thresholds, intensity ranges, classification results, or morphological parameters. The filtering happens in real-time within napari's viewer, allowing researchers to visually inspect which cells meet their criteria and immediately see how parameter adjustments affect the selected population.

This interactive approach transforms quality control from a tedious post-processing step into an intuitive exploration of the data. Researchers can identify and exclude artifacts, focus on specific subpopulations, or validate classification results by examining individual cells that meet particular criteria.

Automated Reporting and Data Export

To streamline the research workflow, mAIcrobe automatically generates comprehensive HTML reports that combine visualizations with statistical summaries. These reports document the complete analysis pipeline—segmentation parameters, filtering criteria, and measured statistics—ensuring reproducibility and facilitating data sharing with collaborators.

All measurements are exported to CSV format for downstream statistical analysis in R, Python, or other data science environments. This seamless integration with existing computational workflows means mAIcrobe fits naturally into diverse research pipelines without disrupting established analysis practices.

Open Source and Community-Driven

mAIcrobe is distributed under the BSD-3 license as free and open-source software, ensuring accessibility to the entire research community. The plugin is available through PyPI for straightforward installation (pip install napari-mAIcrobe) and is actively maintained on GitHub where users can report issues, request features, and contribute improvements.

The project includes extensive documentation with step-by-step tutorials, segmentation guides, and API references for programmatic usage. Sample datasets are built into the plugin for method validation and training, covering phase contrast imaging, membrane fluorescence, and DNA staining of S. aureus cells in exponential growth.

Advancing Microbiology Through AI

Developed through a collaboration between the Henriques Lab and Pinho Lab, mAIcrobe represents a convergence of expertise in advanced microscopy, image analysis, and bacterial cell biology. Built on foundations laid by napari, TensorFlow, StarDist, Cellpose, and scikit-image, the plugin embodies a community-driven approach to scientific software development.

By making sophisticated AI-powered analysis accessible to microbiologists without computational expertise, mAIcrobe democratizes advanced image analysis and accelerates discoveries in bacterial cell biology, antibiotic research, and microbial physiology. Whether investigating cell cycle regulation, analyzing morphological phenotypes, or quantifying multi-channel fluorescence experiments, mAIcrobe provides the tools needed to extract meaningful insights from complex microscopy data.


Publications featuring mAIcrobe

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