Skip to content

mAIcrobe

License BSD-3 PyPI Python Version tests napari hub

mAIcrobe: a napari plugin for microbial image analysis.

mAIcrobe is a comprehensive napari plugin that facilitates image analysis workflows of bacterial cells. Combining state-of-the-art segmentation approaches, morphological analysis and adaptable classification models into a napari-plugin, mAIcrobe aims to deliver a user-friendly interface that helps inexperienced users perform image analysis tasks regardless of the bacterial species and microscopy modality. Built using Python 3.10 and 3.11 and tested on Windows, and macOS.

You can read more about mAIcrobe in our preprint: https://www.biorxiv.org/content/10.1101/2025.10.21.683709v1

Video Showcase

Video

✨ Why mAIcrobe?

πŸ”¬ For Microbiologists

  • Automated Cell Segmentation: StarDist2D, Cellpose, and custom U-Net models. Several pre-trained models also included.
  • Deep learning classification: 6 pre-trained CNN models for S. aureus cell cycle determination, a pre-trained model for E. coli antibiotic phenotyping plus support for custom models.
  • Morphological Analysis: Comprehensive measurements using scikit-image regionprops
  • Interactive Filtering: Real-time cell selection based on computed statistics

πŸ“Š For Quantitative Research

  • Colocalization Analysis: Multi-channel fluorescence quantification
  • Automated Reports: HTML reports with visualizations and statistics
  • Data Export: CSV export for downstream statistical analysis

πŸš€ Installation

Standard installation:

We recommend using an environment manager like conda to handle dependencies and assure reproducibility.

Regardless of environment, you can install via pip in Python 3.10 or 3.11. This should handle all dependencies and might take a couple of minutes depending on your internet connection.

pip install napari-mAIcrobe

Development installation:

git clone https://github.com/HenriquesLab/mAIcrobe.git
cd mAIcrobe
pip install -e .

Detailed Installation Instructions β†’

πŸ† Key Features

🎨 Cell Segmentation

  • Thresholding: Isodata and Local Average methods with watershed
  • StarDist2D: custom models (pretrained available for S. aureus)
  • Cellpose: cyto3 model
  • Custom U-Net Models: custom models (pretrained available for S. aureus, B. subtilis, and S. pneumoniae)

🧠 Single cell Classification

  • Pre-trained Models: S. aureus cell cycle and E. coli antibiotic phenotyping
  • Custom Model Support: Build your training dataset in napari with our custom widget, train using our Jupyter notebook and load your own TensorFlow models

πŸ“Š Comprehensive Morphometry

  • Shape Analysis: Area, perimeter, eccentricity
  • Intensity Measurements: Fluorescence statistics
  • Custom Measurements: Septum detection, colocalization, and more

πŸ“– Documentation

πŸ““ Available Jupyter Notebooks

Explore advanced functionality with included notebooks:

🀝 Community

πŸ—οΈ Contributing

We welcome contributions! Whether it's:

  • πŸ› Bug reports and fixes
  • ✨ New segmentation algorithms
  • πŸ“– Documentation improvements
  • πŸ§ͺ Additional test datasets
  • πŸ€– New AI models for classification

Quick contributor setup:

git clone https://github.com/HenriquesLab/mAIcrobe.git
cd mAIcrobe
pip install -e .[testing]
pre-commit install

Testing:

# Run tests
pytest -v

# Run tests with coverage
pytest --cov=napari_mAIcrobe

# Run tests across Python versions
tox

Full contributing guide ->

πŸ“œ License

Distributed under the terms of the BSD-3 license β€” free and open source software.

πŸ™ Acknowledgments

mAIcrobe is developed in the Henriques and Pinho Labs with contributions from the napari and scientific Python communities.

Built with:


From the Henriques and Pinho Labs
"Advancing microbiology through AI-powered image analysis."
πŸš€ Get Started β†’ β€’ πŸ“š Learn More β†’ β€’ βš™οΈ API Docs β†’